@qxs-bns/components-wc 0.0.22 → 0.0.23

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.
Files changed (153) hide show
  1. package/es/editor/blocksuite-editor.mjs +1 -1
  2. package/es/editor/blocksuite-editor.mjs.map +1 -1
  3. package/es/entry-subject.mjs +1 -1
  4. package/es/index.mjs +1 -1
  5. package/es/subject/action.mjs +1 -1
  6. package/es/subject/action.mjs.map +1 -1
  7. package/es/subject/blank-fill.mjs +3 -3
  8. package/es/subject/blank-fill.mjs.map +1 -1
  9. package/es/subject/layout.mjs +4 -4
  10. package/es/subject/layout.mjs.map +1 -1
  11. package/es/subject/list.mjs +64 -64
  12. package/es/subject/list.mjs.map +1 -1
  13. package/es/subject/page-end.mjs +2 -2
  14. package/es/subject/page-end.mjs.map +1 -1
  15. package/es/subject/scale.mjs +1 -1
  16. package/es/subject/scale.mjs.map +1 -1
  17. package/es/subject/single.mjs +2 -2
  18. package/es/subject/single.mjs.map +1 -1
  19. package/es/subject/text-fill.mjs +27 -27
  20. package/es/subject/text-fill.mjs.map +1 -1
  21. package/lib/editor/blocksuite-editor.cjs +2 -2
  22. package/lib/editor/blocksuite-editor.cjs.map +1 -1
  23. package/lib/entry-subject.cjs +1 -1
  24. package/lib/index.cjs +1 -1
  25. package/lib/subject/action.cjs +4 -4
  26. package/lib/subject/action.cjs.map +1 -1
  27. package/lib/subject/blank-fill.cjs +4 -4
  28. package/lib/subject/blank-fill.cjs.map +1 -1
  29. package/lib/subject/layout.cjs +4 -4
  30. package/lib/subject/layout.cjs.map +1 -1
  31. package/lib/subject/list.cjs +11 -11
  32. package/lib/subject/list.cjs.map +1 -1
  33. package/lib/subject/page-end.cjs +1 -1
  34. package/lib/subject/page-end.cjs.map +1 -1
  35. package/lib/subject/scale.cjs +4 -4
  36. package/lib/subject/scale.cjs.map +1 -1
  37. package/lib/subject/single.cjs +5 -5
  38. package/lib/subject/single.cjs.map +1 -1
  39. package/lib/subject/text-fill.cjs +3 -3
  40. package/lib/subject/text-fill.cjs.map +1 -1
  41. package/package.json +3 -3
  42. package/es/entry-all.mjs +0 -2
  43. package/es/entry-all.mjs.map +0 -1
  44. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs +0 -7
  45. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs.map +0 -1
  46. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs +0 -7
  47. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs.map +0 -1
  48. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs +0 -7
  49. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs.map +0 -1
  50. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs +0 -7
  51. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs.map +0 -1
  52. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
  53. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
  54. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
  55. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
  56. package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
  57. package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
  58. package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
  59. package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
  60. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs +0 -7
  61. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs.map +0 -1
  62. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs +0 -7
  63. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs.map +0 -1
  64. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs +0 -7
  65. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs.map +0 -1
  66. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs +0 -7
  67. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs.map +0 -1
  68. package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs +0 -2
  69. package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs.map +0 -1
  70. package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs +0 -2
  71. package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs.map +0 -1
  72. package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs +0 -2
  73. package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
  74. package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
  75. package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
  76. package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs +0 -2
  77. package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
  78. package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs +0 -2
  79. package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
  80. package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs +0 -2
  81. package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
  82. package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs +0 -2
  83. package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
  84. package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs +0 -2
  85. package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs.map +0 -1
  86. package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs +0 -2
  87. package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs.map +0 -1
  88. package/es/subject/rich-text.mjs +0 -27
  89. package/es/subject/rich-text.mjs.map +0 -1
  90. package/lib/entry-all.cjs +0 -2
  91. package/lib/entry-all.cjs.map +0 -1
  92. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs +0 -7
  93. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs.map +0 -1
  94. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs +0 -7
  95. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs.map +0 -1
  96. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs +0 -7
  97. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs.map +0 -1
  98. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs +0 -7
  99. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs.map +0 -1
  100. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
  101. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
  102. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
  103. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
  104. package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
  105. package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
  106. package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
  107. package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
  108. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs +0 -7
  109. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs.map +0 -1
  110. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs +0 -7
  111. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs.map +0 -1
  112. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs +0 -8
  113. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs.map +0 -1
  114. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs +0 -7
  115. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs.map +0 -1
  116. package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs +0 -2
  117. package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs.map +0 -1
  118. package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs +0 -2
  119. package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs.map +0 -1
  120. package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs +0 -2
  121. package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs.map +0 -1
  122. package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs +0 -2
  123. package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs.map +0 -1
  124. package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs +0 -2
  125. package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs.map +0 -1
  126. package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs +0 -2
  127. package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs.map +0 -1
  128. package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs +0 -2
  129. package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs.map +0 -1
  130. package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs +0 -2
  131. package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs.map +0 -1
  132. package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs +0 -2
  133. package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs.map +0 -1
  134. package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs +0 -2
  135. package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs.map +0 -1
  136. package/lib/subject/rich-text.cjs +0 -27
  137. package/lib/subject/rich-text.cjs.map +0 -1
  138. package/types/base/define.d.ts +0 -1
  139. package/types/base/uid.d.ts +0 -1
  140. package/types/editor/blocksuite-editor.d.ts +0 -84
  141. package/types/editor/index.d.ts +0 -3
  142. package/types/index.d.ts +0 -4
  143. package/types/subject/action.d.ts +0 -23
  144. package/types/subject/blank-fill.d.ts +0 -49
  145. package/types/subject/index.d.ts +0 -20
  146. package/types/subject/layout.d.ts +0 -7
  147. package/types/subject/list.d.ts +0 -43
  148. package/types/subject/page-end.d.ts +0 -10
  149. package/types/subject/rich-text.d.ts +0 -30
  150. package/types/subject/scale.d.ts +0 -42
  151. package/types/subject/single.d.ts +0 -79
  152. package/types/subject/text-fill.d.ts +0 -54
  153. package/types/subject/type.d.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"text-fill.cjs","sources":["../../../../packages/components-wc/src/subject/text-fill.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { safeCustomElement } from '../base/define'\nimport { SubjectError } from './single'\nimport { SubjectType } from './types'\n\ninterface TextAnswer {\n title: string\n tag: string\n showInput: boolean\n answerId?: string | number\n customAnswerId?: string | number\n}\n\nconst TAG_COLORS = [\n { bg: '#ecf5ff', color: '#3D61E3', border: '#d9ecff' }, // primary\n { bg: '#f0f9eb', color: '#67c23a', border: '#c2e7b0' }, // success\n { bg: '#fdf6ec', color: '#e6a23c', border: '#faecd8' }, // warning\n { bg: '#fef0f0', color: '#f56c6c', border: '#fde2e2' }, // danger\n { bg: '#f4f4f5', color: '#909399', border: '#e9e9eb' }, // info\n]\n\nfunction showToast(msg: string) {\n const el = document.createElement('div')\n el.textContent = msg\n Object.assign(el.style, {\n position: 'fixed', top: '20px', left: '50%', transform: 'translateX(-50%)',\n padding: '10px 20px', borderRadius: '4px', fontSize: '13px', color: '#fff',\n background: '#f56c6c', zIndex: '99999', boxShadow: '0 4px 12px rgba(0,0,0,.15)',\n transition: 'opacity .3s', opacity: '1',\n })\n document.body.appendChild(el)\n setTimeout(() => { el.style.opacity = '0'; setTimeout(() => el.remove(), 300) }, 2500)\n}\n\n@safeCustomElement('qxs-text-fill')\nexport class QxsTextFill extends LitElement {\n private readonly _iconPlus = html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>`\n private readonly _iconRemove = html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>`\n\n static styles = css`\n :host { display: block; font-family: system-ui, -apple-system, \"PingFang SC\", \"Microsoft YaHei\", sans-serif; font-size: 12px; color: #5a5a5a; }\n *, ::before, ::after { box-sizing: border-box; }\n\n .preview { padding: 12px 0; }\n .preview .title { font-size: 14px; color: #303133; }\n .preview .rich-text { margin-top: 8px; }\n .preview .rich-text img { max-width: 100%; }\n .preview-answer { display: flex; flex-direction: column; margin-top: 12px; }\n .preview-answer .radio { margin-top: 8px; padding-left: 8px; display: flex; align-items: center; gap: 6px; }\n .preview-answer .order { color: #909399; }\n .preview-answer .correct { color: #67c23a; }\n .preview-answer .result-info { color: #909399; }\n\n .flex { display: flex; }\n .flex-items-center { display: flex; align-items: center; }\n .flex-items-start { display: flex; align-items: flex-start; }\n .flex-justify-end { display: flex; justify-content: flex-end; }\n .label { min-width: 60px; font-size: 13px; color: #606266; }\n\n textarea {\n border: 1px solid #dcdfe6; border-radius: 3px; padding: 5px 11px;\n font-size: 13px; font-family: inherit; width: 100%; resize: none; transition: border-color .2s;\n line-height: 1.5; display: block; box-sizing: border-box;\n }\n textarea:focus { border-color: #3D61E3; outline: none; }\n textarea:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }\n .el-input { position: relative; display: block; }\n .el-input textarea { padding-bottom: 24px; }\n .el-input .char-counter {\n position: absolute; right: 12px; bottom: 8px;\n font-size: 12px; color: #909399; line-height: 1; pointer-events: none;\n }\n\n .answer-list { margin-top: 12px; }\n .answer-item { display: flex; align-items: center; margin-top: 6px; border-radius: 4px; }\n .answer-item .label { min-width: 60px; font-size: 13px; color: #909399; }\n .answer-item .input { flex: 1; max-width: 360px; position: relative; display: block; }\n .answer-item .input input {\n height: 32px; padding: 0 50px 0 8px;\n font-size: 13px; line-height: 32px;\n border: 1px solid #dcdfe6; border-radius: 3px; width: 100%;\n transition: border-color .2s; box-sizing: border-box;\n }\n .answer-item .input input:focus { border-color: #3D61E3; outline: none; }\n .answer-item .input input:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }\n .answer-item .input .char-counter {\n position: absolute; right: 8px; top: 50%; transform: translateY(-50%);\n font-size: 12px; color: #909399; line-height: 1; pointer-events: none;\n }\n\n .answer-item .correct { margin: 0 10px; color: #909399; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }\n .answer-item .correct:hover { color: #3D61E3; }\n .answer-item .correct.is-correct { color: #67c23a; }\n .answer-item .correct input { width: 14px; height: 14px; cursor: pointer; accent-color: #3D61E3; }\n\n .answer-item .icon {\n margin-left: 6px; cursor: pointer; display: inline-flex;\n align-items: center; justify-content: center;\n width: 24px; height: 24px; border-radius: 4px;\n border: 1px solid #dcdfe6; background: #fff; color: #909399;\n transition: all 0.2s;\n }\n .answer-item .icon:hover { color: #3D61E3; border-color: #3D61E3; background: #ecf5ff; }\n .answer-item .icon.disabled { color: #e4e7ed; border-color: #e4e7ed; cursor: not-allowed; }\n\n .answer-item .link { margin-left: 8px; color: #3D61E3; cursor: pointer; font-size: 12px; white-space: nowrap; }\n .answer-item .link:hover { color: #2D4CB8; }\n\n .answer-item .link { color: #3D61E3; cursor: pointer; font-size: 12px; white-space: nowrap; background: none; border: none; padding: 0; margin: 0; font-family: inherit; }\n .answer-item .link:hover { color: #2D4CB8; }\n\n .el-link { color: #3D61E3; cursor: pointer; font-size: 12px; background: none; border: none; padding: 0; margin: 0; font-family: inherit; line-height: 1; }\n .el-link:hover { color: #2D4CB8; }\n .el-link.danger { color: #f56c6c; }\n\n .modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9000; display: flex; align-items: center; justify-content: center; }\n .modal { background: #fff; border-radius: 6px; width: 520px; max-width: 90vw; box-shadow: 0 12px 32px rgba(0,0,0,.12); display: flex; flex-direction: column; }\n .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; border-bottom: 1px solid #e4e7ed; }\n .modal-title { font-size: 14px; font-weight: 600; color: #303133; }\n .modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #909399; padding: 0; line-height: 1; }\n .modal-close:hover { color: #3D61E3; }\n .modal-body { padding: 20px; }\n .modal-body textarea { min-height: 120px; }\n .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e4e7ed; }\n .modal-footer button { padding: 6px 16px; font-size: 12px; border-radius: 3px; cursor: pointer; border: 1px solid #dcdfe6; background: #fff; color: #606266; }\n .modal-footer button:hover { color: #3D61E3; border-color: #a0cfff; }\n .modal-footer button.primary { background: #3D61E3; border-color: #3D61E3; color: #fff; }\n .modal-footer button.primary:hover { background: #2D4CB8; border-color: #2D4CB8; }\n `\n\n @property({ type: Number, attribute: 'order-index' }) orderIndex = 0\n @property({ type: String }) title = ''\n @property({ type: String, attribute: 'custom-id' }) customId = ''\n @property({ type: Boolean, attribute: 'is-edit' }) isEdit = false\n @property({ type: Boolean, attribute: 'is-save' }) isSave = false\n @property({ type: Boolean, attribute: 'is-set' }) isSet = false\n @property({ type: Boolean, attribute: 'is-key' }) isKey = false\n @property({ type: Boolean, attribute: 'show-action' }) showAction = true\n @property({ type: Boolean, attribute: 'show-add' }) showAdd = true\n @property({ type: Boolean, attribute: 'show-answer-setting' }) showAnswerSetting = false\n @property({ type: Boolean, attribute: 'show-analysis' }) showAnalysis = true\n @property({ type: String, attribute: 'rich-text-content' }) richTextContent = ''\n @property({ type: String }) analysis = ''\n @property({ type: Number, attribute: 'exam-answer-relation-type' }) examAnswerRelationType = 0\n @property({ type: String, attribute: 'exam-expand' }) examExpand = ''\n @property({ type: Object, attribute: 'exam-answer-setting' })\n examAnswerSetting: { isInOrder: boolean, isIgnoreCase: boolean, keywordCount: number } = { isInOrder: true, isIgnoreCase: true, keywordCount: 1 }\n @property({ type: Object })\n uploadImage: (file: File) => Promise<string> = async (file: File) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = (e) => resolve(e.target?.result as string)\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n }\n\n @property({ type: Array, attribute: 'answer-list' }) answerList: any[] = []\n\n // 双向绑定支持\n @property({ type: String, attribute: 'model-value' }) modelValue = ''\n @property({ type: Boolean, attribute: 'use-model' }) useModel = false\n\n @state() private _answers: TextAnswer[] = [{ title: '', tag: '', showInput: false }]\n @state() private _title = ''\n @state() private _analysis = ''\n @state() private _isInOrder = true\n @state() private _isIgnoreCase = true\n @state() private _keywordCount = 1\n @state() private _correct = ''\n @state() private _showRichText = false\n @state() private _richText = ''\n\n private readonly TITLE_MAX = 200\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('isEdit') && this.isEdit) { this._syncProps() }\n if (!this.isEdit && (changed.has('title') || changed.has('answerList') || changed.has('analysis') || changed.has('examAnswerSetting') || changed.has('richTextContent') || changed.has('examExpand'))) {\n this._syncProps()\n }\n // 当外部 modelValue 变化时同步内部状态\n if (changed.has('modelValue') && this.useModel) {\n this._title = this.modelValue\n }\n }\n\n private _normalizeAnswerTitle(answer: any) {\n return String(answer?.title ?? answer?.answer ?? '')\n }\n\n private _normalizedAnswerList(source: any[] = []) {\n return (Array.isArray(source) ? source : []).map((answer: any) => ({\n ...answer,\n answerId: answer?.answerId ?? answer?.examAnswerId,\n title: this._normalizeAnswerTitle(answer),\n }))\n }\n\n private _syncProps() {\n this._title = this.title || ''\n this._analysis = this.analysis || ''\n if (this.answerList?.length) {\n this._answers = this._normalizedAnswerList(this.answerList).map((a: any) => ({\n title: a.title || '',\n tag: '',\n showInput: false,\n answerId: a.answerId,\n customAnswerId: a.customAnswerId,\n }))\n }\n else {\n this._answers = [{ title: '', tag: '', showInput: false }]\n }\n if (this.examAnswerSetting) {\n this._isInOrder = !!this.examAnswerSetting.isInOrder\n this._isIgnoreCase = !!this.examAnswerSetting.isIgnoreCase\n this._keywordCount = this.examAnswerSetting.keywordCount || 1\n }\n this._richText = this.richTextContent || ''\n this._showRichText = !!this.richTextContent\n this._correct = this.examExpand || ''\n }\n\n private _emit(name: string, detail?: unknown) {\n this.dispatchEvent(new CustomEvent(name, { bubbles: true, composed: true, detail: detail ?? null }))\n }\n\n private _onTitleInput(e: Event) {\n const el = e.target as HTMLTextAreaElement\n if (el.value.length > this.TITLE_MAX) { el.value = el.value.slice(0, this.TITLE_MAX) }\n this._title = el.value\n // 双向绑定:通知外部更新\n if (this.useModel) {\n this.dispatchEvent(new CustomEvent('update:modelValue', {\n bubbles: true,\n composed: true,\n detail: this._title,\n }))\n }\n }\n\n private _addTag(i: number) {\n const a = { ...this._answers[i] }\n if (a.tag) {\n a.title = a.title ? [a.title, a.tag].join(',') : a.tag\n a.tag = ''\n }\n a.showInput = false\n this._answers = this._answers.map((x, j) => j === i ? a : x)\n }\n\n private _closeTag(tag: string, i: number) {\n const a = { ...this._answers[i] }\n a.title = a.title.split(',').filter(t => t !== tag).join(',')\n this._answers = this._answers.map((x, j) => j === i ? a : x)\n }\n\n async toJSON(): Promise<any> {\n return new Promise((resolve, reject) => {\n const row = { customId: this.customId || undefined, answerType: 'text_fill', orderIndex: this.orderIndex }\n\n const title = this.isEdit ? this._title : this.title || ''\n const answers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const analysis = this.isEdit ? this._analysis : this.analysis || ''\n const correct = this.isEdit ? this._correct : (this as any).examExpand || ''\n const keywordCount = this.isEdit ? this._keywordCount : this.examAnswerSetting?.keywordCount || 1\n const isInOrder = this.isEdit ? this._isInOrder : this.examAnswerSetting?.isInOrder ?? true\n const isIgnoreCase = this.isEdit ? this._isIgnoreCase : this.examAnswerSetting?.isIgnoreCase ?? true\n const showRichText = this.isEdit ? this._showRichText : !!this.richTextContent\n const richText = this.isEdit ? this._richText : this.richTextContent || ''\n\n if (!title) {\n reject(new SubjectError('题目标题不能为空!', 'EMPTY_TITLE', 'title', row))\n return\n }\n if (keywordCount || correct) {\n if (!keywordCount) {\n reject(new SubjectError('请完善答题设置!', 'NO_KEYWORD_COUNT', 'keywordCount', row))\n return\n }\n if (!correct) {\n reject(new SubjectError('请输入问题正确答案!', 'NO_CORRECT_ANSWER', 'correct', row))\n return\n }\n if (answers.length !== keywordCount) {\n reject(new SubjectError('关键词个数设置有误!', 'KEYWORD_COUNT_MISMATCH', 'answers', row))\n return\n }\n const msg: string[] = []\n answers.forEach((item: any, i: number) => {\n if (!this._normalizeAnswerTitle(item)) { msg.push(`关键词${i + 1}未设置`) }\n })\n if (msg.length) {\n reject(new SubjectError(msg.join(','), 'KEYWORD_EMPTY', 'answers', row))\n return\n }\n }\n const result: any = {\n answerType: SubjectType.TEXT_FILL,\n title,\n answers: answers\n .filter((a: any) => this._normalizeAnswerTitle(a))\n .map((a: any) => ({\n title: this._normalizeAnswerTitle(a),\n ...(a.answerId ? { answerId: a.answerId } : {}),\n ...(a.customAnswerId ? { customAnswerId: a.customAnswerId } : {}),\n })),\n analysis,\n isSetCorrectAnswer: !!correct,\n isKey: this.isKey,\n examExpand: correct,\n examAnswerSettingBO: { isIgnoreCase, isInOrder, keywordCount },\n examRichTextContent: showRichText ? richText : '',\n }\n if (this.customId) { result.customId = this.customId }\n resolve(result)\n })\n }\n\n private _addAnswer() {\n if (this.isSave) { return }\n this._answers = [...this._answers, { title: '', tag: '', showInput: false }]\n }\n\n private _deleteAnswer(index: number) {\n if (this._answers.length < 2 || this.isSave) { return }\n this._answers = this._answers.filter((_, i) => i !== index)\n }\n\n private async _save(e?: Event) {\n e?.stopImmediatePropagation()\n try {\n const data = await this.toJSON()\n this._emit('save', data)\n }\n catch (err: any) {\n showToast(err.message)\n }\n }\n\n validate(): SubjectError[] {\n const errors: SubjectError[] = []\n const row = { customId: this.customId || undefined, answerType: 'text_fill', orderIndex: this.orderIndex }\n\n const title = this.isEdit ? this._title : this.title || ''\n const answers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const correct = this.isEdit ? this._correct : (this as any).examExpand || ''\n const keywordCount = this.isEdit ? this._keywordCount : this.examAnswerSetting?.keywordCount || 1\n\n if (!title) {\n errors.push(new SubjectError('题目标题不能为空!', 'EMPTY_TITLE', 'title', row))\n }\n if (keywordCount || correct) {\n if (!keywordCount) {\n errors.push(new SubjectError('请完善答题设置!', 'NO_KEYWORD_COUNT', 'keywordCount', row))\n }\n if (!correct) {\n errors.push(new SubjectError('请输入问题正确答案!', 'NO_CORRECT_ANSWER', 'correct', row))\n }\n if (answers.length !== keywordCount) {\n errors.push(new SubjectError('关键词个数设置有误!', 'KEYWORD_COUNT_MISMATCH', 'answers', row))\n }\n answers.forEach((item: any, i: number) => {\n if (!this._normalizeAnswerTitle(item)) {\n errors.push(new SubjectError(`关键词${i + 1}未设置`, 'KEYWORD_EMPTY', 'answers', row))\n }\n })\n }\n\n return errors\n }\n\n private _renderPreview() {\n const previewAnswers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const previewCorrect = this.isEdit ? this._correct : (this.examExpand || '')\n return html`\n <div class=\"preview\">\n <span class=\"title\">${this.orderIndex + 1}.${this.title}(问答题)</span>\n ${this.richTextContent ? html`<div class=\"rich-text\" .innerHTML=${this.richTextContent}></div>` : ''}\n ${previewAnswers.some(a => a.title)\n ? html`\n <div style=\"margin-top:8px;color:#a8abb2\">\n ${previewAnswers.map((a, i) => a.title\n ? html`\n <span style=\"margin-right:10px\">关键词${i + 1}: ${a.title}</span>\n `\n : '')}\n </div>\n `\n : ''}\n ${previewCorrect ? html`<div style=\"margin-top:8px;color:#a8abb2\">正确答案:${previewCorrect}</div>` : ''}\n ${this.analysis ? html`<div style=\"color:#909399;font-size:12px;margin-top:8px\">解析: ${this.analysis}</div>` : ''}\n </div>\n `\n }\n\n private _renderEdit() {\n return html`\n <div class=\"flex-items-start\">\n <div class=\"label\"><span>题目:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._title} ?disabled=${this.isSave}\n maxlength=${this.TITLE_MAX}\n @input=${(e: Event) => this._onTitleInput(e)}\n placeholder=\"【问答题】请输入问题\"></textarea>\n <span class=\"char-counter\">${this._title.length}/${this.TITLE_MAX}</span>\n </div>\n </div>\n </div>\n\n ${this.showAnswerSetting\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>答题设置:</span></div>\n <div style=\"flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:8px\">\n <span style=\"font-size:13px;color:#606266\">共答对</span>\n <input type=\"number\" style=\"width:60px;height:24px;border:1px solid #dcdfe6;border-radius:3px;padding:0 8px;font-size:13px\"\n .value=${String(this._keywordCount)} min=\"1\"\n @change=${(e: Event) => { this._keywordCount = Number((e.target as HTMLInputElement).value) }} />\n <span style=\"font-size:13px;color:#606266\">个关键词,算是正确的</span>\n <label style=\"display:inline-flex;align-items:center;gap:4px;cursor:pointer;font-size:12px;color:#606266\">\n <input type=\"checkbox\" .checked=${this._isInOrder}\n @change=${(e: Event) => { this._isInOrder = (e.target as HTMLInputElement).checked }} />\n 答案不分顺序\n </label>\n <label style=\"display:inline-flex;align-items:center;gap:4px;cursor:pointer;font-size:12px;color:#606266\">\n <input type=\"checkbox\" .checked=${this._isIgnoreCase}\n @change=${(e: Event) => { this._isIgnoreCase = (e.target as HTMLInputElement).checked }} />\n 忽略大小写\n </label>\n </div>\n </div>\n `\n : ''}\n\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>答案:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._correct} ?disabled=${this.isSave}\n maxlength=\"200\"\n @input=${(e: Event) => { this._correct = (e.target as HTMLTextAreaElement).value }}\n placeholder=\"请输入正确答案\"></textarea>\n <span class=\"char-counter\">${this._correct.length}/200</span>\n </div>\n </div>\n </div>\n\n <div class=\"answer-list\" style=\"margin-top:12px\">\n <span style=\"padding-left:60px;font-size:12px;color:#909399\">*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'</span>\n ${this._answers.map((a, i) => html`\n <div class=\"answer-item\">\n <span class=\"label\">关键词${i + 1}:</span>\n <div class=\"answer-tags\" style=\"display:flex;flex-wrap:wrap;gap:5px;align-items:center;flex:1;max-width:360px\">\n ${a.title.split(',').filter(Boolean).map((tag) => {\n const c = TAG_COLORS[i % TAG_COLORS.length]; return html`\n <span style=\"display:inline-flex;align-items:center;background:${c.bg};color:${c.color};border:1px solid ${c.border};border-radius:3px;padding:2px 8px;font-size:12px;line-height:16px\">\n ${tag}\n ${!this.isSave ? html`<span style=\"cursor:pointer;margin-left:4px;color:#909399\" @click=${() => this._closeTag(tag, i)}>×</span>` : ''}\n </span>\n `\n })}\n ${!this.isSave\n ? html`\n ${a.showInput\n ? html`\n <input type=\"text\" style=\"width:80px;height:24px;border:1px solid #dcdfe6;border-radius:3px;padding:0 8px;font-size:12px\"\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === 'Enter') { this._addTag(i) }\n }}\n @input=${(e: Event) => { a.tag = (e.target as HTMLInputElement).value }}\n @blur=${() => this._addTag(i)} />\n <button class=\"el-link\" @click=${() => this._addTag(i)}>确认</button>\n `\n : html`\n <button class=\"link\" @click=${() => { this._answers = this._answers.map((x, j) => j === i ? { ...x, showInput: true } : x); this.updateComplete.then(() => { (this.shadowRoot?.querySelector(`input[style*=\"width:80px\"]`) as HTMLInputElement)?.focus() }) }}>\n ${a.title ? '添加同义词' : '添加关键词'}\n </button>\n `}\n `\n : ''}\n </div>\n <span class=\"icon ${this.isSave ? 'disabled' : ''}\" @click=${() => this._addAnswer()}>${this._iconPlus}</span>\n <span class=\"icon ${this.isSave || this._answers.length < 2 ? 'disabled' : ''}\" @click=${() => this._deleteAnswer(i)}>${this._iconRemove}</span>\n </div>\n `)}\n </div>\n\n ${this._showRichText\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>富文本:</span></div>\n <div style=\"flex:1\">\n <qxs-blocksuite-editor\n .content=${this._richText}\n .uploadImage=${this.uploadImage}\n ?is-edit=${true}\n ></qxs-blocksuite-editor>\n ${!this.showAction\n ? html`<div class=\"flex-justify-end\" style=\"margin-top:8px\"><span class=\"el-link danger\" @click=${() => { this._showRichText = false; this._richText = '' }}>删除富文本</span></div>`\n : ''}\n </div>\n </div>\n `\n : ''}\n\n ${this.showAnalysis\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>解析:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._analysis}\n @input=${(e: Event) => { this._analysis = (e.target as HTMLTextAreaElement).value }}\n placeholder=\"请输入题目解析\"></textarea>\n </div>\n </div>\n </div>\n `\n : ''}\n `\n }\n\n render() {\n return html`\n <qxs-subject-layout .showEdit=${this.isEdit}>\n <div slot=\"preview\">${this._renderPreview()}</div>\n <div slot=\"edit\">${this._renderEdit()}</div>\n ${this.showAction\n ? html`\n <qxs-subject-action\n .isEdit=${this.isEdit}\n .isSet=${this.isSet}\n .showAdd=${this.showAdd}\n .showRichText=${this._showRichText}\n exam-answer-relation-type=${this.examAnswerRelationType}\n @delete=${() => this._emit('delete')}\n @save=${this._save}\n @edit=${() => this._emit('edit')}\n @add=${(e: CustomEvent) => this._emit('add', e.detail)}\n @set-key=${(e: CustomEvent) => { this._emit('set-key', e.detail) }}\n @on-show-rich-text=${() => {\n this._showRichText = !this._showRichText\n if (!this._showRichText) {\n this._richText = ''\n }\n }}\n ></qxs-subject-action>\n `\n : ''}\n </qxs-subject-layout>\n `\n }\n}\n\nexport function register() {}\n"],"names":["TAG_COLORS","bg","color","border","QxsTextFill","LitElement","constructor","super","arguments","this","_iconPlus","html","_iconRemove","orderIndex","title","customId","isEdit","isSave","isSet","isKey","showAction","showAdd","showAnswerSetting","showAnalysis","richTextContent","analysis","examAnswerRelationType","examExpand","examAnswerSetting","isInOrder","isIgnoreCase","keywordCount","uploadImage","async","Promise","resolve","reject","reader","FileReader","onload","e","target","result","onerror","readAsDataURL","file","answerList","modelValue","useModel","_answers","tag","showInput","_title","_analysis","_isInOrder","_isIgnoreCase","_keywordCount","_correct","_showRichText","_richText","TITLE_MAX","willUpdate","changed","has","_syncProps","_normalizeAnswerTitle","answer","String","_normalizedAnswerList","source","length","undefined","Array","isArray","map","answerId","examAnswerId","a","customAnswerId","_emit","name","detail","dispatchEvent","CustomEvent","bubbles","composed","_onTitleInput","el","value","slice","_addTag","i","join","x","j","_closeTag","split","filter","t","toJSON","row","answerType","answers","correct","showRichText","richText","SubjectError","msg","forEach","item","push","SubjectType","TEXT_FILL","isSetCorrectAnswer","examAnswerSettingBO","examRichTextContent","_addAnswer","_deleteAnswer","index","_","_save","stopImmediatePropagation","data","err","document","createElement","textContent","Object","assign","style","position","top","left","transform","padding","borderRadius","fontSize","background","zIndex","boxShadow","transition","opacity","body","appendChild","setTimeout","remove","showToast","message","validate","errors","_renderPreview","previewAnswers","previewCorrect","some","_renderEdit","Number","checked","Boolean","c","key","updateComplete","then","shadowRoot","querySelector","focus","render","styles","css","__decorateClass","property","type","attribute","prototype","state","safeCustomElement"],"mappings":"kiBAcA,MAAMA,EAAa,CACjB,CAAEC,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,YAiBhCC,QAAAA,YAAN,cAA0BC,EAAAA,WAA1BC,WAAAA,GAAAC,SAAAC,WACLC,KAAiBC,UAAYC,EAAAA,IAAA,2NAC7BF,KAAiBG,YAAcD,EAAAA,IAAA,qLA6FuBF,KAAAI,WAAa,EACvCJ,KAAAK,MAAQ,GACgBL,KAAAM,SAAW,GACZN,KAAAO,QAAS,EACTP,KAAAQ,QAAS,EACVR,KAAAS,OAAQ,EACRT,KAAAU,OAAQ,EACHV,KAAAW,YAAa,EAChBX,KAAAY,SAAU,EACCZ,KAAAa,mBAAoB,EAC1Bb,KAAAc,cAAe,EACZd,KAAAe,gBAAkB,GAClDf,KAAAgB,SAAW,GAC6BhB,KAAAiB,uBAAyB,EACvCjB,KAAAkB,WAAa,GAEnElB,KAAAmB,kBAAyF,CAAEC,WAAW,EAAMC,cAAc,EAAMC,aAAc,GAE9ItB,KAAAuB,YAA+CC,SACtC,IAAIC,QAAQ,CAACC,EA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fill.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { safeCustomElement } from '../base/define'\nimport { SubjectError } from './single'\nimport { SubjectType } from './types'\n\ninterface TextAnswer {\n title: string\n tag: string\n showInput: boolean\n answerId?: string | number\n customAnswerId?: string | number\n}\n\nconst TAG_COLORS = [\n { bg: '#ecf5ff', color: '#3D61E3', border: '#d9ecff' }, // primary\n { bg: '#f0f9eb', color: '#67c23a', border: '#c2e7b0' }, // success\n { bg: '#fdf6ec', color: '#e6a23c', border: '#faecd8' }, // warning\n { bg: '#fef0f0', color: '#f56c6c', border: '#fde2e2' }, // danger\n { bg: '#f4f4f5', color: '#909399', border: '#e9e9eb' }, // info\n]\n\nfunction showToast(msg: string) {\n const el = document.createElement('div')\n el.textContent = msg\n Object.assign(el.style, {\n position: 'fixed', top: '20px', left: '50%', transform: 'translateX(-50%)',\n padding: '10px 20px', borderRadius: '4px', fontSize: '13px', color: '#fff',\n background: '#f56c6c', zIndex: '99999', boxShadow: '0 4px 12px rgba(0,0,0,.15)',\n transition: 'opacity .3s', opacity: '1',\n })\n document.body.appendChild(el)\n setTimeout(() => { el.style.opacity = '0'; setTimeout(() => el.remove(), 300) }, 2500)\n}\n\n@safeCustomElement('qxs-text-fill')\nexport class QxsTextFill extends LitElement {\n private readonly _iconPlus = html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>`\n private readonly _iconRemove = html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>`\n\n static styles = css`\n :host { display: block; font-family: system-ui, -apple-system, \"PingFang SC\", \"Microsoft YaHei\", sans-serif; font-size: 12px; color: #5a5a5a; }\n *, ::before, ::after { box-sizing: border-box; }\n\n .preview { padding: 12px 0; }\n .preview .title { font-size: 14px; color: #303133; }\n .preview .rich-text { margin-top: 8px; }\n .preview .rich-text img { max-width: 100%; }\n .preview-answer { display: flex; flex-direction: column; margin-top: 12px; }\n .preview-answer .radio { margin-top: 8px; padding-left: 8px; display: flex; align-items: center; gap: 6px; }\n .preview-answer .order { color: #909399; }\n .preview-answer .correct { color: #67c23a; }\n .preview-answer .result-info { color: #909399; }\n\n .flex { display: flex; }\n .flex-items-center { display: flex; align-items: center; }\n .flex-items-start { display: flex; align-items: flex-start; }\n .flex-justify-end { display: flex; justify-content: flex-end; }\n .label { min-width: 60px; font-size: 13px; color: #606266; }\n\n textarea {\n border: 1px solid #dcdfe6; border-radius: 3px; padding: 5px 11px;\n font-size: 13px; font-family: inherit; width: 100%; resize: none; transition: border-color .2s;\n line-height: 1.5; display: block; box-sizing: border-box;\n }\n textarea:focus { border-color: #3D61E3; outline: none; }\n textarea:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }\n .el-input { position: relative; display: block; }\n .el-input textarea { padding-bottom: 24px; }\n .el-input .char-counter {\n position: absolute; right: 12px; bottom: 8px;\n font-size: 12px; color: #909399; line-height: 1; pointer-events: none;\n }\n\n .answer-list { margin-top: 12px; }\n .answer-item { display: flex; align-items: center; margin-top: 6px; border-radius: 4px; }\n .answer-item .label { min-width: 60px; font-size: 13px; color: #909399; }\n .answer-item .input { flex: 1; max-width: 360px; position: relative; display: block; }\n .answer-item .input input {\n height: 32px; padding: 0 50px 0 8px;\n font-size: 13px; line-height: 32px;\n border: 1px solid #dcdfe6; border-radius: 3px; width: 100%;\n transition: border-color .2s; box-sizing: border-box;\n }\n .answer-item .input input:focus { border-color: #3D61E3; outline: none; }\n .answer-item .input input:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }\n .answer-item .input .char-counter {\n position: absolute; right: 8px; top: 50%; transform: translateY(-50%);\n font-size: 12px; color: #909399; line-height: 1; pointer-events: none;\n }\n\n .answer-item .correct { margin: 0 10px; color: #909399; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }\n .answer-item .correct:hover { color: #3D61E3; }\n .answer-item .correct.is-correct { color: #67c23a; }\n .answer-item .correct input { width: 14px; height: 14px; cursor: pointer; accent-color: #3D61E3; }\n\n .answer-item .icon {\n margin-left: 6px; cursor: pointer; display: inline-flex;\n align-items: center; justify-content: center;\n width: 24px; height: 24px; border-radius: 4px;\n border: 1px solid #dcdfe6; background: #fff; color: #909399;\n transition: all 0.2s;\n }\n .answer-item .icon:hover { color: #3D61E3; border-color: #3D61E3; background: #ecf5ff; }\n .answer-item .icon.disabled { color: #e4e7ed; border-color: #e4e7ed; cursor: not-allowed; }\n\n .answer-item .link { margin-left: 8px; color: #3D61E3; cursor: pointer; font-size: 12px; white-space: nowrap; }\n .answer-item .link:hover { color: #2D4CB8; }\n\n .answer-item .link { color: #3D61E3; cursor: pointer; font-size: 12px; white-space: nowrap; background: none; border: none; padding: 0; margin: 0; font-family: inherit; }\n .answer-item .link:hover { color: #2D4CB8; }\n\n .el-link { color: #3D61E3; cursor: pointer; font-size: 12px; background: none; border: none; padding: 0; margin: 0; font-family: inherit; line-height: 1; }\n .el-link:hover { color: #2D4CB8; }\n .el-link.danger { color: #f56c6c; }\n\n .modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9000; display: flex; align-items: center; justify-content: center; }\n .modal { background: #fff; border-radius: 6px; width: 520px; max-width: 90vw; box-shadow: 0 12px 32px rgba(0,0,0,.12); display: flex; flex-direction: column; }\n .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; border-bottom: 1px solid #e4e7ed; }\n .modal-title { font-size: 14px; font-weight: 600; color: #303133; }\n .modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #909399; padding: 0; line-height: 1; }\n .modal-close:hover { color: #3D61E3; }\n .modal-body { padding: 20px; }\n .modal-body textarea { min-height: 120px; }\n .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e4e7ed; }\n .modal-footer button { padding: 6px 16px; font-size: 12px; border-radius: 3px; cursor: pointer; border: 1px solid #dcdfe6; background: #fff; color: #606266; }\n .modal-footer button:hover { color: #3D61E3; border-color: #a0cfff; }\n .modal-footer button.primary { background: #3D61E3; border-color: #3D61E3; color: #fff; }\n .modal-footer button.primary:hover { background: #2D4CB8; border-color: #2D4CB8; }\n `\n\n @property({ type: Number, attribute: 'order-index' }) orderIndex = 0\n @property({ type: String }) title = ''\n @property({ type: String, attribute: 'custom-id' }) customId = ''\n @property({ type: Boolean, attribute: 'is-edit' }) isEdit = false\n @property({ type: Boolean, attribute: 'is-save' }) isSave = false\n @property({ type: Boolean, attribute: 'is-set' }) isSet = false\n @property({ type: Boolean, attribute: 'is-key' }) isKey = false\n @property({ type: Boolean, attribute: 'show-action' }) showAction = true\n @property({ type: Boolean, attribute: 'show-add' }) showAdd = true\n @property({ type: Boolean, attribute: 'show-answer-setting' }) showAnswerSetting = false\n @property({ type: Boolean, attribute: 'show-analysis' }) showAnalysis = true\n @property({ type: String, attribute: 'rich-text-content' }) richTextContent = ''\n @property({ type: String }) analysis = ''\n @property({ type: Number, attribute: 'exam-answer-relation-type' }) examAnswerRelationType = 0\n @property({ type: String, attribute: 'exam-expand' }) examExpand = ''\n @property({ type: Object, attribute: 'exam-answer-setting' })\n examAnswerSetting: { isInOrder: boolean, isIgnoreCase: boolean, keywordCount: number } = { isInOrder: true, isIgnoreCase: true, keywordCount: 1 }\n @property({ type: Object })\n uploadImage: (file: File) => Promise<string> = async (file: File) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = (e) => resolve(e.target?.result as string)\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n }\n\n @property({ type: Array, attribute: 'answer-list' }) answerList: any[] = []\n\n // 双向绑定支持\n @property({ type: String, attribute: 'model-value' }) modelValue = ''\n @property({ type: Boolean, attribute: 'use-model' }) useModel = false\n\n @state() private _answers: TextAnswer[] = [{ title: '', tag: '', showInput: false }]\n @state() private _title = ''\n @state() private _analysis = ''\n @state() private _isInOrder = true\n @state() private _isIgnoreCase = true\n @state() private _keywordCount = 1\n @state() private _correct = ''\n @state() private _showRichText = false\n @state() private _richText = ''\n\n private readonly TITLE_MAX = 200\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('isEdit') && this.isEdit) { this._syncProps() }\n if (!this.isEdit && (changed.has('title') || changed.has('answerList') || changed.has('analysis') || changed.has('examAnswerSetting') || changed.has('richTextContent') || changed.has('examExpand'))) {\n this._syncProps()\n }\n // 当外部 modelValue 变化时同步内部状态\n if (changed.has('modelValue') && this.useModel) {\n this._title = this.modelValue\n }\n }\n\n private _normalizeAnswerTitle(answer: any) {\n return String(answer?.title ?? answer?.answer ?? '')\n }\n\n private _normalizedAnswerList(source: any[] = []) {\n return (Array.isArray(source) ? source : []).map((answer: any) => ({\n ...answer,\n answerId: answer?.answerId ?? answer?.examAnswerId,\n title: this._normalizeAnswerTitle(answer),\n }))\n }\n\n private _syncProps() {\n this._title = this.title || ''\n this._analysis = this.analysis || ''\n if (this.answerList?.length) {\n this._answers = this._normalizedAnswerList(this.answerList).map((a: any) => ({\n title: a.title || '',\n tag: '',\n showInput: false,\n answerId: a.answerId,\n customAnswerId: a.customAnswerId,\n }))\n }\n else {\n this._answers = [{ title: '', tag: '', showInput: false }]\n }\n if (this.examAnswerSetting) {\n this._isInOrder = !!this.examAnswerSetting.isInOrder\n this._isIgnoreCase = !!this.examAnswerSetting.isIgnoreCase\n this._keywordCount = this.examAnswerSetting.keywordCount || 1\n }\n this._richText = this.richTextContent || ''\n this._showRichText = !!this.richTextContent\n this._correct = this.examExpand || ''\n }\n\n private _emit(name: string, detail?: unknown) {\n this.dispatchEvent(new CustomEvent(name, { bubbles: true, composed: true, detail: detail ?? null }))\n }\n\n private _onTitleInput(e: Event) {\n const el = e.target as HTMLTextAreaElement\n if (el.value.length > this.TITLE_MAX) { el.value = el.value.slice(0, this.TITLE_MAX) }\n this._title = el.value\n // 双向绑定:通知外部更新\n if (this.useModel) {\n this.dispatchEvent(new CustomEvent('update:modelValue', {\n bubbles: true,\n composed: true,\n detail: this._title,\n }))\n }\n }\n\n private _addTag(i: number) {\n const a = { ...this._answers[i] }\n if (a.tag) {\n a.title = a.title ? [a.title, a.tag].join(',') : a.tag\n a.tag = ''\n }\n a.showInput = false\n this._answers = this._answers.map((x, j) => j === i ? a : x)\n }\n\n private _closeTag(tag: string, i: number) {\n const a = { ...this._answers[i] }\n a.title = a.title.split(',').filter(t => t !== tag).join(',')\n this._answers = this._answers.map((x, j) => j === i ? a : x)\n }\n\n async toJSON(): Promise<any> {\n return new Promise((resolve, reject) => {\n const row = { customId: this.customId || undefined, answerType: 'text_fill', orderIndex: this.orderIndex }\n\n const title = this.isEdit ? this._title : this.title || ''\n const answers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const analysis = this.isEdit ? this._analysis : this.analysis || ''\n const correct = this.isEdit ? this._correct : (this as any).examExpand || ''\n const keywordCount = this.isEdit ? this._keywordCount : this.examAnswerSetting?.keywordCount || 1\n const isInOrder = this.isEdit ? this._isInOrder : this.examAnswerSetting?.isInOrder ?? true\n const isIgnoreCase = this.isEdit ? this._isIgnoreCase : this.examAnswerSetting?.isIgnoreCase ?? true\n const showRichText = this.isEdit ? this._showRichText : !!this.richTextContent\n const richText = this.isEdit ? this._richText : this.richTextContent || ''\n\n if (!title) {\n reject(new SubjectError('题目标题不能为空!', 'EMPTY_TITLE', 'title', row))\n return\n }\n if (keywordCount || correct) {\n if (!keywordCount) {\n reject(new SubjectError('请完善答题设置!', 'NO_KEYWORD_COUNT', 'keywordCount', row))\n return\n }\n if (!correct) {\n reject(new SubjectError('请输入问题正确答案!', 'NO_CORRECT_ANSWER', 'correct', row))\n return\n }\n if (answers.length !== keywordCount) {\n reject(new SubjectError('关键词个数设置有误!', 'KEYWORD_COUNT_MISMATCH', 'answers', row))\n return\n }\n const msg: string[] = []\n answers.forEach((item: any, i: number) => {\n if (!this._normalizeAnswerTitle(item)) { msg.push(`关键词${i + 1}未设置`) }\n })\n if (msg.length) {\n reject(new SubjectError(msg.join(','), 'KEYWORD_EMPTY', 'answers', row))\n return\n }\n }\n const result: any = {\n answerType: SubjectType.TEXT_FILL,\n title,\n answers: answers\n .filter((a: any) => this._normalizeAnswerTitle(a))\n .map((a: any) => ({\n title: this._normalizeAnswerTitle(a),\n ...(a.answerId ? { answerId: a.answerId } : {}),\n ...(a.customAnswerId ? { customAnswerId: a.customAnswerId } : {}),\n })),\n analysis,\n isSetCorrectAnswer: !!correct,\n isKey: this.isKey,\n examExpand: correct,\n examAnswerSettingBO: { isIgnoreCase, isInOrder, keywordCount },\n examRichTextContent: showRichText ? richText : '',\n }\n if (this.customId) { result.customId = this.customId }\n resolve(result)\n })\n }\n\n private _addAnswer() {\n if (this.isSave) { return }\n this._answers = [...this._answers, { title: '', tag: '', showInput: false }]\n }\n\n private _deleteAnswer(index: number) {\n if (this._answers.length < 2 || this.isSave) { return }\n this._answers = this._answers.filter((_, i) => i !== index)\n }\n\n private async _save(e?: Event) {\n e?.stopImmediatePropagation()\n try {\n const data = await this.toJSON()\n this._emit('save', data)\n }\n catch (err: any) {\n showToast(err.message)\n }\n }\n\n validate(): SubjectError[] {\n const errors: SubjectError[] = []\n const row = { customId: this.customId || undefined, answerType: 'text_fill', orderIndex: this.orderIndex }\n\n const title = this.isEdit ? this._title : this.title || ''\n const answers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const correct = this.isEdit ? this._correct : (this as any).examExpand || ''\n const keywordCount = this.isEdit ? this._keywordCount : this.examAnswerSetting?.keywordCount || 1\n\n if (!title) {\n errors.push(new SubjectError('题目标题不能为空!', 'EMPTY_TITLE', 'title', row))\n }\n if (keywordCount || correct) {\n if (!keywordCount) {\n errors.push(new SubjectError('请完善答题设置!', 'NO_KEYWORD_COUNT', 'keywordCount', row))\n }\n if (!correct) {\n errors.push(new SubjectError('请输入问题正确答案!', 'NO_CORRECT_ANSWER', 'correct', row))\n }\n if (answers.length !== keywordCount) {\n errors.push(new SubjectError('关键词个数设置有误!', 'KEYWORD_COUNT_MISMATCH', 'answers', row))\n }\n answers.forEach((item: any, i: number) => {\n if (!this._normalizeAnswerTitle(item)) {\n errors.push(new SubjectError(`关键词${i + 1}未设置`, 'KEYWORD_EMPTY', 'answers', row))\n }\n })\n }\n\n return errors\n }\n\n private _renderPreview() {\n const previewAnswers = this.isEdit ? this._answers : this._normalizedAnswerList(this.answerList || [])\n const previewCorrect = this.isEdit ? this._correct : (this.examExpand || '')\n return html`\n <div class=\"preview\">\n <span class=\"title\">${this.orderIndex + 1}.${this.title}(问答题)</span>\n ${this.richTextContent ? html`<div class=\"rich-text\" .innerHTML=${this.richTextContent}></div>` : ''}\n ${previewAnswers.some(a => a.title)\n ? html`\n <div style=\"margin-top:8px;color:#a8abb2\">\n ${previewAnswers.map((a, i) => a.title\n ? html`\n <span style=\"margin-right:10px\">关键词${i + 1}: ${a.title}</span>\n `\n : '')}\n </div>\n `\n : ''}\n ${previewCorrect ? html`<div style=\"margin-top:8px;color:#a8abb2\">正确答案:${previewCorrect}</div>` : ''}\n ${this.analysis ? html`<div style=\"color:#909399;font-size:12px;margin-top:8px\">解析: ${this.analysis}</div>` : ''}\n </div>\n `\n }\n\n private _renderEdit() {\n return html`\n <div class=\"flex-items-start\">\n <div class=\"label\"><span>题目:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._title} ?disabled=${this.isSave}\n maxlength=${this.TITLE_MAX}\n @input=${(e: Event) => this._onTitleInput(e)}\n placeholder=\"【问答题】请输入问题\"></textarea>\n <span class=\"char-counter\">${this._title.length}/${this.TITLE_MAX}</span>\n </div>\n </div>\n </div>\n\n ${this.showAnswerSetting\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>答题设置:</span></div>\n <div style=\"flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:8px\">\n <span style=\"font-size:13px;color:#606266\">共答对</span>\n <input type=\"number\" style=\"width:60px;height:24px;border:1px solid #dcdfe6;border-radius:3px;padding:0 8px;font-size:13px\"\n .value=${String(this._keywordCount)} min=\"1\"\n @change=${(e: Event) => { this._keywordCount = Number((e.target as HTMLInputElement).value) }} />\n <span style=\"font-size:13px;color:#606266\">个关键词,算是正确的</span>\n <label style=\"display:inline-flex;align-items:center;gap:4px;cursor:pointer;font-size:12px;color:#606266\">\n <input type=\"checkbox\" .checked=${this._isInOrder}\n @change=${(e: Event) => { this._isInOrder = (e.target as HTMLInputElement).checked }} />\n 答案不分顺序\n </label>\n <label style=\"display:inline-flex;align-items:center;gap:4px;cursor:pointer;font-size:12px;color:#606266\">\n <input type=\"checkbox\" .checked=${this._isIgnoreCase}\n @change=${(e: Event) => { this._isIgnoreCase = (e.target as HTMLInputElement).checked }} />\n 忽略大小写\n </label>\n </div>\n </div>\n `\n : ''}\n\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>答案:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._correct} ?disabled=${this.isSave}\n maxlength=\"200\"\n @input=${(e: Event) => { this._correct = (e.target as HTMLTextAreaElement).value }}\n placeholder=\"请输入正确答案\"></textarea>\n <span class=\"char-counter\">${this._correct.length}/200</span>\n </div>\n </div>\n </div>\n\n <div class=\"answer-list\" style=\"margin-top:12px\">\n <span style=\"padding-left:60px;font-size:12px;color:#909399\">*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'</span>\n ${this._answers.map((a, i) => html`\n <div class=\"answer-item\">\n <span class=\"label\">关键词${i + 1}:</span>\n <div class=\"answer-tags\" style=\"display:flex;flex-wrap:wrap;gap:5px;align-items:center;flex:1;max-width:360px\">\n ${a.title.split(',').filter(Boolean).map((tag) => {\n const c = TAG_COLORS[i % TAG_COLORS.length]; return html`\n <span style=\"display:inline-flex;align-items:center;background:${c.bg};color:${c.color};border:1px solid ${c.border};border-radius:3px;padding:2px 8px;font-size:12px;line-height:16px\">\n ${tag}\n ${!this.isSave ? html`<span style=\"cursor:pointer;margin-left:4px;color:#909399\" @click=${() => this._closeTag(tag, i)}>×</span>` : ''}\n </span>\n `\n })}\n ${!this.isSave\n ? html`\n ${a.showInput\n ? html`\n <input type=\"text\" style=\"width:80px;height:24px;border:1px solid #dcdfe6;border-radius:3px;padding:0 8px;font-size:12px\"\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === 'Enter') { this._addTag(i) }\n }}\n @input=${(e: Event) => { a.tag = (e.target as HTMLInputElement).value }}\n @blur=${() => this._addTag(i)} />\n <button class=\"el-link\" @click=${() => this._addTag(i)}>确认</button>\n `\n : html`\n <button class=\"link\" @click=${() => { this._answers = this._answers.map((x, j) => j === i ? { ...x, showInput: true } : x); this.updateComplete.then(() => { (this.shadowRoot?.querySelector(`input[style*=\"width:80px\"]`) as HTMLInputElement)?.focus() }) }}>\n ${a.title ? '添加同义词' : '添加关键词'}\n </button>\n `}\n `\n : ''}\n </div>\n <span class=\"icon ${this.isSave ? 'disabled' : ''}\" @click=${() => this._addAnswer()}>${this._iconPlus}</span>\n <span class=\"icon ${this.isSave || this._answers.length < 2 ? 'disabled' : ''}\" @click=${() => this._deleteAnswer(i)}>${this._iconRemove}</span>\n </div>\n `)}\n </div>\n\n ${this._showRichText\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>富文本:</span></div>\n <div style=\"flex:1\">\n <qxs-blocksuite-editor\n .content=${this._richText}\n .uploadImage=${this.uploadImage}\n ?is-edit=${true}\n ></qxs-blocksuite-editor>\n ${!this.showAction\n ? html`<div class=\"flex-justify-end\" style=\"margin-top:8px\"><span class=\"el-link danger\" @click=${() => { this._showRichText = false; this._richText = '' }}>删除富文本</span></div>`\n : ''}\n </div>\n </div>\n `\n : ''}\n\n ${this.showAnalysis\n ? html`\n <div class=\"flex-items-start\" style=\"margin-top:12px\">\n <div class=\"label\"><span>解析:</span></div>\n <div style=\"flex:1\">\n <div class=\"el-input\">\n <textarea rows=\"2\" .value=${this._analysis}\n @input=${(e: Event) => { this._analysis = (e.target as HTMLTextAreaElement).value }}\n placeholder=\"请输入题目解析\"></textarea>\n </div>\n </div>\n </div>\n `\n : ''}\n `\n }\n\n render() {\n return html`\n <qxs-subject-layout .showEdit=${this.isEdit}>\n <div slot=\"preview\">${this._renderPreview()}</div>\n <div slot=\"edit\">${this._renderEdit()}</div>\n ${this.showAction\n ? html`\n <qxs-subject-action\n .isEdit=${this.isEdit}\n .isSet=${this.isSet}\n .showAdd=${this.showAdd}\n .showRichText=${this._showRichText}\n exam-answer-relation-type=${this.examAnswerRelationType}\n @delete=${() => this._emit('delete')}\n @save=${this._save}\n @edit=${() => this._emit('edit')}\n @add=${(e: CustomEvent) => this._emit('add', e.detail)}\n @set-key=${(e: CustomEvent) => { this._emit('set-key', e.detail) }}\n @on-show-rich-text=${() => {\n this._showRichText = !this._showRichText\n if (!this._showRichText) {\n this._richText = ''\n }\n }}\n ></qxs-subject-action>\n `\n : ''}\n </qxs-subject-layout>\n `\n }\n}\n\nexport function register() {}\n"],"names":["TAG_COLORS","bg","color","border","QxsTextFill","LitElement","constructor","super","arguments","this","_iconPlus","html","_iconRemove","orderIndex","title","customId","isEdit","isSave","isSet","isKey","showAction","showAdd","showAnswerSetting","showAnalysis","richTextContent","analysis","examAnswerRelationType","examExpand","examAnswerSetting","isInOrder","isIgnoreCase","keywordCount","uploadImage","async","Promise","resolve","reject","reader","FileReader","onload","e","target","result","onerror","readAsDataURL","file","answerList","modelValue","useModel","_answers","tag","showInput","_title","_analysis","_isInOrder","_isIgnoreCase","_keywordCount","_correct","_showRichText","_richText","TITLE_MAX","willUpdate","changed","has","_syncProps","_normalizeAnswerTitle","answer","String","_normalizedAnswerList","source","length","undefined","Array","isArray","map","answerId","examAnswerId","a","customAnswerId","_emit","name","detail","dispatchEvent","CustomEvent","bubbles","composed","_onTitleInput","el","value","slice","_addTag","i","join","x","j","_closeTag","split","filter","t","toJSON","row","answerType","answers","correct","showRichText","richText","SubjectError","msg","forEach","item","push","SubjectType","TEXT_FILL","isSetCorrectAnswer","examAnswerSettingBO","examRichTextContent","_addAnswer","_deleteAnswer","index","_","_save","stopImmediatePropagation","data","err","document","createElement","textContent","Object","assign","style","position","top","left","transform","padding","borderRadius","fontSize","background","zIndex","boxShadow","transition","opacity","body","appendChild","setTimeout","remove","showToast","message","validate","errors","_renderPreview","previewAnswers","previewCorrect","some","_renderEdit","Number","checked","Boolean","c","key","updateComplete","then","shadowRoot","querySelector","focus","render","styles","css","__decorateClass","property","type","attribute","prototype","state","safeCustomElement"],"mappings":"gVAcA,MAAMA,EAAa,CACjB,CAAEC,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,WAC3C,CAAEF,GAAI,UAAWC,MAAO,UAAWC,OAAQ,YAiBhCC,QAAAA,YAAN,cAA0BC,EAAAA,WAA1BC,WAAAA,GAAAC,SAAAC,WACLC,KAAiBC,UAAYC,EAAAA,IAAA,2NAC7BF,KAAiBG,YAAcD,EAAAA,IAAA,qLA6FuBF,KAAAI,WAAa,EACvCJ,KAAAK,MAAQ,GACgBL,KAAAM,SAAW,GACZN,KAAAO,QAAS,EACTP,KAAAQ,QAAS,EACVR,KAAAS,OAAQ,EACRT,KAAAU,OAAQ,EACHV,KAAAW,YAAa,EAChBX,KAAAY,SAAU,EACCZ,KAAAa,mBAAoB,EAC1Bb,KAAAc,cAAe,EACZd,KAAAe,gBAAkB,GAClDf,KAAAgB,SAAW,G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AAAA,SAxIUzK,QAAAA,YAwIMwK,UAAA,YAAA,GAxINxK,QAAAA,YAANoK,EAAA,CADNM,EAAAA,kBAAkB,kBACN1K,QAAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qxs-bns/components-wc",
3
3
  "type": "module",
4
- "version": "0.0.22",
4
+ "version": "0.0.23",
5
5
  "description": "QXS Business Components - Web Components (framework agnostic)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://qxs-bns.pages.dev/guide/components-wc/",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "./all": {
42
42
  "types": "./types/index.d.ts",
43
- "import": "./es/entry-all.mjs",
44
- "require": "./lib/entry-all.cjs"
43
+ "import": "./es/index.mjs",
44
+ "require": "./lib/index.cjs"
45
45
  },
46
46
  "./es/*": {
47
47
  "types": "./types/*.d.ts",
package/es/entry-all.mjs DELETED
@@ -1,2 +0,0 @@
1
- export{QxsSubjectAction}from"./subject/action.mjs";export{QxsBlankFill}from"./subject/blank-fill.mjs";export{QxsSubjectLayout}from"./subject/layout.mjs";export{QxsSubjectList}from"./subject/list.mjs";export{QxsPageEnd}from"./subject/page-end.mjs";export{QxsScale}from"./subject/scale.mjs";export{QxsSubjectSingle}from"./subject/single.mjs";export{QxsTextFill}from"./subject/text-fill.mjs";export{QxsSubjectType}from"./subject/type.mjs";export{QxsBlocksuiteEditor}from"./editor/blocksuite-editor.mjs";export{register}from"./editor/index.mjs";
2
- //# sourceMappingURL=entry-all.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry-all.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class S{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const n=t=>new S("string"==typeof t?t:t+"",void 0,s),i=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),S=t.litNonce;void 0!==S&&o.setAttribute("nonce",S),o.textContent=e.cssText,s.appendChild(o)}},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return n(e)})(t):t;export{S as CSSResult,i as adoptStyles,l as getCompatibleStyle,e as supportsAdoptingStyleSheets,n as unsafeCSS};
7
- //# sourceMappingURL=css-tag.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css-tag.mjs","sources":["../../../../../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n"],"names":["t","globalThis","e","ShadowRoot","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","s","Symbol","o","WeakMap","n","constructor","this","_$cssResult$","Error","cssText","styleSheet","length","get","replaceSync","set","toString","r","S","adoptStyles","adoptedStyleSheets","map","document","createElement","litNonce","setAttribute","textContent","appendChild","c","cssRules"],"mappings":";;;;;AAMA,MAGMA,EAASC,WAKFC,EACXF,EAAOG,kBAAA,IACNH,EAAOI,UAA0BJ,EAAOI,SAASC,eAClD,uBAAwBC,SAASC,WACjC,YAAaC,cAAcD,UAkBvBE,EAAoBC,SAEpBC,EAAc,IAAIC,QAAA,MASXC,EAOXC,WAAAA,CACEd,EACAE,EACAS,GAEA,GAVFI,KAAeC,cAAA,EAUTL,IAAcF,EAChB,MAAUQ,MACR,qEAGJF,KAAKG,QAAUlB,EACfe,KAAKf,EAAWE,CAClB,CAIA,cAAAiB,GAGE,IAAInB,EAAae,KAAKJ,EACtB,MAAMF,EAAUM,KAAKf,EACrB,GAAIE,QAAA,IAA+BF,EAA0B,CAC3D,MAAME,WAAYO,GAA4C,IAAnBA,EAAQW,OAC/ClB,IACFF,EAAaW,EAAYU,IAAIZ,SAAA,IAE3BT,KACDe,KAAKJ,EAAcX,EAAa,IAAIQ,eAAiBc,YACpDP,KAAKG,SAEHhB,GACFS,EAAYY,IAAId,EAAST,GAG/B,CACA,OAAOA,CACT,CAEAwB,QAAAA,GACE,OAAOT,KAAKG,OACd,EAWF,MAsBaO,EAAazB,GACxB,IAAKa,EACc,iBAAVb,EAAqBA,EAAeA,EAAP,QAAA,EAEpCS,GAsCSiB,EAAcC,CACzBlB,EACAE,KAEA,GAAIT,EACDO,EAA0BmB,mBAAqBjB,EAAOkB,IAAK7B,GAC1DA,aAAaQ,cAAgBR,EAAIA,EAAEmB,iBAGrC,IAAK,MAAMjB,KAAKS,EAAQ,CACtB,MAAMA,EAAQmB,SAASC,cAAc,SAE/BlB,EAASb,EAAyBgC,cAAA,IACpCnB,GACFF,EAAMsB,aAAa,QAASpB,GAE9BF,EAAMuB,YAAehC,EAAgBgB,QACrCT,EAAW0B,YAAYxB,EACzB,GAYSyB,EACXlC,EAEKF,GAAyBA,EACzBA,GACCA,aAAaQ,cAbW,CAACR,IAC/B,IAAIE,EAAU,GACd,IAAK,MAAMO,KAAQT,EAAMqC,SACvBnC,GAAWO,EAAKS,QAElB,OAAOO,EAAUvB,EAAA,EALa,CAa6BF,GAAKA","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- import{notEqual as t,defaultConverter as e}from"../reactive-element.mjs";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const r={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},o=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,e=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;const{kind:a,metadata:n}=o;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===a&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===a){const{name:r}=o;return{set(o){const a=e.get.call(this);e.set.call(this,o),this.requestUpdate(r,a,t,!0,o)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===a){const{name:r}=o;return function(o){const a=this[r];e.call(this,o),this.requestUpdate(r,a,t,!0,o)}}throw Error("Unsupported decorator location: "+a)};function a(t){return(e,r)=>"object"==typeof r?o(t,e,r):((t,e,r)=>{const o=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),o?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}export{a as property,o as standardProperty};
7
- //# sourceMappingURL=property.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js"],"sourcesContent":["import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n"],"names":["o","attribute","type","String","converter","e","reflect","hasChanged","t","r","arguments","length","undefined","kind","n","metadata","i","s","globalThis","litPropertyMetadata","get","set","Map","Object","create","wrapped","name","call","this","requestUpdate","init","C","Error","hasOwnProperty","constructor","createProperty","getOwnPropertyDescriptor"],"mappings":";;;;;GAwEA,MAoBMA,EAAkD,CACtDC,WAAA,EACAC,KAAMC,OACNC,UAAWC,EACXC,SAAA,EACAC,WAAYC,GAaDC,EAAmB,WAG9B,IAFAD,EAAAE,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAA+BV,EAC/BK,EAAAK,UAAAC,OAAA,EAAAD,kBAAAE,EACAH,EAAAC,UAAAC,OAAA,EAAAD,kBAAAE,EAEA,MAAMC,KAACC,EAAIC,SAAEC,GAAYP,EAazB,IAAIQ,EAAaC,WAAWC,oBAAoBC,IAAIJ,GAUpD,QAAA,IATIC,GACFC,WAAWC,oBAAoBE,IAAIL,EAAWC,EAAa,IAAIK,KAEpD,WAATR,KACFN,EAAUe,OAAOC,OAAOhB,IAChBiB,SAAA,GAEVR,EAAWI,IAAIZ,EAAQiB,KAAMlB,GAEhB,aAATM,EAAqB,CAIvB,MAAMY,KAAC1B,GAAQS,EACf,MAAO,CACLY,GAAAA,CAA2BZ,GACzB,MAAMK,EACJT,EACAe,IAAIO,KAAKC,MACVvB,EAA8CgB,IAAIM,KACjDC,KACAnB,GAEFmB,KAAKC,cAAc7B,EAAMc,EAAUN,GAAA,EAAeC,EACpD,EACAqB,IAAAA,CAA4BzB,GAI1B,YAAA,IAHIA,GACFuB,KAAKG,EAAiB/B,OAAA,EAAiBQ,EAASH,GAE3CA,CACT,EAEJ,CAAO,GAAa,WAATS,EAAmB,CAC5B,MAAMY,KAAC1B,GAAQS,EACf,OAAO,SAAiCA,GACtC,MAAMK,EAAWc,KAAK5B,GACrBK,EAA8BsB,KAAKC,KAAMnB,GAC1CmB,KAAKC,cAAc7B,EAAMc,EAAUN,GAAA,EAAeC,EACpD,CACF,CACA,MAAUuB,MAAM,mCAAmClB,EAAA,EAmC/C,SAAUA,EAASN,GACvB,MAAO,CACLH,EAIAL,IAO2B,iBAAlBA,EACHS,EACED,EACAH,EAGAL,GAvJW,EACrBQ,EACAH,EACAL,KAEA,MAAMS,EAAiBJ,EAAM4B,eAAejC,GAO5C,OANCK,EAAM6B,YAAuCC,eAAenC,EAAMQ,GAM5DC,EACHc,OAAOa,yBAAyB/B,EAAOL,QAAA,CACvC,EAdiB,CA0JXQ,EACAH,EACAL,EAIZ","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- import{property as t}from"./property.mjs";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};
7
- //# sourceMappingURL=state.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js"],"sourcesContent":["import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n"],"names":["r","t","state","attribute"],"mappings":";;;;;GAwCM,SAAUA,EAAMA,GACpB,OAAOC,EAAS,IACXD,EAIHE,OAAA,EACAC,WAAA,GAEJ","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- import{getCompatibleStyle as t,adoptStyles as e}from"./css-tag.mjs";export{CSSResult,supportsAdoptingStyleSheets,unsafeCSS}from"./css-tag.mjs";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const{is:s,defineProperty:i,getOwnPropertyDescriptor:r,getOwnPropertyNames:o,getOwnPropertySymbols:n,getPrototypeOf:a}=Object,h=globalThis,l=h.trustedTypes,c=l?l.emptyScript:"",p=h.reactiveElementPolyfillSupport,d=(t,e)=>t,u={toAttribute(t,e){switch(e){case Boolean:t=t?c:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},f=(t,e)=>!s(t,e),E={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),h.litPropertyMetadata??=new WeakMap;class _ extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E;if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&i(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=r(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const r=i?.call(this);o?.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??E}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=a(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,e=[...o(t),...n(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)s.unshift(t(e))}else void 0!==e&&s.push(t(e));return s}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:u).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=i;const o=r.fromAttribute(e,t.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0;if(void 0!==t){const o=this.constructor;if(!1===i&&(r=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??f)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,s,i){let{useDefault:r,reflect:o,wrapped:n}=s;r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),!0!==n||void 0!==i)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[d("elementProperties")]=new Map,_[d("finalized")]=new Map,p?.({ReactiveElement:_}),(h.reactiveElementVersions??=[]).push("2.1.2");export{_ as ReactiveElement,e as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};
7
- //# sourceMappingURL=reactive-element.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactive-element.mjs","sources":["../../../../../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js"],"sourcesContent":["import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n"],"names":["is","i","defineProperty","e","getOwnPropertyDescriptor","h","getOwnPropertyNames","r","getOwnPropertySymbols","o","getPrototypeOf","n","Object","a","globalThis","c","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","d","JSCompiler_renameProperty","t","s","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","f","notEqual","b","attribute","type","String","converter","reflect","useDefault","hasChanged","Symbol","metadata","litPropertyMetadata","WeakMap","y","HTMLElement","addInitializer","this","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","arguments","length","undefined","state","prototype","hasOwnProperty","create","wrapped","elementProperties","set","noAccessor","getPropertyDescriptor","get","call","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","constructor","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","setAttribute","_$Ej","hasAttribute","C","_$EP","_ref","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions"],"mappings":";;;;;GA4CA,MAAMA,GACJC,EAAEC,eACFC,EAAcC,yBACdC,EAAwBC,oBACxBC,EAAmBC,sBACnBC,EAAqBC,eACrBC,GACEC,OAKEC,EAASC,WAUTC,EAAgBF,EACnBG,aAMGC,EAAiCF,EAClCA,EAAaG,YACd,GAEEC,EAEFN,EAAOO,+BAoGLC,EAA4BC,CAChCC,EACAC,IACMD,EA0KKE,EAA8C,CACzDC,WAAAA,CAAYH,EAAgBC,GAC1B,OAAQA,GACN,KAAKG,QACHJ,EAAQA,EAAQN,EAAiC,KACjD,MACF,KAAKL,OACL,KAAKgB,MAGHL,EAAiB,MAATA,EAAgBA,EAAQM,KAAKC,UAAUP,GAGnD,OAAOA,CACT,EAEAQ,aAAAA,CAAcR,EAAsBC,GAClC,IAAIvB,EAAqBsB,EACzB,OAAQC,GACN,KAAKG,QACH1B,EAAsB,OAAVsB,EACZ,MACF,KAAKS,OACH/B,EAAsB,OAAVsB,EAAiB,KAAOS,OAAOT,GAC3C,MACF,KAAKX,OACL,KAAKgB,MAIH,IAEE3B,EAAY4B,KAAKI,MAAMV,EACzB,OAASA,GACPtB,EAAY,IACd,EAGJ,OAAOA,CACT,GAWWiC,EAAuBC,CAACZ,EAAgBC,KAClDvB,EAAGsB,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AAa/G,GACrB,OAAA,CACF,CAWUkH,MAAAA,CAAOlH,GAIf4B,KAAK+E,OAA2B/E,KAAK+E,KAAuB5B,QAAS/E,GACnE4B,KAAKsE,KAAsBlG,EAAG4B,KAAK5B,KAErC4B,KAAKuF,MACP,CAYUI,OAAAA,CAAQvH,GAAqC,CAkB7CsH,YAAAA,CAAatH,GAAqC,EA7iCrDyB,EAAAiC,cAA0C,GAiT1CjC,EAAAmE,kBAAoC,CAAC8B,KAAM,QAiwBnDjG,EACC3B,EAA0B,sBACxB,IAAIwD,IACP7B,EACC3B,EAA0B,cACxB,IAAIwD,IAGR1D,IAAkB,CAAC+H,gBAAAlG,KAuClBnC,EAAOsI,0BAA4B,IAAI9F,KAAK","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{Placeholder as t}from"../../../../../@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs";var p=t;export{t as Placeholder,p as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extension-placeholder@3.19.0_@tiptap+extensions@3.19.0_@tiptap+core@3.19.0_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.js"],"sourcesContent":["// src/index.ts\nimport { Placeholder } from \"@tiptap/extensions\";\nimport { Placeholder as Placeholder2 } from \"@tiptap/extensions\";\nvar index_default = Placeholder;\nexport {\n Placeholder2 as Placeholder,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"names":["index_default","Placeholder"],"mappings":"+KAKA,IAAOA,EAAQC","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{Placeholder as t}from"../../../../../@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs";var p=t;export{t as Placeholder,p as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extension-placeholder@3.20.5_@tiptap+extensions@3.20.5_@tiptap+core@3.20.5_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.js"],"sourcesContent":["// src/index.ts\nimport { Placeholder } from \"@tiptap/extensions\";\nimport { Placeholder as Placeholder2 } from \"@tiptap/extensions\";\nvar index_default = Placeholder;\nexport {\n Placeholder2 as Placeholder,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"names":["index_default","Placeholder"],"mappings":"+KAKA,IAAOA,EAAQC","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{Extension as e,callOrReturn as t,getExtensionField as o,isNodeEmpty as r,isNodeSelection as s}from"@tiptap/core";import{Plugin as n,PluginKey as i}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{dropCursor as d}from"../../../../../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs";import{DecorationSet as a,Decoration as c}from"../../../../../prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs";import{gapCursor as l}from"../../../../../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs";import{history as p,redo as u,undo as h}from"../../../../../prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs";e.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){const e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc,o=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(o)}},addProseMirrorPlugins(){let e=!1;return[new n({key:new i("characterCount"),appendTransaction:(t,o,r)=>{if(e)return;const s=this.options.limit;if(null==s||0===s)return void(e=!0);const n=this.storage.characters({node:r.doc});if(n>s){const t=0,o=n-s,i=r.tr.deleteRange(t,o);return e=!0,i}e=!0},filterTransaction:(e,t)=>{const o=this.options.limit;if(!e.docChanged||0===o||null==o)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=o)return!0;if(r>o&&s>o&&s<=r)return!0;if(r>o&&s>o&&s>r)return!1;if(!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,i=n-(s-o),d=n;e.deleteRange(i,d);return!(this.storage.characters({node:e.doc})>o)}})]}}),e.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[d(this.options)]}}),e.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new n({key:new i("focus"),props:{decorations:e=>{let{doc:t,selection:o}=e;const{isEditable:r,isFocused:s}=this.editor,{anchor:n}=o,i=[];if(!r||!s)return a.create(t,[]);let d=0;"deepest"===this.options.mode&&t.descendants((e,t)=>{if(e.isText)return;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;d+=1});let l=0;return t.descendants((e,t)=>{if(e.isText)return!1;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&d-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;i.push(c.node(t,t+e.nodeSize,{class:this.options.className}))}),a.create(t,i)}}})]}}),e.create({name:"gapCursor",addProseMirrorPlugins:()=>[l()],extendNodeSchema(e){var r;const s={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(r=t(o(e,"allowGapCursor",s)))?r:null}}});var m="placeholder";function f(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var g=e.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:m,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${f(this.options.dataAttribute)}`:`data-${m}`;return[new n({key:new i("placeholder"),props:{decorations:t=>{let{doc:o,selection:s}=t;const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=s,d=[];if(!n)return null;const l=this.editor.isEmpty;return o.descendants((t,o)=>{const s=i>=o&&i<=o+t.nodeSize,n=!t.isLeaf&&r(t);if((s||!this.options.showOnlyCurrent)&&n){const r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);const n=c.node(o,o+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:o,hasAnchor:s}):this.options.placeholder});d.push(n)}return this.options.includeChildren}),a.create(o,d)}}})]}});function y(e){let{types:t,node:o}=e;return o&&Array.isArray(t)&&t.includes(o.type)||(null==o?void 0:o.type)===t}e.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new n({key:new i("selection"),props:{decorations:o=>o.selection.empty||e.isFocused||!e.isEditable||s(o.selection)||e.view.dragging?null:a.create(o.doc,[c.inline(o.selection.from,o.selection.to,{class:t.className})])}})]}}),e.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;const t=new i(this.name),o=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(e=>{let[,t]=e;return t}).filter(e=>(this.options.notAfter||[]).concat(o).includes(e.name));return[new n({key:t,appendTransaction:(e,r,s)=>{const{doc:n,tr:i,schema:d}=s,a=t.getState(s),c=n.content.size,l=d.nodes[o];if(a)return i.insert(c,l.create())},state:{init:(e,t)=>!y({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>{if(!e.docChanged)return t;if(e.getMeta("__uniqueIDTransaction"))return t;return!y({node:e.doc.lastChild,types:r})}}})]}}),e.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>e=>{let{state:t,dispatch:o}=e;return h(t,o)},redo:()=>e=>{let{state:t,dispatch:o}=e;return u(t,o)}}),addProseMirrorPlugins(){return[p(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});export{g as Placeholder,f as preparePlaceholderAttribute};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extensions@3.19.0_@tiptap+core@3.19.0_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5/node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["// src/character-count/character-count.ts\nimport { Extension } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nvar CharacterCount = Extension.create({\n name: \"characterCount\",\n addOptions() {\n return {\n limit: null,\n mode: \"textSize\",\n textCounter: (text) => text.length,\n wordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0\n };\n },\n onBeforeCreate() {\n this.storage.characters = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options == null ? void 0 : options.mode) || this.options.mode;\n if (mode === \"textSize\") {\n const text = node.textBetween(0, node.content.size, void 0, \" \");\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, \" \", \" \");\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey(\"characterCount\"),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === void 0 || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`\n );\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n if (newSize <= limit) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta(\"paste\");\n if (!isPaste) {\n return false;\n }\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n transaction.deleteRange(from, to);\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n }\n })\n ];\n }\n});\n\n// src/drop-cursor/drop-cursor.ts\nimport { Extension as Extension2 } from \"@tiptap/core\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nvar Dropcursor = Extension2.create({\n name: \"dropCursor\",\n addOptions() {\n return {\n color: \"currentColor\",\n width: 1,\n class: void 0\n };\n },\n addProseMirrorPlugins() {\n return [dropCursor(this.options)];\n }\n});\n\n// src/focus/focus.ts\nimport { Extension as Extension3 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nvar Focus = Extension3.create({\n name: \"focus\",\n addOptions() {\n return {\n className: \"has-focus\",\n mode: \"all\"\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin2({\n key: new PluginKey2(\"focus\"),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n let maxLevels = 0;\n if (this.options.mode === \"deepest\") {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1;\n if (outOfScope) {\n return this.options.mode === \"deepest\";\n }\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className\n })\n );\n });\n return DecorationSet.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/gap-cursor/gap-cursor.ts\nimport { callOrReturn, Extension as Extension4, getExtensionField } from \"@tiptap/core\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nvar Gapcursor = Extension4.create({\n name: \"gapCursor\",\n addProseMirrorPlugins() {\n return [gapCursor()];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) != null ? _a : null\n };\n }\n});\n\n// src/placeholder/placeholder.ts\nimport { Extension as Extension5, isNodeEmpty } from \"@tiptap/core\";\nimport { Plugin as Plugin3, PluginKey as PluginKey3 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration2, DecorationSet as DecorationSet2 } from \"@tiptap/pm/view\";\nvar DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\nfunction preparePlaceholderAttribute(attr) {\n return attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\nvar Placeholder = Extension5.create({\n name: \"placeholder\",\n addOptions() {\n return {\n emptyEditorClass: \"is-editor-empty\",\n emptyNodeClass: \"is-empty\",\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: \"Write something \\u2026\",\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false\n };\n },\n addProseMirrorPlugins() {\n const dataAttribute = this.options.dataAttribute ? `data-${preparePlaceholderAttribute(this.options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n return [\n new Plugin3({\n key: new PluginKey3(\"placeholder\"),\n props: {\n decorations: ({ doc, selection }) => {\n const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;\n const { anchor } = selection;\n const decorations = [];\n if (!active) {\n return null;\n }\n const isEmptyDoc = this.editor.isEmpty;\n doc.descendants((node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n const isEmpty = !node.isLeaf && isNodeEmpty(node);\n if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {\n const classes = [this.options.emptyNodeClass];\n if (isEmptyDoc) {\n classes.push(this.options.emptyEditorClass);\n }\n const decoration = Decoration2.node(pos, pos + node.nodeSize, {\n class: classes.join(\" \"),\n [dataAttribute]: typeof this.options.placeholder === \"function\" ? this.options.placeholder({\n editor: this.editor,\n node,\n pos,\n hasAnchor\n }) : this.options.placeholder\n });\n decorations.push(decoration);\n }\n return this.options.includeChildren;\n });\n return DecorationSet2.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/selection/selection.ts\nimport { Extension as Extension6, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin as Plugin4, PluginKey as PluginKey4 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration3, DecorationSet as DecorationSet3 } from \"@tiptap/pm/view\";\nvar Selection = Extension6.create({\n name: \"selection\",\n addOptions() {\n return {\n className: \"selection\"\n };\n },\n addProseMirrorPlugins() {\n const { editor, options } = this;\n return [\n new Plugin4({\n key: new PluginKey4(\"selection\"),\n props: {\n decorations(state) {\n if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) {\n return null;\n }\n return DecorationSet3.create(state.doc, [\n Decoration3.inline(state.selection.from, state.selection.to, {\n class: options.className\n })\n ]);\n }\n }\n })\n ];\n }\n});\n\n// src/trailing-node/trailing-node.ts\nimport { Extension as Extension7 } from \"@tiptap/core\";\nimport { Plugin as Plugin5, PluginKey as PluginKey5 } from \"@tiptap/pm/state\";\nfunction nodeEqualsType({ types, node }) {\n return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;\n}\nvar TrailingNode = Extension7.create({\n name: \"trailingNode\",\n addOptions() {\n return {\n node: void 0,\n notAfter: []\n };\n },\n addProseMirrorPlugins() {\n var _a;\n const plugin = new PluginKey5(this.name);\n const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || \"paragraph\";\n const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n return [\n new Plugin5({\n key: plugin,\n appendTransaction: (_, __, state) => {\n const { doc, tr, schema } = state;\n const shouldInsertNodeAtEnd = plugin.getState(state);\n const endPosition = doc.content.size;\n const type = schema.nodes[defaultNode];\n if (!shouldInsertNodeAtEnd) {\n return;\n }\n return tr.insert(endPosition, type.create());\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value;\n }\n if (tr.getMeta(\"__uniqueIDTransaction\")) {\n return value;\n }\n const lastNode = tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n }\n }\n })\n ];\n }\n});\n\n// src/undo-redo/undo-redo.ts\nimport { Extension as Extension8 } from \"@tiptap/core\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\nvar UndoRedo = Extension8.create({\n name: \"undoRedo\",\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n }\n };\n },\n addProseMirrorPlugins() {\n return [history(this.options)];\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-z\": () => this.editor.commands.undo(),\n \"Shift-Mod-z\": () => this.editor.commands.redo(),\n \"Mod-y\": () => this.editor.commands.redo(),\n // Russian keyboard layouts\n \"Mod-\\u044F\": () => this.editor.commands.undo(),\n \"Shift-Mod-\\u044F\": () => this.editor.commands.redo()\n };\n }\n});\nexport {\n CharacterCount,\n Dropcursor,\n Focus,\n Gapcursor,\n Placeholder,\n Selection,\n TrailingNode,\n UndoRedo,\n preparePlaceholderAttribute\n};\n//# sourceMappingURL=index.js.map"],"names":["Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"qvBA2D8BA,EAAUC,OAAqD,CAC3FC,KAAM,i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C,EAAarB,KAC/B,MAAMlB,EAAQa,KAAKE,QAAQf,MAG3B,IAAKuC,EAAYC,YAAwB,IAAVxC,GAA3B,MAA0CA,EAC5C,OAAO,EAGT,MAAMyC,EAAU5B,KAAKC,QAAQJ,WAAW,CAAEM,KAAME,EAAMC,MAChDuB,EAAU7B,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAG5D,GAAIuB,GAAW1C,EACb,OAAO,EAIT,GAAIyC,EAAUzC,GAAS0C,EAAU1C,GAAS0C,GAAWD,EACnD,OAAO,EAIT,GAAIA,EAAUzC,GAAS0C,EAAU1C,GAAS0C,EAAUD,EAClD,OAAO,EAMT,IAHgBF,EAAYI,QAAQ,SAIlC,OAAO,EAIT,MAAMC,EAAML,EAAYM,UAAUC,MAAMF,IAElCV,EAAOU,GADAF,EAAU1C,GAEjBmC,EAAKS,EAIXL,EAAYF,YAAYH,EAAMC,GAQ9B,QAFoBtB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAE9CnB,MAQ1B","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{Extension as e,callOrReturn as t,getExtensionField as o,isNodeEmpty as r,isNodeSelection as s}from"@tiptap/core";import{Plugin as n,PluginKey as i}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{dropCursor as d}from"../../../../../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs";import{DecorationSet as a,Decoration as c}from"../../../../../prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs";import{gapCursor as l}from"../../../../../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs";import{history as p,redo as u,undo as h}from"../../../../../prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs";e.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){const e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc,o=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(o)}},addProseMirrorPlugins(){let e=!1;return[new n({key:new i("characterCount"),appendTransaction:(t,o,r)=>{if(e)return;const s=this.options.limit;if(null==s||0===s)return void(e=!0);const n=this.storage.characters({node:r.doc});if(n>s){const t=0,o=n-s,i=r.tr.deleteRange(t,o);return e=!0,i}e=!0},filterTransaction:(e,t)=>{const o=this.options.limit;if(!e.docChanged||0===o||null==o)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=o)return!0;if(r>o&&s>o&&s<=r)return!0;if(r>o&&s>o&&s>r)return!1;if(!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,i=n-(s-o),d=n;e.deleteRange(i,d);return!(this.storage.characters({node:e.doc})>o)}})]}}),e.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[d(this.options)]}}),e.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new n({key:new i("focus"),props:{decorations:e=>{let{doc:t,selection:o}=e;const{isEditable:r,isFocused:s}=this.editor,{anchor:n}=o,i=[];if(!r||!s)return a.create(t,[]);let d=0;"deepest"===this.options.mode&&t.descendants((e,t)=>{if(e.isText)return;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;d+=1});let l=0;return t.descendants((e,t)=>{if(e.isText)return!1;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&d-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;i.push(c.node(t,t+e.nodeSize,{class:this.options.className}))}),a.create(t,i)}}})]}}),e.create({name:"gapCursor",addProseMirrorPlugins:()=>[l()],extendNodeSchema(e){var r;const s={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(r=t(o(e,"allowGapCursor",s)))?r:null}}});var m="placeholder";function f(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var g=e.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:m,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${f(this.options.dataAttribute)}`:`data-${m}`;return[new n({key:new i("placeholder"),props:{decorations:t=>{let{doc:o,selection:s}=t;const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=s,d=[];if(!n)return null;const l=this.editor.isEmpty;return o.descendants((t,o)=>{const s=i>=o&&i<=o+t.nodeSize,n=!t.isLeaf&&r(t);if(!t.type.isTextblock)return this.options.includeChildren;if((s||!this.options.showOnlyCurrent)&&n){const r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);const n=c.node(o,o+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:o,hasAnchor:s}):this.options.placeholder});d.push(n)}return this.options.includeChildren}),a.create(o,d)}}})]}});e.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new n({key:new i("selection"),props:{decorations:o=>o.selection.empty||e.isFocused||!e.isEditable||s(o.selection)||e.view.dragging?null:a.create(o.doc,[c.inline(o.selection.from,o.selection.to,{class:t.className})])}})]}});var y="skipTrailingNode";function w(e){let{types:t,node:o}=e;return o&&Array.isArray(t)&&t.includes(o.type)||(null==o?void 0:o.type)===t}e.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;const t=new i(this.name),o=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(e=>{let[,t]=e;return t}).filter(e=>(this.options.notAfter||[]).concat(o).includes(e.name));return[new n({key:t,appendTransaction:(e,r,s)=>{const{doc:n,tr:i,schema:d}=s,a=t.getState(s),c=n.content.size,l=d.nodes[o];if(!e.some(e=>e.getMeta(y))&&a)return i.insert(c,l.create())},state:{init:(e,t)=>!w({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>{if(!e.docChanged)return t;if(e.getMeta("__uniqueIDTransaction"))return t;return!w({node:e.doc.lastChild,types:r})}}})]}}),e.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>e=>{let{state:t,dispatch:o}=e;return h(t,o)},redo:()=>e=>{let{state:t,dispatch:o}=e;return u(t,o)}}),addProseMirrorPlugins(){return[p(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});export{g as Placeholder,f as preparePlaceholderAttribute,y as skipTrailingNodeMeta};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extensions@3.20.5_@tiptap+core@3.20.5_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5/node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["// src/character-count/character-count.ts\nimport { Extension } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nvar CharacterCount = Extension.create({\n name: \"characterCount\",\n addOptions() {\n return {\n limit: null,\n mode: \"textSize\",\n textCounter: (text) => text.length,\n wordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0\n };\n },\n onBeforeCreate() {\n this.storage.characters = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options == null ? void 0 : options.mode) || this.options.mode;\n if (mode === \"textSize\") {\n const text = node.textBetween(0, node.content.size, void 0, \" \");\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, \" \", \" \");\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey(\"characterCount\"),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === void 0 || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`\n );\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n if (newSize <= limit) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta(\"paste\");\n if (!isPaste) {\n return false;\n }\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n transaction.deleteRange(from, to);\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n }\n })\n ];\n }\n});\n\n// src/drop-cursor/drop-cursor.ts\nimport { Extension as Extension2 } from \"@tiptap/core\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nvar Dropcursor = Extension2.create({\n name: \"dropCursor\",\n addOptions() {\n return {\n color: \"currentColor\",\n width: 1,\n class: void 0\n };\n },\n addProseMirrorPlugins() {\n return [dropCursor(this.options)];\n }\n});\n\n// src/focus/focus.ts\nimport { Extension as Extension3 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nvar Focus = Extension3.create({\n name: \"focus\",\n addOptions() {\n return {\n className: \"has-focus\",\n mode: \"all\"\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin2({\n key: new PluginKey2(\"focus\"),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n let maxLevels = 0;\n if (this.options.mode === \"deepest\") {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1;\n if (outOfScope) {\n return this.options.mode === \"deepest\";\n }\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className\n })\n );\n });\n return DecorationSet.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/gap-cursor/gap-cursor.ts\nimport { callOrReturn, Extension as Extension4, getExtensionField } from \"@tiptap/core\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nvar Gapcursor = Extension4.create({\n name: \"gapCursor\",\n addProseMirrorPlugins() {\n return [gapCursor()];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) != null ? _a : null\n };\n }\n});\n\n// src/placeholder/placeholder.ts\nimport { Extension as Extension5, isNodeEmpty } from \"@tiptap/core\";\nimport { Plugin as Plugin3, PluginKey as PluginKey3 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration2, DecorationSet as DecorationSet2 } from \"@tiptap/pm/view\";\nvar DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\nfunction preparePlaceholderAttribute(attr) {\n return attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\nvar Placeholder = Extension5.create({\n name: \"placeholder\",\n addOptions() {\n return {\n emptyEditorClass: \"is-editor-empty\",\n emptyNodeClass: \"is-empty\",\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: \"Write something \\u2026\",\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false\n };\n },\n addProseMirrorPlugins() {\n const dataAttribute = this.options.dataAttribute ? `data-${preparePlaceholderAttribute(this.options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n return [\n new Plugin3({\n key: new PluginKey3(\"placeholder\"),\n props: {\n decorations: ({ doc, selection }) => {\n const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;\n const { anchor } = selection;\n const decorations = [];\n if (!active) {\n return null;\n }\n const isEmptyDoc = this.editor.isEmpty;\n doc.descendants((node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n const isEmpty = !node.isLeaf && isNodeEmpty(node);\n if (!node.type.isTextblock) {\n return this.options.includeChildren;\n }\n if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {\n const classes = [this.options.emptyNodeClass];\n if (isEmptyDoc) {\n classes.push(this.options.emptyEditorClass);\n }\n const decoration = Decoration2.node(pos, pos + node.nodeSize, {\n class: classes.join(\" \"),\n [dataAttribute]: typeof this.options.placeholder === \"function\" ? this.options.placeholder({\n editor: this.editor,\n node,\n pos,\n hasAnchor\n }) : this.options.placeholder\n });\n decorations.push(decoration);\n }\n return this.options.includeChildren;\n });\n return DecorationSet2.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/selection/selection.ts\nimport { Extension as Extension6, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin as Plugin4, PluginKey as PluginKey4 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration3, DecorationSet as DecorationSet3 } from \"@tiptap/pm/view\";\nvar Selection = Extension6.create({\n name: \"selection\",\n addOptions() {\n return {\n className: \"selection\"\n };\n },\n addProseMirrorPlugins() {\n const { editor, options } = this;\n return [\n new Plugin4({\n key: new PluginKey4(\"selection\"),\n props: {\n decorations(state) {\n if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) {\n return null;\n }\n return DecorationSet3.create(state.doc, [\n Decoration3.inline(state.selection.from, state.selection.to, {\n class: options.className\n })\n ]);\n }\n }\n })\n ];\n }\n});\n\n// src/trailing-node/trailing-node.ts\nimport { Extension as Extension7 } from \"@tiptap/core\";\nimport { Plugin as Plugin5, PluginKey as PluginKey5 } from \"@tiptap/pm/state\";\nvar skipTrailingNodeMeta = \"skipTrailingNode\";\nfunction nodeEqualsType({ types, node }) {\n return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;\n}\nvar TrailingNode = Extension7.create({\n name: \"trailingNode\",\n addOptions() {\n return {\n node: void 0,\n notAfter: []\n };\n },\n addProseMirrorPlugins() {\n var _a;\n const plugin = new PluginKey5(this.name);\n const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || \"paragraph\";\n const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n return [\n new Plugin5({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state;\n const shouldInsertNodeAtEnd = plugin.getState(state);\n const endPosition = doc.content.size;\n const type = schema.nodes[defaultNode];\n if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) {\n return;\n }\n if (!shouldInsertNodeAtEnd) {\n return;\n }\n return tr.insert(endPosition, type.create());\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value;\n }\n if (tr.getMeta(\"__uniqueIDTransaction\")) {\n return value;\n }\n const lastNode = tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n }\n }\n })\n ];\n }\n});\n\n// src/undo-redo/undo-redo.ts\nimport { Extension as Extension8 } from \"@tiptap/core\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\nvar UndoRedo = Extension8.create({\n name: \"undoRedo\",\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n }\n };\n },\n addProseMirrorPlugins() {\n return [history(this.options)];\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-z\": () => this.editor.commands.undo(),\n \"Shift-Mod-z\": () => this.editor.commands.redo(),\n \"Mod-y\": () => this.editor.commands.redo(),\n // Russian keyboard layouts\n \"Mod-\\u044F\": () => this.editor.commands.undo(),\n \"Shift-Mod-\\u044F\": () => this.editor.commands.redo()\n };\n }\n});\nexport {\n CharacterCount,\n Dropcursor,\n Focus,\n Gapcursor,\n Placeholder,\n Selection,\n TrailingNode,\n UndoRedo,\n preparePlaceholderAttribute,\n skipTrailingNodeMeta\n};\n//# sourceMappingURL=index.js.map"],"names":["Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"qvBA2D8BA,EAAUC,OAAqD,CAC3FC,KAAM,iBAENC,WAAAA,KACS,CACLC,MAAO,KACPC,KAAM,WACNC,YAAaC,GAAQA,EAAKC,OAC1BC,YAAaF,GAAQA,EAAKG,MAAM,KAAKC,OAAOC,GAAiB,KAATA,GAAaJ,SAIrEK,WAAAA,KACS,CACLC,WAAYA,IAAM,EAClBC,MAAOA,IAAM,IAIjBC,cAAAA,GACEC,KAAKC,QAAQJ,WAAaK,IACxB,MAAMC,GAAO,MAAAD,OAAA,EAAAA,EAASC,OAAQH,KAAKI,OAAOC,MAAMC,IAGhD,GAAa,eAFA,MAAAJ,OAAA,EAAAA,EAASd,OAAQY,KAAKE,QAAQd,MAElB,CACvB,MAAME,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,UAAM,EAAW,KAE/D,OAAOT,KAAKE,QAAQb,YAAYC,EAClC,CAEA,OAAOa,EAAKO,UAGdV,KAAKC,QAAQH,MAAQI,IACnB,MAAMC,GAAO,MAAAD,OAAA,EAAAA,EAASC,OAAQH,KAAKI,OAAOC,MAAMC,IAC1ChB,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,KAAM,IAAK,KAEzD,OAAOT,KAAKE,QAAQV,YAAYF,GAEpC,EAEAqB,qBAAAA,GACE,IAAIC,GAAwB,EAE5B,MAAO,CACL,IAAIC,EAAO,CACTC,IAAK,IAAIC,EAAU,kBACnBC,kBAAmBA,CAACC,EAAcC,EAAUC,KAC1C,GAAIP,EACF,OAGF,MAAMzB,EAAQa,KAAKE,QAAQf,MAE3B,GAAIA,SAAmD,IAAVA,EAE3C,YADAyB,GAAwB,GAI1B,MAAMQ,EAAqBpB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMgB,EAASb,MAEpE,GAAIc,EAAqBjC,EAAO,CAC9B,MACMkC,EAAO,EACPC,EAFOF,EAAqBjC,EAO5BoC,EAAKJ,EAASI,GAAGC,YAAYH,EAAMC,GAGzC,OADAV,GAAwB,EACjBW,CACT,CAEAX,GAAwB,GAE1Ba,kBAAmBA,CAACC,EAAarB,KAC/B,MAAMlB,EAAQa,KAAKE,QAAQf,MAG3B,IAAKuC,EAAYC,YAAwB,IAAVxC,GAA3B,MAA0CA,EAC5C,OAAO,EAGT,MAAMyC,EAAU5B,KAAKC,QAAQJ,WAAW,CAAEM,KAAME,EAAMC,MAChDuB,EAAU7B,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAG5D,GAAIuB,GAAW1C,EACb,OAAO,EAIT,GAAIyC,EAAUzC,GAAS0C,EAAU1C,GAAS0C,GAAWD,EACnD,OAAO,EAIT,GAAIA,EAAUzC,GAAS0C,EAAU1C,GAAS0C,EAAUD,EAClD,OAAO,EAMT,IAHgBF,EAAYI,QAAQ,SAIlC,OAAO,EAIT,MAAMC,EAAML,EAAYM,UAAUC,MAAMF,IAElCV,EAAOU,GADAF,EAAU1C,GAEjBmC,EAAKS,EAIXL,EAAYF,YAAYH,EAAMC,GAQ9B,QAFoBtB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAE9CnB,MAQ1B","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- import{_$LH as e}from"./lit-html.mjs";
2
- /**
3
- * @license
4
- * Copyright 2020 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const{I:t}=e,o=e=>e,n=()=>document.createComment(""),i=(e,i,r)=>{const A=e._$AA.parentNode,s=void 0===i?e._$AB:i._$AA;if(void 0===r){const o=A.insertBefore(n(),s),i=A.insertBefore(n(),s);r=new t(o,i,e,e.options)}else{const t=r._$AB.nextSibling,n=r._$AM,i=n!==e;if(i){let t;r._$AQ?.(e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==n._$AU&&r._$AP(t)}if(t!==s||i){let e=r._$AA;for(;e!==t;){const t=o(e).nextSibling;o(A).insertBefore(e,s),e=t}}}return r},r=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return e._$AI(t,o),e},A={},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;return e._$AH=t},$=e=>e._$AH,_=e=>{e._$AR(),e._$AA.remove()};export{$ as getCommittedValue,i as insertPart,_ as removePart,r as setChildPartValue,s as setCommittedValue};
7
- //# sourceMappingURL=directive-helpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directive-helpers.mjs","sources":["../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.js"],"sourcesContent":["import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>o,n=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,e={HTML:1,SVG:2,MATHML:3},l=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,d=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,f=o=>o?._$litDirective$,r=o=>void 0===o.strings,s=()=>document.createComment(\"\"),v=(o,n,e)=>{const l=o._$AA.parentNode,d=void 0===n?o._$AB:n._$AA;if(void 0===e){const i=l.insertBefore(s(),d),n=l.insertBefore(s(),d);e=new t(i,n,o,o.options)}else{const t=e._$AB.nextSibling,n=e._$AM,c=n!==o;if(c){let t;e._$AQ?.(o),e._$AM=o,void 0!==e._$AP&&(t=o._$AU)!==n._$AU&&e._$AP(t)}if(t!==d||c){let o=e._$AA;for(;o!==t;){const t=i(o).nextSibling;i(l).insertBefore(o,d),o=t}}}return e},u=(o,t,i=o)=>(o._$AI(t,i),o),m={},p=(o,t=m)=>o._$AH=t,M=o=>o._$AH,h=o=>{o._$AR(),o._$AA.remove()},j=o=>{o._$AR()};export{e as TemplateResultType,j as clearPart,M as getCommittedValue,f as getDirectiveClass,v as insertPart,d as isCompiledTemplateResult,c as isDirectiveResult,n as isPrimitive,r as isSingleExpression,l as isTemplateResult,h as removePart,u as setChildPartValue,p as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n"],"names":["I","t","o","i","s","createMarker","document","createComment","v","insertPart","n","e","l","_$AA","parentNode","d","_$AB","insertBefore","options","nextSibling","_$AM","c","_$AQ","_$AP","_$AU","u","arguments","length","undefined","_$AI","m","p","_$AH","M","h","_$AR","remove"],"mappings":";;;;;GAsBA,MAAOA,EAAYC,GAAaC,EAM1BC,EAKCD,GAAeA,EAyEhBE,EAAeC,IAAMC,SAASC,cAAc,IAcrCC,EAAaC,CACxBP,EACAQ,EACAC,KAEA,MAAMC,EAAiBV,EAAcW,KAAaC,WAE5CC,OAAA,IACJL,EAAwBR,EAAcc,KAAYN,EAAQG,KAE5D,QAAA,IAAIF,EAAoB,CACtB,MAAMR,EAAiBS,EAAWK,aAAab,IAAgBW,GACzDL,EAAeE,EAAWK,aAAab,IAAgBW,GAC7DJ,EAAO,IAAIV,EACTE,EACAO,EACAR,EACAA,EAAcgB,QAElB,KAAO,CACL,MAAMjB,EAAeU,EAAKK,KAAYG,YAChCT,EAAYC,EAAKS,KACjBC,EAAgBX,IAAcR,EACpC,GAAImB,EAAe,CAUjB,IAAIpB,EATJU,EAAKW,OAA4BpB,GAKjCS,EAAKS,KAAWlB,OAAA,IAMdS,EAAKY,OACJtB,EAAqBC,EAAcsB,QAClCd,EAAWc,MAEbb,EAAKY,KAA0BtB,EAEnC,CACA,GAAIA,IAAYc,GAAWM,EAAe,CACxC,IAAInB,EAAqBS,EAAKE,KAC9B,KAAOX,IAAUD,GAAS,CACxB,MAAMA,EAAiBE,EAAKD,GAAQiB,YACpChB,EAAKS,GAAWK,aAAaf,EAAQa,GACrCb,EAAQD,CACV,CACF,CACF,CAEA,OAAOU,GAmBIc,EAAoB,SAC/BvB,EACAD,GAAA,IACAE,EAAAuB,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAmCxB,EAAA,OAEnCA,EAAK2B,KAAW5B,EAAOE,GAChBD,CAAA,EAKH4B,EAAc,CAAA,EAaPC,EAAoB,SAAC7B,GAAA,IAAYD,EAAAyB,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAiBI,EAAA,OAC5D5B,EAAK8B,KAAmB/B,CAAA,EAgBdgC,EAAqB/B,GAAoBA,EAAK8B,KAY9CE,EAAchC,IACzBA,EAAKiC,OACLjC,EAAKW,KAAYuB","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t={CHILD:2},r=t=>function(){for(var r=arguments.length,e=new Array(r),i=0;i<r;i++)e[i]=arguments[i];return{_$litDirective$:t,values:e}};class e{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,e){this._$Ct=t,this._$AM=r,this._$Ci=e}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}}export{e as Directive,t as PartType,r as directive};
7
- //# sourceMappingURL=directive.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directive.mjs","sources":["../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.js"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n"],"names":["t","CHILD","e","_len","arguments","length","Array","_key","_$litDirective$","values","i","constructor","_$AU","this","_$AM","_$AT","_$Ct","_$Ci","_$AS","update","render"],"mappings":";;;;;AA0CO,MAAMA,EAAW,CAEtBC,MAAO,GAwCIC,EACgBF,GAC3B,WAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAIH,EAAA,IAAAI,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAAL,EAAAK,GAAAH,UAAAG,GAAA,MAA4C,CAE9CC,gBAAqBR,EACrBS,OAAAP,EAAA,EAAA,MAQkBQ,EAkBpBC,WAAAA,CAAYX,GAAsB,CAGlC,QAAAY,GACE,OAAOC,KAAKC,KAASF,IACvB,CAGAG,IAAAA,CACEf,EACAE,EACAQ,GAEAG,KAAKG,KAAShB,EACda,KAAKC,KAAWZ,EAChBW,KAAKI,KAAmBP,CAC1B,CAEAQ,IAAAA,CAAUlB,EAAYE,GACpB,OAAOW,KAAKM,OAAOnB,EAAME,EAC3B,CAIAiB,MAAAA,CAAOnB,EAAaE,GAClB,OAAOW,KAAKO,UAAUlB,EACxB","x_google_ignoreList":[0]}
@@ -1,7 +0,0 @@
1
- import{noChange as e}from"../lit-html.mjs";import{directive as t,Directive as s,PartType as r}from"../directive.mjs";import{getCommittedValue as l,setChildPartValue as i,insertPart as o,removePart as n,setCommittedValue as a}from"../directive-helpers.mjs";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const u=(e,t,s)=>{const r=new Map;for(let l=t;l<=s;l++)r.set(e[l],l);return r},f=t(class extends s{constructor(e){if(super(e),e.type!==r.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,s){let r;void 0===s?s=t:void 0!==t&&(r=t);const l=[],i=[];let o=0;for(const t of e)l[o]=r?r(t,o):o,i[o]=s(t,o),o++;return{values:i,keys:l}}render(e,t,s){return this.dt(e,t,s).values}update(t,s){let[r,f,c]=s;const d=l(t),{values:m,keys:h}=this.dt(r,f,c);if(!Array.isArray(d))return this.ut=h,m;const p=this.ut??=[],v=[];let y,g,C=0,x=d.length-1,P=0,j=m.length-1;for(;C<=x&&P<=j;)if(null===d[C])C++;else if(null===d[x])x--;else if(p[C]===h[P])v[P]=i(d[C],m[P]),C++,P++;else if(p[x]===h[j])v[j]=i(d[x],m[j]),x--,j--;else if(p[C]===h[j])v[j]=i(d[C],m[j]),o(t,v[j+1],d[C]),C++,j--;else if(p[x]===h[P])v[P]=i(d[x],m[P]),o(t,d[C],d[x]),x--,P++;else if(void 0===y&&(y=u(h,P,j),g=u(p,C,x)),y.has(p[C]))if(y.has(p[x])){const e=g.get(h[P]),s=void 0!==e?d[e]:null;if(null===s){const e=o(t,d[C]);i(e,m[P]),v[P]=e}else v[P]=i(s,m[P]),o(t,d[C],s),d[e]=null;P++}else n(d[x]),x--;else n(d[C]),C++;for(;P<=j;){const e=o(t,v[j+1]);i(e,m[P]),v[P++]=e}for(;C<=x;){const e=d[C++];null!==e&&n(e)}return this.ut=h,a(t,v),e}});export{f as repeat};
7
- //# sourceMappingURL=repeat.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"repeat.mjs","sources":["../../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js"],"sourcesContent":["import{noChange as e}from\"../lit-html.js\";import{directive as s,Directive as t,PartType as r}from\"../directive.js\";import{getCommittedValue as l,setChildPartValue as o,insertPart as i,removePart as n,setCommittedValue as f}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=s(class extends t{constructor(e){if(super(e),e.type!==r.CHILD)throw Error(\"repeat() can only be used in text expressions\")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=l(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v=[];let m,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v[k]=o(d[x],p[k]),x++,k++;else if(h[j]===a[w])v[w]=o(d[j],p[w]),j--,w--;else if(h[x]===a[w])v[w]=o(d[x],p[w]),i(s,v[w+1],d[x]),x++,w--;else if(h[j]===a[k])v[k]=o(d[j],p[k]),i(s,d[x],d[j]),j--,k++;else if(void 0===m&&(m=u(a,k,w),y=u(h,x,j)),m.has(h[x]))if(m.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=i(s,d[x]);o(e,p[k]),v[k]=e}else v[k]=o(t,p[k]),i(s,d[x],t),d[e]=null;k++}else n(d[j]),j--;else n(d[x]),x++;for(;k<=w;){const e=i(s,v[w+1]);o(e,p[k]),v[k++]=e}for(;x<=j;){const e=d[x++];null!==e&&n(e)}return this.ut=a,f(s,v),e}});export{c as repeat};\n//# sourceMappingURL=repeat.js.map\n"],"names":["u","generateMap","e","s","t","r","Map","l","set","c","constructor","super","type","CHILD","Error","dt","o","i","values","keys","render","this","update","_ref","d","p","a","Array","isArray","ut","h","v","m","y","x","j","length","k","w","has","get","n","f"],"mappings":";;;;;GAsBA,MAAMA,EAAcC,CAACC,EAAiBC,EAAeC,KACnD,MAAMC,EAAM,IAAIC,IAChB,IAAK,IAAIC,EAAIJ,EAAOI,GAAKH,EAAKG,IAC5BF,EAAIG,IAA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