@templatical/editor 0.59.1 → 0.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-CwyKz_9U.js → AiAltTextPopover-BhWHOOKX.js} +3 -3
- package/dist/{AiAltTextReview-DNFnR1PN.js → AiAltTextReview-CmW7pLmo.js} +3 -3
- package/dist/{AiChatPanel-DWWVvJIP.js → AiChatPanel-CV0mCtad.js} +2 -2
- package/dist/{AiPanels-CESbBB63.js → AiPanels-C8M7q_vM.js} +1 -1
- package/dist/{AiRewriteMenu-DH6j1jOA.js → AiRewriteMenu-DC2ZLH5L.js} +7 -7
- package/dist/{BlockIssueBadge-3k568_Od.js → BlockIssueBadge-B8sl9BM1.js} +2 -2
- package/dist/{BlockPreviewCanvas-BLJxLwTT.js → BlockPreviewCanvas-yhOQAQhJ.js} +22 -18
- package/dist/{CloudHeaderExtras-xrHubAHL.js → CloudHeaderExtras-DC_oNrxz.js} +1 -1
- package/dist/{CloudPanels-qW-MObRD.js → CloudPanels-CD0lsL0R.js} +2 -2
- package/dist/{CollaborationNotices-D9GQ477K.js → CollaborationNotices-DrMrP73M.js} +1 -1
- package/dist/{CollaboratorBar-DsRjAaqd.js → CollaboratorBar-TsK872uC.js} +1 -1
- package/dist/{CommentsPanel-lb-IFzjl.js → CommentsPanel-BX8JVrXU.js} +1 -1
- package/dist/{CommentsSidebar-CVVTCWBH.js → CommentsSidebar-BUlseNwL.js} +2 -2
- package/dist/{CountdownBlock-CSEq79Nc.js → CountdownBlock-AYPypmcX.js} +2 -2
- package/dist/{CountdownToolbar-BV9yQi9k.js → CountdownToolbar-dx3FVRjh.js} +5 -5
- package/dist/{IssuesPanel-pxcWAQJM.js → IssuesPanel-BwnvXxBC.js} +5 -5
- package/dist/{LanguageMenu-D_xbvq3D.js → LanguageMenu-Cf5bKocE.js} +5 -5
- package/dist/{LocaleNotices-j4aMFfmc.js → LocaleNotices-CGEp0pQ8.js} +2 -2
- package/dist/{LogicTagInsertButton-BDIsyl3C.js → LogicTagInsertButton-BdDe-vrZ.js} +8 -8
- package/dist/{MergeTagInput-De1yWoc2.js → MergeTagInput-CTTi-eB0.js} +1 -1
- package/dist/{MergeTagModeToggle-CL96pI1E.js → MergeTagModeToggle-Bd0svGQm.js} +3 -3
- package/dist/{MergeTagTextarea-DDyV8U44.js → MergeTagTextarea-DiahMV-3.js} +4 -4
- package/dist/{ParagraphEditor-DpOsnnai.js → ParagraphEditor-Db1cmj8Y.js} +11 -11
- package/dist/{RestoreVersionDialog-JQEkVIh5.js → RestoreVersionDialog-DA1Z0q9Z.js} +2 -2
- package/dist/{RichTextEditorContent-C2Yj1-ZA.js → RichTextEditorContent-CyO6e4ZG.js} +6 -6
- package/dist/{SaveBlockDialog-BPf6tDhg.js → SaveBlockDialog-D7SaFxa_.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-DnDCfwSv.js → SavedBlocksBrowserModal-B5r3LWWG.js} +6 -6
- package/dist/{SavedBlocksPanels-D5YaVCem.js → SavedBlocksPanels-BH2f7jm-.js} +1 -1
- package/dist/{SavedBlocksPickBar-OQ7ey3MD.js → SavedBlocksPickBar-B24TScw0.js} +2 -2
- package/dist/{TemplateSettings-CBCaybvd.js → TemplateSettings-CuN9Vkl_.js} +8 -8
- package/dist/{TestEmailModal-BDp85wIp.js → TestEmailModal-C4DAaohi.js} +11 -9
- package/dist/{TestEmailPanel-DkJx0Ptk.js → TestEmailPanel-DoMcVJSE.js} +1 -1
- package/dist/{TitleEditor-wzknZqu_.js → TitleEditor-b5Pr_m9j.js} +8 -8
- package/dist/{Toolbar-FIYSw3Us.js → Toolbar-BOf7Y862.js} +14 -14
- package/dist/{TplModal-C57J-uF0.js → TplModal-DAcXzBJh.js} +4 -4
- package/dist/{VersionHistoryMenu-6jMve6By.js → VersionHistoryMenu-TbIGteNi.js} +2 -2
- package/dist/{VersionHistoryPanels-BZ0GT52h.js → VersionHistoryPanels-Ia6ipOqG.js} +1 -1
- package/dist/{VersionPreviewBanner-Bq8z1SUc.js → VersionPreviewBanner-CRfu6quf.js} +1 -1
- package/dist/{WrapperBlock-C4XrJkx5.js → WrapperBlock-BZenrXM6.js} +4 -4
- package/dist/{blockTypeIcons-VX_8UQ21.js → blockTypeIcons-DdYZy8yG.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js → AiAltTextPopover-CcX_OMUU.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js.map → AiAltTextPopover-CcX_OMUU.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js → AiAltTextReview-Dmm3h0jd.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js.map → AiAltTextReview-Dmm3h0jd.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js → AiChatPanel-DV23DJ-2.js} +3 -3
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js.map → AiChatPanel-DV23DJ-2.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js → AiPanels-CxhOpMAp.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js.map → AiPanels-CxhOpMAp.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js → AiRewriteMenu-87-O514r.js} +8 -8
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js.map → AiRewriteMenu-87-O514r.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js → BlockIssueBadge-Dp06vQd3.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js.map → BlockIssueBadge-Dp06vQd3.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CaRneMZ8.js → BlockPreviewCanvas-DQGzUvZ5.js} +23 -19
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js → CloudHeaderExtras-Cd-ePldd.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js.map → CloudHeaderExtras-Cd-ePldd.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js → CloudPanels-D8fchoYt.js} +3 -3
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js.map → CloudPanels-D8fchoYt.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js → CollaborationNotices-DNEs3g9B.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js.map → CollaborationNotices-DNEs3g9B.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js → CollaboratorBar-CN6XAlbn.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js.map → CollaboratorBar-CN6XAlbn.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js → CommentsPanel-CxZ1kFcK.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js.map → CommentsPanel-CxZ1kFcK.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js → CommentsSidebar-DCr2mV8b.js} +3 -3
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js.map → CommentsSidebar-DCr2mV8b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js → CountdownBlock--hlKE2aj.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js.map → CountdownBlock--hlKE2aj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js → CountdownToolbar-CUTbVPPV.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js.map → CountdownToolbar-CUTbVPPV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js → IssuesPanel-BhcSzwuL.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js.map → IssuesPanel-BhcSzwuL.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js → LanguageMenu-6wGhkyFT.js} +99 -99
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js.map → LanguageMenu-6wGhkyFT.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js → LocaleNotices-Br92Xueo.js} +3 -3
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js.map → LocaleNotices-Br92Xueo.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js → LogicTagInsertButton-r2EVUtDU.js} +9 -9
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js.map → LogicTagInsertButton-r2EVUtDU.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js → MergeTagInput-Dh3N6CEV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js.map → MergeTagInput-Dh3N6CEV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js → MergeTagModeToggle-D6u3hMrI.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js.map → MergeTagModeToggle-D6u3hMrI.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js → MergeTagTextarea-BpVtpiNL.js} +8 -8
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js.map → MergeTagTextarea-BpVtpiNL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js → ParagraphEditor-DGJmPAC1.js} +12 -12
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js.map → ParagraphEditor-DGJmPAC1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js → RestoreVersionDialog-D5qeCa0F.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js.map → RestoreVersionDialog-D5qeCa0F.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js → RichTextEditorContent-DyGiXKKI.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js.map → RichTextEditorContent-DyGiXKKI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js → SaveBlockDialog-B0TJYxd8.js} +7 -7
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js.map → SaveBlockDialog-B0TJYxd8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js → SavedBlocksBrowserModal-D8Ly7LrA.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js.map → SavedBlocksBrowserModal-D8Ly7LrA.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js → SavedBlocksPanels-Co1cbWR8.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js.map → SavedBlocksPanels-Co1cbWR8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js → SavedBlocksPickBar-DNtVbpm-.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js.map → SavedBlocksPickBar-DNtVbpm-.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js → TemplateSettings-BRc878ZF.js} +9 -9
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js.map → TemplateSettings-BRc878ZF.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-B9d3ZsH7.js → TestEmailModal-CIui7VfS.js} +12 -10
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js → TestEmailPanel-vKvruW_r.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js.map → TestEmailPanel-vKvruW_r.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js → TitleEditor-BI-9Nnj3.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js.map → TitleEditor-BI-9Nnj3.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js → Toolbar-CYnnArxv.js} +418 -418
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js.map → Toolbar-CYnnArxv.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js → TplModal-B3nZeGWK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js.map → TplModal-B3nZeGWK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js → VersionHistoryMenu-CMGfAKuV.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js.map → VersionHistoryMenu-CMGfAKuV.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js → VersionHistoryPanels-Bb2ouQg7.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js.map → VersionHistoryPanels-Bb2ouQg7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js → VersionPreviewBanner-573UP-g4.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js.map → VersionPreviewBanner-573UP-g4.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js → WrapperBlock-DVu632LD.js} +5 -5
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js.map → WrapperBlock-DVu632LD.js.map} +1 -1
- package/dist/cdn/chunks/{composables-Cp6gZ7qV.js → composables-DY3anqHO.js} +572 -571
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js → createCloudRuntime-B5numxlW.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js.map → createCloudRuntime-B5numxlW.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js → extensions-BWVlr8Ga.js} +5 -5
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js.map → extensions-BWVlr8Ga.js.map} +1 -1
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +11 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js → normalizeMergeTagMarkup-Dw3rFvyd.js} +40 -40
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js.map → normalizeMergeTagMarkup-Dw3rFvyd.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js → preRenderCustomBlocks-BGtb8Xbp.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js.map → preRenderCustomBlocks-BGtb8Xbp.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js → sanitizeHtml-CLRY8s2s.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js.map → sanitizeHtml-CLRY8s2s.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js → socialIcons-kYhdXJ9P.js} +255 -255
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js.map → socialIcons-kYhdXJ9P.js.map} +1 -1
- package/dist/cdn/chunks/{src-aFRxbwqP.js → src-B7X7x_ST.js} +154 -154
- package/dist/cdn/chunks/{src-aFRxbwqP.js.map → src-B7X7x_ST.js.map} +1 -1
- package/dist/cdn/chunks/{src-BRyzUujm.js → src-BmzzkUf7.js} +539 -539
- package/dist/cdn/chunks/{src-BRyzUujm.js.map → src-BmzzkUf7.js.map} +1 -1
- package/dist/cdn/chunks/{src-CVHGPKSW.js → src-DY2kMjoD.js} +593 -589
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js → useCloudI18n-BTV9uu3c.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js.map → useCloudI18n-BTV9uu3c.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js → useEditorRoot-D0Lp2x4_.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js.map → useEditorRoot-D0Lp2x4_.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js → useI18n-DPg6rPbu.js} +2 -2
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js.map → useI18n-DPg6rPbu.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-7iwZ1UhB.js.map → useLocalizedDisplay-B5wMJLru.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js → useLogicTag-0wkSxy3z.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js.map → useLogicTag-0wkSxy3z.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js → useMergeTag-y3bX8M_6.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js.map → useMergeTag-y3bX8M_6.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js → usePopoverPosition-CBp9uwjV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js.map → usePopoverPosition-CBp9uwjV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js → useScrollToBlock-32EnuMwu.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js.map → useScrollToBlock-32EnuMwu.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js → withCurrentFont-B42BKo9N.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js.map → withCurrentFont-B42BKo9N.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +600 -600
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-jTnTSqdm.js → composables-CFTH0Nqb.js} +865 -864
- package/dist/{createCloudRuntime-DiUnYjKr.js → createCloudRuntime-BvWlm_38.js} +3 -3
- package/dist/{dist-BTjObRcv.js → dist-CMo4K5So.js} +277 -273
- package/dist/{extensions-CAuXwpbI.js → extensions-BPVackEE.js} +4 -4
- package/dist/keys-B4DimcgX.js +9 -0
- package/dist/{normalizeMergeTagMarkup-fgoVMKAc.js → normalizeMergeTagMarkup-PQqrbfmt.js} +1 -1
- package/dist/{preRenderCustomBlocks-CgPtlLGL.js → preRenderCustomBlocks-Dg5GBNi2.js} +1 -1
- package/dist/{sanitizeHtml-D2wueiEe.js → sanitizeHtml-DVdfdxOz.js} +1 -1
- package/dist/{socialIcons-RKdTgJip.js → socialIcons-DBHv_ntg.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +563 -563
- package/dist/{useCloudI18n-nMZ9f_4b.js → useCloudI18n-BnuOL1YS.js} +1 -1
- package/dist/{useEditorRoot-DpssP9rX.js → useEditorRoot-DWfC2CVC.js} +1 -1
- package/dist/{useI18n-C2p-qHeb.js → useI18n-Cx9W7OWb.js} +1 -1
- package/dist/{useLocalizedDisplay-9RqT2y_Y.js → useLocalizedDisplay-CbFM0cCV.js} +1 -1
- package/dist/{useLogicTag-59fmujI7.js → useLogicTag-CVOj0VUv.js} +2 -2
- package/dist/{useMergeTag-M1vauWet.js → useMergeTag-Bams_kam.js} +2 -2
- package/dist/{usePopoverPosition-L9MOHBM-.js → usePopoverPosition-DF0ZYH7g.js} +1 -1
- package/dist/{useScrollToBlock-BMF0Dt5l.js → useScrollToBlock-CwUQ_nKz.js} +1 -1
- package/dist/{withCurrentFont-BXZ7g-K6.js → withCurrentFont-y0O5kOLW.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/BlockPreviewCanvas-CaRneMZ8.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js.map +0 -1
- package/dist/cdn/chunks/composables-Cp6gZ7qV.js.map +0 -1
- package/dist/cdn/chunks/keys-DNv3xXxI.js +0 -11
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +0 -1
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-7iwZ1UhB.js +0 -33
- package/dist/keys-BeQy64On.js +0 -9
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
-
import { $t as t, At as n, Bt as r, Ct as i,
|
|
3
|
-
import { t as
|
|
2
|
+
import { $t as t, At as n, Bt as r, Ct as i, Dt as a, Jt as o, Mt as s, R as c, St as l, Tt as u, Ut as d, Vt as f, _n as p, _t as m, ct as ee, d as te, en as ne, fn as re, jt as ie, kt as ae, lt as h, nn as oe, rt as se, s as ce, tt as le, vt as ue, wt as g, xn as de, xt as fe } from "./src-DY2kMjoD.js";
|
|
3
|
+
import { t as _ } from "./htmlparser-hu3YnNQU.js";
|
|
4
4
|
// ../quality/src/types.ts
|
|
5
|
-
var
|
|
5
|
+
var pe = { minTextLength: 200 }, me = { maxHtmlBytes: 92160 }, he = {
|
|
6
6
|
altMaxLength: 125,
|
|
7
7
|
minFontSize: 14,
|
|
8
8
|
allCapsMinLength: 20,
|
|
9
9
|
minTouchTargetPx: 44
|
|
10
|
-
},
|
|
10
|
+
}, ge = [
|
|
11
11
|
"localhost",
|
|
12
12
|
"127.0.0.1",
|
|
13
13
|
"0.0.0.0",
|
|
14
14
|
"*.local",
|
|
15
15
|
"*.staging.*",
|
|
16
16
|
"*.dev.*"
|
|
17
|
-
],
|
|
17
|
+
], _e = [
|
|
18
18
|
"bit.ly",
|
|
19
19
|
"buff.ly",
|
|
20
20
|
"cutt.ly",
|
|
@@ -34,53 +34,53 @@ var ue = { minTextLength: 200 }, de = { maxHtmlBytes: 92160 }, fe = {
|
|
|
34
34
|
"v.gd"
|
|
35
35
|
];
|
|
36
36
|
// ../quality/src/contrast.ts
|
|
37
|
-
function
|
|
38
|
-
let n =
|
|
37
|
+
function ve(e, t) {
|
|
38
|
+
let n = v(e), r = v(t);
|
|
39
39
|
if (!n || !r) return NaN;
|
|
40
|
-
let i =
|
|
40
|
+
let i = Se(n), a = Se(r), o = Math.max(i, a), s = Math.min(i, a);
|
|
41
41
|
return (o + .05) / (s + .05);
|
|
42
42
|
}
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var ye = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i, be = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i, xe = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
44
|
+
function v(e) {
|
|
45
45
|
if (typeof e != "string") return null;
|
|
46
|
-
let t = e.trim(), n =
|
|
46
|
+
let t = e.trim(), n = xe.exec(t);
|
|
47
47
|
if (n) return n[4].toLowerCase() === "ff" ? {
|
|
48
48
|
r: parseInt(n[1], 16),
|
|
49
49
|
g: parseInt(n[2], 16),
|
|
50
50
|
b: parseInt(n[3], 16)
|
|
51
51
|
} : null;
|
|
52
|
-
let r =
|
|
52
|
+
let r = be.exec(t);
|
|
53
53
|
if (r) return {
|
|
54
54
|
r: parseInt(r[1], 16),
|
|
55
55
|
g: parseInt(r[2], 16),
|
|
56
56
|
b: parseInt(r[3], 16)
|
|
57
57
|
};
|
|
58
|
-
let i =
|
|
58
|
+
let i = ye.exec(t);
|
|
59
59
|
return i ? {
|
|
60
60
|
r: parseInt(i[1] + i[1], 16),
|
|
61
61
|
g: parseInt(i[2] + i[2], 16),
|
|
62
62
|
b: parseInt(i[3] + i[3], 16)
|
|
63
63
|
} : null;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function y(e) {
|
|
66
|
+
return v(e ?? "") !== null;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
let r =
|
|
68
|
+
function Se({ r: e, g: t, b: n }) {
|
|
69
|
+
let r = b(e / 255), i = b(t / 255), a = b(n / 255);
|
|
70
70
|
return .2126 * r + .7152 * i + .0722 * a;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function b(e) {
|
|
73
73
|
return e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
74
74
|
}
|
|
75
75
|
// ../quality/src/walk.ts
|
|
76
|
-
var
|
|
77
|
-
function
|
|
78
|
-
let n =
|
|
79
|
-
let r = e.styles?.backgroundColor, a =
|
|
76
|
+
var Ce = "#ffffff", we = "#1a1a1a";
|
|
77
|
+
function x(e, t) {
|
|
78
|
+
let n = y(e.settings.backgroundColor) ? e.settings.backgroundColor.toLowerCase() : Ce, r = y(e.settings.textColor) ? e.settings.textColor.toLowerCase() : we, i = (e, n) => {
|
|
79
|
+
let r = e.styles?.backgroundColor, a = y(r) ? r.toLowerCase() : n.resolvedBackgroundColor;
|
|
80
80
|
if (t(e, a === n.resolvedBackgroundColor ? n : {
|
|
81
81
|
...n,
|
|
82
82
|
resolvedBackgroundColor: a
|
|
83
|
-
}),
|
|
83
|
+
}), s(e)) for (let t of e.children) i(t, {
|
|
84
84
|
parent: e,
|
|
85
85
|
section: n.section,
|
|
86
86
|
columnIndex: null,
|
|
@@ -88,7 +88,7 @@ function w(e, t) {
|
|
|
88
88
|
resolvedBackgroundColor: a,
|
|
89
89
|
resolvedTextColor: n.resolvedTextColor
|
|
90
90
|
});
|
|
91
|
-
else
|
|
91
|
+
else u(e) && e.children.forEach((t, r) => {
|
|
92
92
|
t.forEach((t) => i(t, {
|
|
93
93
|
parent: e,
|
|
94
94
|
section: e,
|
|
@@ -109,7 +109,7 @@ function w(e, t) {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
// ../quality/src/run-rules.ts
|
|
112
|
-
function
|
|
112
|
+
function S(e, t, n, r) {
|
|
113
113
|
let i = [];
|
|
114
114
|
function a(e, i, a) {
|
|
115
115
|
let o = a.messageVariant ? `${e}.${a.messageVariant}` : e, s = r(n.locale, o, a.params);
|
|
@@ -124,7 +124,7 @@ function T(e, t, n, r) {
|
|
|
124
124
|
fix: a.fix
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
x(e, (e, r) => {
|
|
128
128
|
for (let o of t) {
|
|
129
129
|
let t = n.severity(o.meta.id);
|
|
130
130
|
if (t === "off" || !o.block) continue;
|
|
@@ -140,14 +140,14 @@ function T(e, t, n, r) {
|
|
|
140
140
|
}
|
|
141
141
|
return i;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function C(e) {
|
|
144
144
|
let t = e.overrides ?? {}, n = {
|
|
145
|
-
...
|
|
145
|
+
...he,
|
|
146
146
|
...e.thresholds ?? {}
|
|
147
|
-
}, r = { nonProductionHosts: e.nonProductionHosts ??
|
|
148
|
-
minTextLength: e.deliverabilityThresholds?.minTextLength ??
|
|
149
|
-
shortenerHosts: e.shortenerHosts ??
|
|
150
|
-
}, a = { maxHtmlBytes: e.compatibilityThresholds?.maxHtmlBytes ??
|
|
147
|
+
}, r = { nonProductionHosts: e.nonProductionHosts ?? ge }, i = {
|
|
148
|
+
minTextLength: e.deliverabilityThresholds?.minTextLength ?? pe.minTextLength,
|
|
149
|
+
shortenerHosts: e.shortenerHosts ?? _e
|
|
150
|
+
}, a = { maxHtmlBytes: e.compatibilityThresholds?.maxHtmlBytes ?? me.maxHtmlBytes }, o = e.locale ?? "en", s = e.rules;
|
|
151
151
|
return {
|
|
152
152
|
locale: o,
|
|
153
153
|
rules: t,
|
|
@@ -161,8 +161,8 @@ function E(e) {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return
|
|
164
|
+
function Te(e, t, n) {
|
|
165
|
+
return C({
|
|
166
166
|
locale: e,
|
|
167
167
|
rules: n,
|
|
168
168
|
overrides: t.rules,
|
|
@@ -172,8 +172,8 @@ function Se(e, t, n) {
|
|
|
172
172
|
shortenerHosts: t.shortenerHosts
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function Ee(e, t, n) {
|
|
176
|
+
return C({
|
|
177
177
|
locale: e,
|
|
178
178
|
rules: n,
|
|
179
179
|
overrides: t.rules,
|
|
@@ -182,8 +182,8 @@ function Ce(e, t, n) {
|
|
|
182
182
|
compatibilityThresholds: t.thresholds
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
185
|
+
function De(e, t, n) {
|
|
186
|
+
return C({
|
|
187
187
|
locale: e,
|
|
188
188
|
rules: n,
|
|
189
189
|
overrides: t.rules,
|
|
@@ -191,8 +191,8 @@ function we(e, t, n) {
|
|
|
191
191
|
nonProductionHosts: void 0
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
return
|
|
194
|
+
function Oe(e, t, n) {
|
|
195
|
+
return C({
|
|
196
196
|
locale: e,
|
|
197
197
|
rules: n,
|
|
198
198
|
overrides: t.rules,
|
|
@@ -200,8 +200,8 @@ function Te(e, t, n) {
|
|
|
200
200
|
nonProductionHosts: void 0
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return
|
|
203
|
+
function ke(e, t, n) {
|
|
204
|
+
return C({
|
|
205
205
|
locale: e,
|
|
206
206
|
rules: n,
|
|
207
207
|
overrides: t.rules,
|
|
@@ -210,7 +210,7 @@ function Ee(e, t, n) {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
// ../quality/src/accessibility/messages/de.ts
|
|
213
|
-
var
|
|
213
|
+
var Ae = /* @__PURE__ */ e({ default: () => je }), je = {
|
|
214
214
|
"a11y.img-missing-alt": {
|
|
215
215
|
message: "Bild ohne Alt-Text.",
|
|
216
216
|
suggestion: "Füge eine kurze Beschreibung hinzu oder markiere das Bild als dekorativ."
|
|
@@ -295,7 +295,7 @@ var De = /* @__PURE__ */ e({ default: () => Oe }), Oe = {
|
|
|
295
295
|
message: "Kein Preheader-Text gesetzt, daher zeigen Postfächer Bruchstücke des ersten Blocks.",
|
|
296
296
|
suggestion: "Ergänze einen Preheader-Text als Vorschau auf die E-Mail."
|
|
297
297
|
}
|
|
298
|
-
},
|
|
298
|
+
}, Me = /* @__PURE__ */ e({ default: () => w }), w = {
|
|
299
299
|
"a11y.img-missing-alt": {
|
|
300
300
|
message: "Image is missing alt text.",
|
|
301
301
|
suggestion: "Add a short description, or mark the image as decorative."
|
|
@@ -382,7 +382,7 @@ var De = /* @__PURE__ */ e({ default: () => Oe }), Oe = {
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
// ../quality/src/format-message.ts
|
|
385
|
-
function
|
|
385
|
+
function T(e, t) {
|
|
386
386
|
if (!t) return e;
|
|
387
387
|
let n = (e) => e.replace(/\{(\w+)\}/g, (e, n) => {
|
|
388
388
|
let r = t[n];
|
|
@@ -394,59 +394,59 @@ function O(e, t) {
|
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
396
|
// ../quality/src/accessibility/messages/index.ts
|
|
397
|
-
var
|
|
398
|
-
"./de.ts":
|
|
399
|
-
"./en.ts":
|
|
400
|
-
}),
|
|
401
|
-
for (let e in
|
|
397
|
+
var Ne = /* #__PURE__ */ Object.assign({
|
|
398
|
+
"./de.ts": Ae,
|
|
399
|
+
"./en.ts": Me
|
|
400
|
+
}), E = {};
|
|
401
|
+
for (let e in Ne) {
|
|
402
402
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
403
403
|
if (!t) continue;
|
|
404
404
|
let n = t[1];
|
|
405
|
-
n !== "index" && (
|
|
405
|
+
n !== "index" && (E[n] = Ne[e].default);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
return
|
|
407
|
+
function Pe(e) {
|
|
408
|
+
return E[e.split("-")[0]?.toLowerCase() ?? "en"] ?? E.en ?? w;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
return
|
|
410
|
+
function Fe(e, t, n) {
|
|
411
|
+
return T(Pe(e)[t] ?? w[t], n);
|
|
412
412
|
}
|
|
413
|
-
var
|
|
413
|
+
var Ie = {
|
|
414
414
|
meta: {
|
|
415
415
|
id: "a11y.img-missing-alt",
|
|
416
416
|
reference: "https://www.w3.org/WAI/tutorials/images/",
|
|
417
417
|
severity: "error"
|
|
418
418
|
},
|
|
419
419
|
block(e) {
|
|
420
|
-
return !
|
|
420
|
+
return !l(e) || e.decorative === !0 || (e.alt?.trim() ?? "") !== "" || (e.src ?? "").trim() === "" ? null : { blockId: e.id };
|
|
421
421
|
}
|
|
422
|
-
},
|
|
422
|
+
}, Le = {
|
|
423
423
|
id: "a11y.img-alt-is-filename",
|
|
424
424
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#images",
|
|
425
425
|
severity: "warning"
|
|
426
|
-
},
|
|
426
|
+
}, Re = [
|
|
427
427
|
/\.(jpe?g|png|gif|webp|svg)$/i,
|
|
428
428
|
/^IMG[_-]?\d+/i,
|
|
429
429
|
/^Untitled/i,
|
|
430
430
|
/^Screen[\s_-]?Shot/i,
|
|
431
431
|
/^DSC[_-]?\d+/i
|
|
432
|
-
],
|
|
433
|
-
meta:
|
|
432
|
+
], ze = {
|
|
433
|
+
meta: Le,
|
|
434
434
|
block(e) {
|
|
435
|
-
if (!
|
|
435
|
+
if (!l(e) || e.decorative === !0) return null;
|
|
436
436
|
let t = e.alt?.trim() ?? "";
|
|
437
|
-
return t === "" || !
|
|
437
|
+
return t === "" || !Re.some((e) => e.test(t)) ? null : {
|
|
438
438
|
blockId: e.id,
|
|
439
439
|
params: { alt: t }
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
},
|
|
442
|
+
}, Be = {
|
|
443
443
|
meta: {
|
|
444
444
|
id: "a11y.img-alt-too-long",
|
|
445
445
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#images",
|
|
446
446
|
severity: "warning"
|
|
447
447
|
},
|
|
448
448
|
block(e, t, n) {
|
|
449
|
-
if (!
|
|
449
|
+
if (!l(e) || e.decorative === !0) return null;
|
|
450
450
|
let r = e.alt ?? "";
|
|
451
451
|
return r.length <= n.thresholds.altMaxLength ? null : {
|
|
452
452
|
blockId: e.id,
|
|
@@ -456,14 +456,14 @@ var Ne = {
|
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, Ve = {
|
|
460
460
|
meta: {
|
|
461
461
|
id: "a11y.img-decorative-needs-empty-alt",
|
|
462
462
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#images",
|
|
463
463
|
severity: "info"
|
|
464
464
|
},
|
|
465
465
|
block(e) {
|
|
466
|
-
return !
|
|
466
|
+
return !l(e) || e.decorative !== !0 || (e.alt ?? "").trim() === "" ? null : {
|
|
467
467
|
blockId: e.id,
|
|
468
468
|
fix: {
|
|
469
469
|
description: "Clear alt text",
|
|
@@ -471,7 +471,7 @@ var Ne = {
|
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
},
|
|
474
|
+
}, He = /* @__PURE__ */ e({ default: () => Ue }), Ue = {
|
|
475
475
|
vagueLinkText: [
|
|
476
476
|
"hier klicken",
|
|
477
477
|
"hier",
|
|
@@ -514,7 +514,7 @@ var Ne = {
|
|
|
514
514
|
"anschauen",
|
|
515
515
|
"jetzt"
|
|
516
516
|
]
|
|
517
|
-
},
|
|
517
|
+
}, We = /* @__PURE__ */ e({ default: () => Ge }), Ge = {
|
|
518
518
|
vagueLinkText: [
|
|
519
519
|
"click here",
|
|
520
520
|
"here",
|
|
@@ -555,51 +555,51 @@ var Ne = {
|
|
|
555
555
|
"redeem",
|
|
556
556
|
"watch"
|
|
557
557
|
]
|
|
558
|
-
},
|
|
559
|
-
"./de.ts":
|
|
560
|
-
"./en.ts":
|
|
561
|
-
}),
|
|
562
|
-
for (let e in
|
|
558
|
+
}, Ke = /* #__PURE__ */ Object.assign({
|
|
559
|
+
"./de.ts": He,
|
|
560
|
+
"./en.ts": We
|
|
561
|
+
}), qe = {};
|
|
562
|
+
for (let e in Ke) {
|
|
563
563
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
564
564
|
if (!t) continue;
|
|
565
565
|
let n = t[1];
|
|
566
|
-
n !== "index" && (
|
|
566
|
+
n !== "index" && (qe[n] = Ke[e].default);
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
return
|
|
568
|
+
function D(e) {
|
|
569
|
+
return Je;
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function O(e) {
|
|
572
572
|
let t = /* @__PURE__ */ new Set();
|
|
573
|
-
for (let n of Object.values(
|
|
573
|
+
for (let n of Object.values(qe)) for (let r of e(n)) t.add(r);
|
|
574
574
|
return Array.from(t);
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
vagueLinkText:
|
|
578
|
-
vagueButtonLabels:
|
|
579
|
-
linkedImageActionHints:
|
|
576
|
+
var Je = {
|
|
577
|
+
vagueLinkText: O((e) => e.vagueLinkText),
|
|
578
|
+
vagueButtonLabels: O((e) => e.vagueButtonLabels),
|
|
579
|
+
linkedImageActionHints: O((e) => e.linkedImageActionHints)
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Ye(e) {
|
|
582
582
|
return e.toLowerCase().replace(/\s+/g, " ").replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "").trim();
|
|
583
583
|
}
|
|
584
|
-
var
|
|
584
|
+
var Xe = {
|
|
585
585
|
meta: {
|
|
586
586
|
id: "a11y.img-linked-no-context",
|
|
587
587
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#images",
|
|
588
588
|
severity: "warning"
|
|
589
589
|
},
|
|
590
590
|
block(e, t, n) {
|
|
591
|
-
if (!
|
|
591
|
+
if (!l(e) || e.decorative === !0 || !e.linkUrl || e.linkUrl.trim() === "") return null;
|
|
592
592
|
let r = (e.alt ?? "").trim();
|
|
593
593
|
if (r === "") return null;
|
|
594
|
-
let i = r.toLocaleLowerCase().split(/[^\p{L}\p{N}]+/u).filter(Boolean), a =
|
|
594
|
+
let i = r.toLocaleLowerCase().split(/[^\p{L}\p{N}]+/u).filter(Boolean), a = D(n.locale).linkedImageActionHints;
|
|
595
595
|
return i.some((e) => a.includes(e)) ? null : { blockId: e.id };
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
598
|
// ../quality/src/html-utils.ts
|
|
599
|
-
function
|
|
599
|
+
function k(e) {
|
|
600
600
|
let t = [], n = null, r = "", i = () => {
|
|
601
601
|
n !== null && (n.text = r.trim(), t.push(n), n = null, r = "");
|
|
602
|
-
}, a = new
|
|
602
|
+
}, a = new _({
|
|
603
603
|
onopentag(e, t) {
|
|
604
604
|
e === "a" ? (i(), n = {
|
|
605
605
|
href: t.href ?? "",
|
|
@@ -618,8 +618,8 @@ function M(e) {
|
|
|
618
618
|
});
|
|
619
619
|
return a.write(e), a.end(), i(), t;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
let t =
|
|
621
|
+
function Ze(e) {
|
|
622
|
+
let t = Qe(e).matchAll(/<\/?a\b[^<>]*>/gi), n = 0;
|
|
623
623
|
for (let e of t) if (e[0].startsWith("</")) n > 0 && n--;
|
|
624
624
|
else {
|
|
625
625
|
if (n > 0) return !0;
|
|
@@ -627,7 +627,7 @@ function Je(e) {
|
|
|
627
627
|
}
|
|
628
628
|
return !1;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Qe(e) {
|
|
631
631
|
let t = "", n = 0;
|
|
632
632
|
for (; n < e.length;) {
|
|
633
633
|
let r = e.indexOf("<!--", n);
|
|
@@ -642,33 +642,33 @@ function Ye(e) {
|
|
|
642
642
|
}
|
|
643
643
|
return t;
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
let t = "", n = new
|
|
645
|
+
function A(e) {
|
|
646
|
+
let t = "", n = new _({ ontext(e) {
|
|
647
647
|
t += e;
|
|
648
648
|
} });
|
|
649
649
|
return n.write(e), n.end(), t.trim();
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function j(e) {
|
|
652
652
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function $e(e) {
|
|
655
655
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function et(e) {
|
|
658
658
|
return e >= "A" && e <= "Z" || e >= "a" && e <= "z";
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
660
|
+
function tt(e) {
|
|
661
|
+
return et(e) || e >= "0" && e <= "9" || e === ":" || e === "-" || e === "_";
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function M(e, t) {
|
|
664
664
|
return `${e}="${t.replace(/"/g, """)}"`;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function N(e) {
|
|
667
667
|
let t = 0;
|
|
668
|
-
for (; t < e.length &&
|
|
669
|
-
for (; t < e.length &&
|
|
668
|
+
for (; t < e.length && $e(e[t]);) t++;
|
|
669
|
+
for (; t < e.length && j(e[t]);) t++;
|
|
670
670
|
if (t >= e.length || e[t] !== "=") return null;
|
|
671
|
-
for (t++; t < e.length &&
|
|
671
|
+
for (t++; t < e.length && j(e[t]);) t++;
|
|
672
672
|
if (t >= e.length) return null;
|
|
673
673
|
let n = e[t];
|
|
674
674
|
if (n === "\"" || n === "'") {
|
|
@@ -677,20 +677,20 @@ function I(e) {
|
|
|
677
677
|
}
|
|
678
678
|
return e.slice(t);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function P(e, t) {
|
|
681
681
|
let n = t.toLowerCase(), r = [], i = 0;
|
|
682
682
|
for (; i < e.length;) {
|
|
683
|
-
for (; i < e.length && (
|
|
683
|
+
for (; i < e.length && (j(e[i]) || e[i] === "/");) i++;
|
|
684
684
|
if (i >= e.length) break;
|
|
685
685
|
let t = i;
|
|
686
|
-
for (; i < e.length &&
|
|
686
|
+
for (; i < e.length && $e(e[i]);) i++;
|
|
687
687
|
let a = e.slice(t, i);
|
|
688
688
|
if (a === "") {
|
|
689
689
|
i++;
|
|
690
690
|
continue;
|
|
691
691
|
}
|
|
692
692
|
let o = i;
|
|
693
|
-
for (; i < e.length &&
|
|
693
|
+
for (; i < e.length && j(e[i]);) i++;
|
|
694
694
|
if (i >= e.length || e[i] !== "=") {
|
|
695
695
|
a.toLowerCase() === n && r.push({
|
|
696
696
|
start: t,
|
|
@@ -698,7 +698,7 @@ function L(e, t) {
|
|
|
698
698
|
});
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
701
|
-
for (i++; i < e.length &&
|
|
701
|
+
for (i++; i < e.length && j(e[i]);) i++;
|
|
702
702
|
let s = e[i];
|
|
703
703
|
if (s === "\"" || s === "'") {
|
|
704
704
|
let o = e.indexOf(s, i + 1);
|
|
@@ -709,7 +709,7 @@ function L(e, t) {
|
|
|
709
709
|
end: c
|
|
710
710
|
}), i = c;
|
|
711
711
|
} else {
|
|
712
|
-
for (; i < e.length && !
|
|
712
|
+
for (; i < e.length && !j(e[i]) && e[i] !== ">";) i++;
|
|
713
713
|
a.toLowerCase() === n && r.push({
|
|
714
714
|
start: t,
|
|
715
715
|
end: i
|
|
@@ -718,16 +718,16 @@ function L(e, t) {
|
|
|
718
718
|
}
|
|
719
719
|
return r;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
let n = t.start > 0 &&
|
|
721
|
+
function nt(e, t) {
|
|
722
|
+
let n = t.start > 0 && j(e[t.start - 1]) ? t.start - 1 : t.start;
|
|
723
723
|
return e.slice(0, n) + e.slice(t.end);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
let n = "", r = 0, i = new
|
|
725
|
+
function F(e, t) {
|
|
726
|
+
let n = "", r = 0, i = new _({ onopentag(a, o) {
|
|
727
727
|
let s = i.startIndex, c = i.endIndex;
|
|
728
|
-
if (!
|
|
728
|
+
if (!et(e[s + 1])) return;
|
|
729
729
|
let l = s + 1;
|
|
730
|
-
for (; l < c &&
|
|
730
|
+
for (; l < c && tt(e[l]);) l++;
|
|
731
731
|
let u = t({
|
|
732
732
|
name: a,
|
|
733
733
|
rawName: e.slice(s + 1, l),
|
|
@@ -738,29 +738,29 @@ function R(e, t) {
|
|
|
738
738
|
} });
|
|
739
739
|
return i.end(e), n + e.slice(r);
|
|
740
740
|
}
|
|
741
|
-
var
|
|
741
|
+
var rt = {
|
|
742
742
|
meta: {
|
|
743
743
|
id: "a11y.heading-empty",
|
|
744
744
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#headings",
|
|
745
745
|
severity: "error"
|
|
746
746
|
},
|
|
747
747
|
block(e) {
|
|
748
|
-
return !
|
|
748
|
+
return !n(e) || A(e.content ?? "") !== "" ? null : { blockId: e.id };
|
|
749
749
|
}
|
|
750
|
-
},
|
|
750
|
+
}, it = {
|
|
751
751
|
id: "a11y.heading-skip-level",
|
|
752
752
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#headings",
|
|
753
753
|
severity: "error"
|
|
754
754
|
};
|
|
755
|
-
function
|
|
756
|
-
for (let
|
|
757
|
-
else if (
|
|
755
|
+
function at(e, t) {
|
|
756
|
+
for (let r of e) if (n(r)) t.push(r);
|
|
757
|
+
else if (u(r)) for (let e of r.children) at(e, t);
|
|
758
758
|
}
|
|
759
|
-
var
|
|
760
|
-
meta:
|
|
759
|
+
var ot = {
|
|
760
|
+
meta: it,
|
|
761
761
|
template(e) {
|
|
762
762
|
let t = [];
|
|
763
|
-
|
|
763
|
+
at(e.blocks, t);
|
|
764
764
|
let n = [], r = 0;
|
|
765
765
|
for (let e of t) r !== 0 && e.level > r + 1 && n.push({
|
|
766
766
|
blockId: e.id,
|
|
@@ -771,52 +771,52 @@ var rt = {
|
|
|
771
771
|
}), r = e.level;
|
|
772
772
|
return n;
|
|
773
773
|
}
|
|
774
|
-
},
|
|
774
|
+
}, st = {
|
|
775
775
|
id: "a11y.heading-multiple-h1",
|
|
776
776
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#headings",
|
|
777
777
|
severity: "warning"
|
|
778
778
|
};
|
|
779
|
-
function
|
|
780
|
-
for (let
|
|
781
|
-
else if (
|
|
779
|
+
function ct(e, t) {
|
|
780
|
+
for (let r of e) if (n(r)) t.push(r);
|
|
781
|
+
else if (u(r)) for (let e of r.children) ct(e, t);
|
|
782
782
|
}
|
|
783
|
-
var
|
|
784
|
-
meta:
|
|
783
|
+
var lt = {
|
|
784
|
+
meta: st,
|
|
785
785
|
template(e) {
|
|
786
786
|
let t = [];
|
|
787
|
-
|
|
787
|
+
ct(e.blocks, t);
|
|
788
788
|
let n = t.filter((e) => e.level === 1);
|
|
789
789
|
return n.length <= 1 ? [] : n.slice(1).map((e) => ({ blockId: e.id }));
|
|
790
790
|
}
|
|
791
|
-
},
|
|
791
|
+
}, ut = {
|
|
792
792
|
id: "a11y.link-empty",
|
|
793
793
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#links",
|
|
794
794
|
severity: "error"
|
|
795
795
|
};
|
|
796
|
-
function
|
|
797
|
-
return
|
|
796
|
+
function dt(e) {
|
|
797
|
+
return g(e) || n(e) ? e.content : null;
|
|
798
798
|
}
|
|
799
|
-
var
|
|
800
|
-
meta:
|
|
799
|
+
var ft = {
|
|
800
|
+
meta: ut,
|
|
801
801
|
block(e) {
|
|
802
|
-
let t =
|
|
803
|
-
return t === null || !
|
|
802
|
+
let t = dt(e);
|
|
803
|
+
return t === null || !k(t).find((e) => e.text === "" && !e.hasImageWithAlt) ? null : { blockId: e.id };
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, pt = {
|
|
806
806
|
id: "a11y.link-vague-text",
|
|
807
807
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#links",
|
|
808
808
|
severity: "warning"
|
|
809
809
|
};
|
|
810
|
-
function
|
|
811
|
-
return
|
|
810
|
+
function mt(e) {
|
|
811
|
+
return g(e) || n(e) ? e.content : null;
|
|
812
812
|
}
|
|
813
|
-
var
|
|
814
|
-
meta:
|
|
813
|
+
var ht = {
|
|
814
|
+
meta: pt,
|
|
815
815
|
block(e, t, n) {
|
|
816
|
-
let r =
|
|
816
|
+
let r = mt(e);
|
|
817
817
|
if (r === null) return null;
|
|
818
|
-
let i =
|
|
819
|
-
let t =
|
|
818
|
+
let i = D(n.locale).vagueLinkText, a = k(r).find((e) => {
|
|
819
|
+
let t = Ye(e.text);
|
|
820
820
|
return t !== "" && i.includes(t);
|
|
821
821
|
});
|
|
822
822
|
return a ? {
|
|
@@ -824,105 +824,105 @@ var ft = {
|
|
|
824
824
|
params: { text: a.text }
|
|
825
825
|
} : null;
|
|
826
826
|
}
|
|
827
|
-
},
|
|
827
|
+
}, gt = {
|
|
828
828
|
id: "a11y.link-href-empty",
|
|
829
829
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#links",
|
|
830
830
|
severity: "error"
|
|
831
831
|
};
|
|
832
|
-
function
|
|
833
|
-
return
|
|
832
|
+
function _t(e) {
|
|
833
|
+
return g(e) || n(e) ? e.content : null;
|
|
834
834
|
}
|
|
835
|
-
var
|
|
836
|
-
meta:
|
|
835
|
+
var vt = {
|
|
836
|
+
meta: gt,
|
|
837
837
|
block(e) {
|
|
838
|
-
let t =
|
|
839
|
-
return t === null || !
|
|
838
|
+
let t = _t(e);
|
|
839
|
+
return t === null || !k(t).find((e) => {
|
|
840
840
|
let t = e.href.trim();
|
|
841
841
|
return t === "" || t === "#";
|
|
842
842
|
}) ? null : { blockId: e.id };
|
|
843
843
|
}
|
|
844
|
-
},
|
|
844
|
+
}, yt = {
|
|
845
845
|
id: "a11y.link-target-blank-no-rel",
|
|
846
846
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#links",
|
|
847
847
|
severity: "warning"
|
|
848
848
|
};
|
|
849
|
-
function
|
|
850
|
-
return
|
|
849
|
+
function bt(e) {
|
|
850
|
+
return g(e) || n(e) ? e.content : null;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function xt(e) {
|
|
853
853
|
if (e === null) return !1;
|
|
854
854
|
let t = e.toLowerCase().split(/[ \t\n\f\r]+/);
|
|
855
855
|
return t.includes("noopener") || t.includes("noreferrer");
|
|
856
856
|
}
|
|
857
|
-
var
|
|
858
|
-
meta:
|
|
857
|
+
var St = {
|
|
858
|
+
meta: yt,
|
|
859
859
|
block(e) {
|
|
860
|
-
let t =
|
|
861
|
-
return t === null || !
|
|
860
|
+
let t = bt(e);
|
|
861
|
+
return t === null || !k(t).find((e) => e.target === "_blank" && !xt(e.rel)) ? null : {
|
|
862
862
|
blockId: e.id,
|
|
863
863
|
fix: {
|
|
864
864
|
description: "Add rel=\"noopener\"",
|
|
865
865
|
apply: (t) => {
|
|
866
|
-
if (!
|
|
867
|
-
let
|
|
868
|
-
t.updateBlock(e.id, { content:
|
|
866
|
+
if (!g(e) && !n(e)) return;
|
|
867
|
+
let r = Ct(e.content ?? "");
|
|
868
|
+
t.updateBlock(e.id, { content: r });
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
};
|
|
874
|
-
function
|
|
875
|
-
return
|
|
874
|
+
function Ct(e) {
|
|
875
|
+
return F(e, ({ name: e, attrs: t, decodedAttrs: n }) => {
|
|
876
876
|
if (e !== "a" || n.target !== "_blank") return null;
|
|
877
|
-
let r =
|
|
877
|
+
let r = P(t, "rel");
|
|
878
878
|
if (r === null) return null;
|
|
879
879
|
let i = r[0];
|
|
880
|
-
if (i === void 0) return `<a${t} ${
|
|
881
|
-
let a =
|
|
882
|
-
if (
|
|
880
|
+
if (i === void 0) return `<a${t} ${M("rel", "noopener")}>`;
|
|
881
|
+
let a = N(t.slice(i.start, i.end));
|
|
882
|
+
if (xt(n.rel ?? null)) return null;
|
|
883
883
|
let o = `${a ?? ""} noopener`.replace(/^[ \t\n\f\r]+/, "");
|
|
884
|
-
return `<a${t.slice(0, i.start) +
|
|
884
|
+
return `<a${t.slice(0, i.start) + M("rel", o) + t.slice(i.end)}>`;
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
887
|
// ../quality/src/accessibility/rules/link-nested-anchor.ts
|
|
888
|
-
var
|
|
888
|
+
var wt = {
|
|
889
889
|
id: "a11y.link-nested-anchor",
|
|
890
890
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#links",
|
|
891
891
|
severity: "error"
|
|
892
892
|
};
|
|
893
|
-
function
|
|
894
|
-
return
|
|
893
|
+
function Tt(e) {
|
|
894
|
+
return g(e) || n(e) ? e.content : null;
|
|
895
895
|
}
|
|
896
|
-
var
|
|
897
|
-
meta:
|
|
896
|
+
var Et = {
|
|
897
|
+
meta: wt,
|
|
898
898
|
block(e) {
|
|
899
|
-
let t =
|
|
900
|
-
return t === null || !
|
|
899
|
+
let t = Tt(e);
|
|
900
|
+
return t === null || !Ze(t) ? null : { blockId: e.id };
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, Dt = {
|
|
903
903
|
meta: {
|
|
904
904
|
id: "a11y.text-all-caps",
|
|
905
905
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#text",
|
|
906
906
|
severity: "warning"
|
|
907
907
|
},
|
|
908
|
-
block(e, t,
|
|
909
|
-
if (!
|
|
910
|
-
let
|
|
911
|
-
return
|
|
908
|
+
block(e, t, r) {
|
|
909
|
+
if (!g(e) && !n(e)) return null;
|
|
910
|
+
let i = A(e.content ?? "").replace(/[^\p{L}]/gu, "");
|
|
911
|
+
return i.length < r.thresholds.allCapsMinLength || ![...i].some((e) => e.toLocaleLowerCase() !== e.toLocaleUpperCase()) || i !== i.toLocaleUpperCase() ? null : { blockId: e.id };
|
|
912
912
|
}
|
|
913
|
-
},
|
|
913
|
+
}, Ot = {
|
|
914
914
|
id: "a11y.text-justified",
|
|
915
915
|
reference: "https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation",
|
|
916
916
|
severity: "warning"
|
|
917
|
-
},
|
|
918
|
-
function
|
|
917
|
+
}, kt = /^\s*text-align\s*:\s*([^;]*)/i, At = /^&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9a-fA-F]+);/;
|
|
918
|
+
function jt(e) {
|
|
919
919
|
let t = [], n = 0, r = 0, i = null, a = !1;
|
|
920
920
|
for (let o = 0; o < e.length;) {
|
|
921
921
|
let s = e[o], c = o + 1;
|
|
922
922
|
if (s === "&") {
|
|
923
|
-
let t =
|
|
923
|
+
let t = At.exec(e.slice(o));
|
|
924
924
|
if (t !== null) {
|
|
925
|
-
let e =
|
|
925
|
+
let e = h(t[0]);
|
|
926
926
|
e !== t[0] && (s = e, c = o + t[0].length);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
@@ -931,103 +931,103 @@ function Ot(e) {
|
|
|
931
931
|
}
|
|
932
932
|
return t.push(e.slice(n)), t;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Mt(e) {
|
|
935
935
|
let t = [];
|
|
936
|
-
return
|
|
937
|
-
let n =
|
|
936
|
+
return F(e, ({ attrs: e }) => {
|
|
937
|
+
let n = P(e, "style");
|
|
938
938
|
if (n === null) return null;
|
|
939
939
|
for (let r of n) {
|
|
940
|
-
let n =
|
|
940
|
+
let n = N(e.slice(r.start, r.end));
|
|
941
941
|
n !== null && t.push(n);
|
|
942
942
|
}
|
|
943
943
|
return null;
|
|
944
944
|
}), t;
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
return
|
|
948
|
-
let t =
|
|
946
|
+
function Nt(e) {
|
|
947
|
+
return jt(e).some((e) => {
|
|
948
|
+
let t = kt.exec(h(e));
|
|
949
949
|
return t !== null && t[1].trim().toLowerCase() === "justify";
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
952
|
+
function Pt(e) {
|
|
953
|
+
return jt(e).filter((e) => !/^\s*text-align\s*:/i.test(h(e))).map((e) => e.trim()).filter((e) => e !== "").join("; ");
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
957
|
-
let n =
|
|
955
|
+
function Ft(e) {
|
|
956
|
+
return F(e, ({ rawName: e, attrs: t }) => {
|
|
957
|
+
let n = P(t, "style");
|
|
958
958
|
if (n === null || n.length === 0) return null;
|
|
959
959
|
let r = t, i = !1;
|
|
960
960
|
for (let e = n.length - 1; e >= 0; e--) {
|
|
961
|
-
let a = n[e], o =
|
|
962
|
-
if (o === null || !
|
|
963
|
-
let s =
|
|
964
|
-
r = s === "" ?
|
|
961
|
+
let a = n[e], o = N(t.slice(a.start, a.end));
|
|
962
|
+
if (o === null || !Nt(o)) continue;
|
|
963
|
+
let s = Pt(o);
|
|
964
|
+
r = s === "" ? nt(r, a) : r.slice(0, a.start) + M("style", s) + r.slice(a.end), i = !0;
|
|
965
965
|
}
|
|
966
966
|
return i ? `<${e}${r}>` : null;
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
|
-
var
|
|
970
|
-
meta:
|
|
969
|
+
var It = {
|
|
970
|
+
meta: Ot,
|
|
971
971
|
block(e) {
|
|
972
|
-
return !
|
|
972
|
+
return !g(e) || !Mt(e.content ?? "").some(Nt) ? null : {
|
|
973
973
|
blockId: e.id,
|
|
974
974
|
fix: {
|
|
975
975
|
description: "Remove justified alignment",
|
|
976
976
|
apply: (t) => {
|
|
977
|
-
|
|
977
|
+
g(e) && t.updateBlock(e.id, { content: Ft(e.content ?? "") });
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
|
-
},
|
|
982
|
+
}, Lt = {
|
|
983
983
|
meta: {
|
|
984
984
|
id: "a11y.text-low-contrast",
|
|
985
985
|
reference: "https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum",
|
|
986
986
|
severity: "error"
|
|
987
987
|
},
|
|
988
988
|
block(e, t) {
|
|
989
|
-
if (!
|
|
990
|
-
let
|
|
991
|
-
if (!
|
|
992
|
-
let
|
|
993
|
-
return Number.isNaN(
|
|
989
|
+
if (!n(e)) return null;
|
|
990
|
+
let r = e.color ?? t.resolvedTextColor;
|
|
991
|
+
if (!y(r) || !y(t.resolvedBackgroundColor)) return null;
|
|
992
|
+
let i = de[e.level] >= 24 ? 3 : 4.5, a = ve(r, t.resolvedBackgroundColor);
|
|
993
|
+
return Number.isNaN(a) || a >= i ? null : {
|
|
994
994
|
blockId: e.id,
|
|
995
995
|
params: {
|
|
996
|
-
ratio:
|
|
997
|
-
required:
|
|
996
|
+
ratio: a.toFixed(2),
|
|
997
|
+
required: i
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
},
|
|
1001
|
+
}, Rt = {
|
|
1002
1002
|
id: "a11y.text-too-small",
|
|
1003
1003
|
reference: "https://docs.templatical.com/quality/accessibility/rule-catalog#text",
|
|
1004
1004
|
severity: "warning"
|
|
1005
1005
|
};
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1006
|
+
function zt(e) {
|
|
1007
|
+
return i(e) || ae(e) ? e.fontSize : null;
|
|
1008
1008
|
}
|
|
1009
1009
|
// ../quality/src/accessibility/index.ts
|
|
1010
|
-
var
|
|
1011
|
-
Ne,
|
|
1010
|
+
var Bt = [
|
|
1012
1011
|
Ie,
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1012
|
+
ze,
|
|
1013
|
+
Be,
|
|
1014
|
+
Ve,
|
|
1015
|
+
Xe,
|
|
1017
1016
|
rt,
|
|
1018
1017
|
ot,
|
|
1019
1018
|
lt,
|
|
1020
1019
|
ft,
|
|
1021
1020
|
ht,
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
vt,
|
|
1022
|
+
St,
|
|
1023
|
+
Et,
|
|
1024
|
+
Dt,
|
|
1025
|
+
It,
|
|
1026
|
+
Lt,
|
|
1027
1027
|
{
|
|
1028
|
-
meta:
|
|
1028
|
+
meta: Rt,
|
|
1029
1029
|
block(e, t, n) {
|
|
1030
|
-
let r =
|
|
1030
|
+
let r = zt(e);
|
|
1031
1031
|
return r === null || r >= n.thresholds.minFontSize ? null : {
|
|
1032
1032
|
blockId: e.id,
|
|
1033
1033
|
params: {
|
|
@@ -1044,9 +1044,9 @@ var Lt = [
|
|
|
1044
1044
|
severity: "warning"
|
|
1045
1045
|
},
|
|
1046
1046
|
block(e, t, n) {
|
|
1047
|
-
if (!
|
|
1048
|
-
let r =
|
|
1049
|
-
return r === "" || !
|
|
1047
|
+
if (!m(e)) return null;
|
|
1048
|
+
let r = Ye(e.text ?? "");
|
|
1049
|
+
return r === "" || !D(n.locale).vagueButtonLabels.includes(r) ? null : {
|
|
1050
1050
|
blockId: e.id,
|
|
1051
1051
|
params: { text: e.text }
|
|
1052
1052
|
};
|
|
@@ -1059,7 +1059,7 @@ var Lt = [
|
|
|
1059
1059
|
severity: "warning"
|
|
1060
1060
|
},
|
|
1061
1061
|
block(e, t, n) {
|
|
1062
|
-
if (!
|
|
1062
|
+
if (!m(e)) return null;
|
|
1063
1063
|
let r = e.buttonPadding;
|
|
1064
1064
|
if (!r) return null;
|
|
1065
1065
|
let i = e.fontSize * 1.4 + r.top + r.bottom;
|
|
@@ -1079,8 +1079,8 @@ var Lt = [
|
|
|
1079
1079
|
severity: "error"
|
|
1080
1080
|
},
|
|
1081
1081
|
block(e) {
|
|
1082
|
-
if (!
|
|
1083
|
-
let t =
|
|
1082
|
+
if (!m(e)) return null;
|
|
1083
|
+
let t = ve(e.textColor, e.backgroundColor);
|
|
1084
1084
|
if (Number.isNaN(t)) return null;
|
|
1085
1085
|
let n = e.fontSize >= 24 ? 3 : 4.5;
|
|
1086
1086
|
return t >= n ? null : {
|
|
@@ -1103,11 +1103,11 @@ var Lt = [
|
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
];
|
|
1106
|
-
function
|
|
1107
|
-
return t.disabled === !0 || t.accessibility === !1 ? [] :
|
|
1106
|
+
function Vt(e, t = {}) {
|
|
1107
|
+
return t.disabled === !0 || t.accessibility === !1 ? [] : S(e, Bt, De(t.locale, t.accessibility ?? {}, Bt), (e, t, n) => Fe(e, t, n));
|
|
1108
1108
|
}
|
|
1109
1109
|
// ../quality/src/structure/messages/de.ts
|
|
1110
|
-
var
|
|
1110
|
+
var Ht = /* @__PURE__ */ e({ default: () => Ut }), Ut = {
|
|
1111
1111
|
"structure.duplicate-block-id": {
|
|
1112
1112
|
message: "Block-ID erscheint {count}-mal im Baum.",
|
|
1113
1113
|
suggestion: "Gib jedem Block eine eindeutige ID."
|
|
@@ -1148,7 +1148,7 @@ var zt = /* @__PURE__ */ e({ default: () => Bt }), Bt = {
|
|
|
1148
1148
|
message: "Der Hero-Modus kann die Form dieses Hintergrundbilds nicht übernehmen, weil seine Größe unbekannt ist (eine Merge-Tag-URL oder ein Bild, das der Editor nicht vermessen hat), deshalb wird die Sektion als normale Sektion dargestellt.",
|
|
1149
1149
|
suggestion: "Gib ihr eine feste Höhe oder trage die Größe der Bilddatei ein."
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, Wt = /* @__PURE__ */ e({ default: () => I }), I = {
|
|
1152
1152
|
"structure.duplicate-block-id": {
|
|
1153
1153
|
message: "Block id appears {count} times in the tree.",
|
|
1154
1154
|
suggestion: "Give each block a unique id."
|
|
@@ -1189,36 +1189,36 @@ var zt = /* @__PURE__ */ e({ default: () => Bt }), Bt = {
|
|
|
1189
1189
|
message: "Hero mode can't match this background image's shape because its size is unknown (a merge-tag URL, or an image the editor didn't measure), so the section renders as a regular one.",
|
|
1190
1190
|
suggestion: "Give it a fixed height, or set the image file's size."
|
|
1191
1191
|
}
|
|
1192
|
-
},
|
|
1193
|
-
"./de.ts":
|
|
1194
|
-
"./en.ts":
|
|
1195
|
-
}),
|
|
1196
|
-
for (let e in
|
|
1192
|
+
}, Gt = /* #__PURE__ */ Object.assign({
|
|
1193
|
+
"./de.ts": Ht,
|
|
1194
|
+
"./en.ts": Wt
|
|
1195
|
+
}), L = {};
|
|
1196
|
+
for (let e in Gt) {
|
|
1197
1197
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
1198
1198
|
if (!t) continue;
|
|
1199
1199
|
let n = t[1];
|
|
1200
|
-
n !== "index" && (
|
|
1200
|
+
n !== "index" && (L[n] = Gt[e].default);
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return
|
|
1202
|
+
function Kt(e) {
|
|
1203
|
+
return L[e.split("-")[0]?.toLowerCase() ?? "en"] ?? L.en ?? I;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return
|
|
1205
|
+
function qt(e, t, n) {
|
|
1206
|
+
return T(Kt(e)[t] ?? I[t], n);
|
|
1207
1207
|
}
|
|
1208
1208
|
// ../quality/src/structure/rules/duplicate-block-id.ts
|
|
1209
|
-
var
|
|
1209
|
+
var Jt = {
|
|
1210
1210
|
id: "structure.duplicate-block-id",
|
|
1211
1211
|
reference: "https://docs.templatical.com/quality/structure/rule-catalog#tree-integrity",
|
|
1212
1212
|
severity: "error"
|
|
1213
1213
|
};
|
|
1214
|
-
function
|
|
1215
|
-
for (let n of e) if (t.set(n.id, (t.get(n.id) ?? 0) + 1),
|
|
1214
|
+
function Yt(e, t) {
|
|
1215
|
+
for (let n of e) if (t.set(n.id, (t.get(n.id) ?? 0) + 1), u(n)) for (let e of n.children) Yt(e, t);
|
|
1216
1216
|
}
|
|
1217
|
-
var
|
|
1218
|
-
meta:
|
|
1217
|
+
var Xt = {
|
|
1218
|
+
meta: Jt,
|
|
1219
1219
|
template(e) {
|
|
1220
1220
|
let t = /* @__PURE__ */ new Map();
|
|
1221
|
-
|
|
1221
|
+
Yt(e.blocks, t);
|
|
1222
1222
|
let n = [];
|
|
1223
1223
|
for (let [e, r] of t) r > 1 && n.push({
|
|
1224
1224
|
blockId: e,
|
|
@@ -1226,14 +1226,14 @@ var qt = {
|
|
|
1226
1226
|
});
|
|
1227
1227
|
return n;
|
|
1228
1228
|
}
|
|
1229
|
-
},
|
|
1229
|
+
}, Zt = {
|
|
1230
1230
|
id: "structure.empty-column",
|
|
1231
1231
|
reference: "https://docs.templatical.com/quality/structure/rule-catalog#content-presence",
|
|
1232
1232
|
severity: "warning"
|
|
1233
1233
|
};
|
|
1234
|
-
function
|
|
1234
|
+
function Qt(e, t) {
|
|
1235
1235
|
for (let n of e) {
|
|
1236
|
-
if (!
|
|
1236
|
+
if (!u(n)) continue;
|
|
1237
1237
|
let e = n;
|
|
1238
1238
|
e.children.length > 1 && e.children.forEach((n, r) => {
|
|
1239
1239
|
n.length === 0 && t.push({
|
|
@@ -1241,29 +1241,29 @@ function Yt(e, t) {
|
|
|
1241
1241
|
params: { columnIndex: r + 1 }
|
|
1242
1242
|
});
|
|
1243
1243
|
});
|
|
1244
|
-
for (let n of e.children)
|
|
1244
|
+
for (let n of e.children) Qt(n, t);
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
|
-
var
|
|
1248
|
-
meta:
|
|
1247
|
+
var $t = {
|
|
1248
|
+
meta: Zt,
|
|
1249
1249
|
template(e) {
|
|
1250
1250
|
let t = [];
|
|
1251
|
-
return
|
|
1251
|
+
return Qt(e.blocks, t), t;
|
|
1252
1252
|
}
|
|
1253
|
-
},
|
|
1253
|
+
}, en = {
|
|
1254
1254
|
id: "structure.empty-section",
|
|
1255
1255
|
reference: "https://docs.templatical.com/quality/structure/rule-catalog#content-presence",
|
|
1256
1256
|
severity: "warning"
|
|
1257
1257
|
};
|
|
1258
|
-
function
|
|
1258
|
+
function tn(e) {
|
|
1259
1259
|
return e.children.length === 0 || e.children.every((e) => e.length === 0);
|
|
1260
1260
|
}
|
|
1261
|
-
var
|
|
1262
|
-
meta:
|
|
1261
|
+
var nn = {
|
|
1262
|
+
meta: en,
|
|
1263
1263
|
block(e) {
|
|
1264
|
-
if (!
|
|
1264
|
+
if (!u(e)) return null;
|
|
1265
1265
|
let t = e;
|
|
1266
|
-
return
|
|
1266
|
+
return tn(t) ? {
|
|
1267
1267
|
blockId: t.id,
|
|
1268
1268
|
fix: {
|
|
1269
1269
|
description: "Remove the empty section",
|
|
@@ -1274,7 +1274,7 @@ var $t = {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
} : null;
|
|
1276
1276
|
}
|
|
1277
|
-
},
|
|
1277
|
+
}, rn = {
|
|
1278
1278
|
meta: {
|
|
1279
1279
|
id: "structure.hero-not-applied",
|
|
1280
1280
|
reference: "https://docs.templatical.com/quality/structure/rule-catalog#content-presence",
|
|
@@ -1286,8 +1286,8 @@ var $t = {
|
|
|
1286
1286
|
]
|
|
1287
1287
|
},
|
|
1288
1288
|
block(e) {
|
|
1289
|
-
if (!
|
|
1290
|
-
let t =
|
|
1289
|
+
if (!u(e)) return null;
|
|
1290
|
+
let t = re(e);
|
|
1291
1291
|
return t === null || t.applied ? null : {
|
|
1292
1292
|
blockId: e.id,
|
|
1293
1293
|
messageVariant: t.reason
|
|
@@ -1295,22 +1295,22 @@ var $t = {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
};
|
|
1297
1297
|
// ../quality/src/structure/band.ts
|
|
1298
|
-
function
|
|
1299
|
-
return e.wrapper ? e.wrapper : t.parent &&
|
|
1298
|
+
function an(e, t) {
|
|
1299
|
+
return e.wrapper ? e.wrapper : t.parent && s(t.parent) ? {
|
|
1300
1300
|
backgroundColor: t.parent.styles?.backgroundColor,
|
|
1301
1301
|
backgroundImage: t.parent.backgroundImage
|
|
1302
1302
|
} : null;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function on(e) {
|
|
1305
1305
|
if (typeof e != "string") return !1;
|
|
1306
1306
|
let t = e.trim().toLowerCase();
|
|
1307
1307
|
return t !== "" && t !== "transparent";
|
|
1308
1308
|
}
|
|
1309
1309
|
// ../quality/src/structure/index.ts
|
|
1310
|
-
var
|
|
1311
|
-
qt,
|
|
1312
|
-
$t,
|
|
1310
|
+
var sn = [
|
|
1313
1311
|
Xt,
|
|
1312
|
+
nn,
|
|
1313
|
+
$t,
|
|
1314
1314
|
{
|
|
1315
1315
|
meta: {
|
|
1316
1316
|
id: "structure.nested-section",
|
|
@@ -1318,7 +1318,7 @@ var rn = [
|
|
|
1318
1318
|
severity: "error"
|
|
1319
1319
|
},
|
|
1320
1320
|
block(e, t) {
|
|
1321
|
-
return !
|
|
1321
|
+
return !u(e) || t.section === null ? null : {
|
|
1322
1322
|
blockId: e.id,
|
|
1323
1323
|
params: { parentId: t.section.id }
|
|
1324
1324
|
};
|
|
@@ -1331,14 +1331,14 @@ var rn = [
|
|
|
1331
1331
|
severity: "error"
|
|
1332
1332
|
},
|
|
1333
1333
|
block(e) {
|
|
1334
|
-
if (!
|
|
1335
|
-
let t = e, n =
|
|
1336
|
-
return
|
|
1334
|
+
if (!u(e)) return null;
|
|
1335
|
+
let t = e, n = r(t.columns), i = t.children.length;
|
|
1336
|
+
return i === n ? null : {
|
|
1337
1337
|
blockId: t.id,
|
|
1338
1338
|
params: {
|
|
1339
1339
|
layout: t.columns,
|
|
1340
1340
|
expected: n,
|
|
1341
|
-
actual:
|
|
1341
|
+
actual: i
|
|
1342
1342
|
}
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
@@ -1350,9 +1350,9 @@ var rn = [
|
|
|
1350
1350
|
severity: "warning"
|
|
1351
1351
|
},
|
|
1352
1352
|
block(e, t) {
|
|
1353
|
-
if (!
|
|
1354
|
-
let n =
|
|
1355
|
-
return n === null || !
|
|
1353
|
+
if (!u(e) || p(e.backgroundImage) === null) return null;
|
|
1354
|
+
let n = an(e, t);
|
|
1355
|
+
return n === null || !on(n.backgroundColor) ? null : { blockId: e.id };
|
|
1356
1356
|
}
|
|
1357
1357
|
},
|
|
1358
1358
|
{
|
|
@@ -1362,18 +1362,18 @@ var rn = [
|
|
|
1362
1362
|
severity: "warning"
|
|
1363
1363
|
},
|
|
1364
1364
|
block(e, t) {
|
|
1365
|
-
if (!
|
|
1366
|
-
let n =
|
|
1367
|
-
return n === null ||
|
|
1365
|
+
if (!u(e) || p(e.backgroundImage) === null) return null;
|
|
1366
|
+
let n = an(e, t);
|
|
1367
|
+
return n === null || p(n.backgroundImage) === null ? null : { blockId: e.id };
|
|
1368
1368
|
}
|
|
1369
1369
|
},
|
|
1370
|
-
|
|
1370
|
+
rn
|
|
1371
1371
|
];
|
|
1372
|
-
function
|
|
1373
|
-
return t.disabled === !0 || t.structure === !1 ? [] :
|
|
1372
|
+
function cn(e, t = {}) {
|
|
1373
|
+
return t.disabled === !0 || t.structure === !1 ? [] : S(e, sn, Oe(t.locale, t.structure ?? {}, sn), (e, t, n) => qt(e, t, n));
|
|
1374
1374
|
}
|
|
1375
1375
|
// ../quality/src/links/messages/de.ts
|
|
1376
|
-
var
|
|
1376
|
+
var ln = /* @__PURE__ */ e({ default: () => un }), un = {
|
|
1377
1377
|
"link.javascript-protocol": {
|
|
1378
1378
|
message: "Die URL verwendet das Protokoll „{protocol}:\", das beliebigen Skriptcode ausführen kann und aus Sicherheitsgründen beim Rendern entfernt wird.",
|
|
1379
1379
|
suggestion: "Ersetze sie durch eine echte URL oder entferne sie."
|
|
@@ -1398,7 +1398,7 @@ var on = /* @__PURE__ */ e({ default: () => sn }), sn = {
|
|
|
1398
1398
|
message: "Die URL „{url}\" ist relativ. Eine versendete E-Mail hat keine Seitenadresse, gegen die sie aufgelöst werden kann, daher funktioniert der Link nicht.",
|
|
1399
1399
|
suggestion: "Verwende eine absolute URL (https://…)."
|
|
1400
1400
|
}
|
|
1401
|
-
},
|
|
1401
|
+
}, dn = /* @__PURE__ */ e({ default: () => R }), R = {
|
|
1402
1402
|
"link.javascript-protocol": {
|
|
1403
1403
|
message: "URL uses the \"{protocol}:\" protocol, which can execute arbitrary script and is stripped at render time for safety.",
|
|
1404
1404
|
suggestion: "Replace it with a real link or remove the URL."
|
|
@@ -1423,51 +1423,51 @@ var on = /* @__PURE__ */ e({ default: () => sn }), sn = {
|
|
|
1423
1423
|
message: "URL \"{url}\" is relative. A sent email has no page address to resolve it against, so the link breaks.",
|
|
1424
1424
|
suggestion: "Use an absolute URL (https://…)."
|
|
1425
1425
|
}
|
|
1426
|
-
},
|
|
1427
|
-
"./de.ts":
|
|
1428
|
-
"./en.ts":
|
|
1429
|
-
}),
|
|
1430
|
-
for (let e in
|
|
1426
|
+
}, fn = /* #__PURE__ */ Object.assign({
|
|
1427
|
+
"./de.ts": ln,
|
|
1428
|
+
"./en.ts": dn
|
|
1429
|
+
}), z = {};
|
|
1430
|
+
for (let e in fn) {
|
|
1431
1431
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
1432
1432
|
if (!t) continue;
|
|
1433
1433
|
let n = t[1];
|
|
1434
|
-
n !== "index" && (
|
|
1434
|
+
n !== "index" && (z[n] = fn[e].default);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1436
|
+
function pn(e) {
|
|
1437
|
+
return z[e.split("-")[0]?.toLowerCase() ?? "en"] ?? z.en ?? R;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
return
|
|
1439
|
+
function mn(e, t, n) {
|
|
1440
|
+
return T(pn(e)[t] ?? R[t], n);
|
|
1441
1441
|
}
|
|
1442
1442
|
// ../quality/src/url-walker.ts
|
|
1443
|
-
function
|
|
1443
|
+
function B(e) {
|
|
1444
1444
|
let t = [];
|
|
1445
|
-
return
|
|
1446
|
-
if (
|
|
1445
|
+
return x(e, (e) => {
|
|
1446
|
+
if (n(e) || g(e) || fe(e)) for (let n of k(e.content)) t.push({
|
|
1447
1447
|
url: n.href,
|
|
1448
1448
|
blockId: e.id,
|
|
1449
1449
|
source: "anchor",
|
|
1450
1450
|
label: n.text
|
|
1451
1451
|
});
|
|
1452
|
-
else if (
|
|
1452
|
+
else if (m(e)) t.push({
|
|
1453
1453
|
url: e.url,
|
|
1454
1454
|
blockId: e.id,
|
|
1455
1455
|
source: "button",
|
|
1456
1456
|
label: e.text
|
|
1457
1457
|
});
|
|
1458
|
-
else if (
|
|
1458
|
+
else if (l(e)) e.linkUrl && e.linkUrl !== "" && t.push({
|
|
1459
1459
|
url: e.linkUrl,
|
|
1460
1460
|
blockId: e.id,
|
|
1461
1461
|
source: "image-link",
|
|
1462
1462
|
label: e.alt || void 0
|
|
1463
1463
|
});
|
|
1464
|
-
else if (
|
|
1464
|
+
else if (ie(e)) t.push({
|
|
1465
1465
|
url: e.url,
|
|
1466
1466
|
blockId: e.id,
|
|
1467
1467
|
source: "video",
|
|
1468
1468
|
label: e.alt || void 0
|
|
1469
1469
|
});
|
|
1470
|
-
else if (
|
|
1470
|
+
else if (i(e)) for (let n of e.items) t.push({
|
|
1471
1471
|
url: n.url,
|
|
1472
1472
|
blockId: e.id,
|
|
1473
1473
|
source: "menu-item",
|
|
@@ -1482,21 +1482,21 @@ function U(e) {
|
|
|
1482
1482
|
}), t;
|
|
1483
1483
|
}
|
|
1484
1484
|
// ../quality/src/links/rules/javascript-protocol.ts
|
|
1485
|
-
var
|
|
1485
|
+
var hn = {
|
|
1486
1486
|
id: "link.javascript-protocol",
|
|
1487
1487
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#dangerous-protocols",
|
|
1488
1488
|
severity: "error"
|
|
1489
|
-
},
|
|
1490
|
-
function
|
|
1491
|
-
let t =
|
|
1492
|
-
return
|
|
1489
|
+
}, gn = ce;
|
|
1490
|
+
function _n(e) {
|
|
1491
|
+
let t = te(e), n = te(e.replace(/\s+/g, ""));
|
|
1492
|
+
return gn.find((e) => e === t || e === n) ?? null;
|
|
1493
1493
|
}
|
|
1494
|
-
var
|
|
1495
|
-
meta:
|
|
1494
|
+
var vn = {
|
|
1495
|
+
meta: hn,
|
|
1496
1496
|
template(e) {
|
|
1497
1497
|
let t = [];
|
|
1498
|
-
for (let n of
|
|
1499
|
-
let e =
|
|
1498
|
+
for (let n of B(e)) {
|
|
1499
|
+
let e = _n(n.url);
|
|
1500
1500
|
e !== null && t.push({
|
|
1501
1501
|
blockId: n.blockId,
|
|
1502
1502
|
params: { protocol: e }
|
|
@@ -1504,41 +1504,41 @@ var hn = {
|
|
|
1504
1504
|
}
|
|
1505
1505
|
return t;
|
|
1506
1506
|
}
|
|
1507
|
-
},
|
|
1507
|
+
}, yn = {
|
|
1508
1508
|
id: "link.unsupported-protocol",
|
|
1509
1509
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#unsupported-protocols",
|
|
1510
1510
|
severity: "warning"
|
|
1511
|
-
},
|
|
1511
|
+
}, bn = /* @__PURE__ */ new Set([
|
|
1512
1512
|
"http",
|
|
1513
1513
|
"https",
|
|
1514
1514
|
"mailto",
|
|
1515
1515
|
"tel",
|
|
1516
1516
|
"sms"
|
|
1517
|
-
]),
|
|
1518
|
-
function
|
|
1517
|
+
]), xn = new Set(gn);
|
|
1518
|
+
function Sn(e) {
|
|
1519
1519
|
if (!e) return null;
|
|
1520
1520
|
let t = e.trim(), n = /^([a-z][a-z0-9+\-.]*):/i.exec(t);
|
|
1521
1521
|
return n ? n[1].toLowerCase() : null;
|
|
1522
1522
|
}
|
|
1523
|
-
var
|
|
1524
|
-
meta:
|
|
1523
|
+
var Cn = {
|
|
1524
|
+
meta: yn,
|
|
1525
1525
|
template(e) {
|
|
1526
1526
|
let t = [];
|
|
1527
|
-
for (let n of
|
|
1528
|
-
let e =
|
|
1529
|
-
e !== null && (
|
|
1527
|
+
for (let n of B(e)) {
|
|
1528
|
+
let e = Sn(n.url);
|
|
1529
|
+
e !== null && (xn.has(e) || bn.has(e) || t.push({
|
|
1530
1530
|
blockId: n.blockId,
|
|
1531
1531
|
params: { protocol: e }
|
|
1532
1532
|
}));
|
|
1533
1533
|
}
|
|
1534
1534
|
return t;
|
|
1535
1535
|
}
|
|
1536
|
-
},
|
|
1536
|
+
}, wn = {
|
|
1537
1537
|
id: "link.malformed-mailto",
|
|
1538
1538
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#malformed-uris",
|
|
1539
1539
|
severity: "warning"
|
|
1540
1540
|
};
|
|
1541
|
-
function
|
|
1541
|
+
function Tn(e) {
|
|
1542
1542
|
let t = e.trim();
|
|
1543
1543
|
if (!/^mailto:/i.test(t)) return !1;
|
|
1544
1544
|
let [n] = t.slice(7).split("?", 2);
|
|
@@ -1553,39 +1553,39 @@ function Sn(e) {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
return !1;
|
|
1555
1555
|
}
|
|
1556
|
-
var
|
|
1557
|
-
meta:
|
|
1556
|
+
var En = {
|
|
1557
|
+
meta: wn,
|
|
1558
1558
|
template(e) {
|
|
1559
1559
|
let t = [];
|
|
1560
|
-
for (let n of
|
|
1560
|
+
for (let n of B(e)) Tn(n.url) && t.push({ blockId: n.blockId });
|
|
1561
1561
|
return t;
|
|
1562
1562
|
}
|
|
1563
|
-
},
|
|
1563
|
+
}, Dn = {
|
|
1564
1564
|
id: "link.malformed-tel",
|
|
1565
1565
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#malformed-uris",
|
|
1566
1566
|
severity: "warning"
|
|
1567
|
-
},
|
|
1568
|
-
function
|
|
1567
|
+
}, On = /^[+0-9\s().\-]+$/, kn = /^[A-Za-z0-9-]+(=[^;]+)?$/;
|
|
1568
|
+
function An(e) {
|
|
1569
1569
|
let t = e.trim();
|
|
1570
1570
|
if (!/^tel:/i.test(t)) return !1;
|
|
1571
1571
|
let n = t.slice(4).trim();
|
|
1572
1572
|
if (n === "") return !0;
|
|
1573
1573
|
let [r, ...i] = n.split(";");
|
|
1574
|
-
return !
|
|
1574
|
+
return !On.test(r) || i.some((e) => !kn.test(e));
|
|
1575
1575
|
}
|
|
1576
|
-
var
|
|
1577
|
-
meta:
|
|
1576
|
+
var jn = {
|
|
1577
|
+
meta: Dn,
|
|
1578
1578
|
template(e) {
|
|
1579
1579
|
let t = [];
|
|
1580
|
-
for (let n of
|
|
1580
|
+
for (let n of B(e)) An(n.url) && t.push({ blockId: n.blockId });
|
|
1581
1581
|
return t;
|
|
1582
1582
|
}
|
|
1583
|
-
},
|
|
1583
|
+
}, Mn = {
|
|
1584
1584
|
id: "link.localhost-or-staging",
|
|
1585
1585
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#environment-leaks",
|
|
1586
1586
|
severity: "warning"
|
|
1587
1587
|
};
|
|
1588
|
-
function
|
|
1588
|
+
function Nn(e, t) {
|
|
1589
1589
|
let n = e.toLowerCase().split("*");
|
|
1590
1590
|
if (n.length === 1) return t === n[0];
|
|
1591
1591
|
let r = n[0], i = n[n.length - 1];
|
|
@@ -1599,7 +1599,7 @@ function An(e, t) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
return !0;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function Pn(e) {
|
|
1603
1603
|
if (!e) return null;
|
|
1604
1604
|
let t = e.trim();
|
|
1605
1605
|
if (!/^(https?|ftps?):\/\//i.test(t)) return null;
|
|
@@ -1609,38 +1609,38 @@ function jn(e) {
|
|
|
1609
1609
|
return null;
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
|
-
var
|
|
1613
|
-
meta:
|
|
1612
|
+
var Fn = {
|
|
1613
|
+
meta: Mn,
|
|
1614
1614
|
template(e, t) {
|
|
1615
1615
|
let n = t.links.nonProductionHosts;
|
|
1616
1616
|
if (n.length === 0) return [];
|
|
1617
1617
|
let r = [];
|
|
1618
|
-
for (let t of
|
|
1619
|
-
let e =
|
|
1620
|
-
e !== null && n.some((t) =>
|
|
1618
|
+
for (let t of B(e)) {
|
|
1619
|
+
let e = Pn(t.url);
|
|
1620
|
+
e !== null && n.some((t) => Nn(t, e)) && r.push({
|
|
1621
1621
|
blockId: t.blockId,
|
|
1622
1622
|
params: { host: e }
|
|
1623
1623
|
});
|
|
1624
1624
|
}
|
|
1625
1625
|
return r;
|
|
1626
1626
|
}
|
|
1627
|
-
},
|
|
1627
|
+
}, In = {
|
|
1628
1628
|
id: "link.relative-url",
|
|
1629
1629
|
reference: "https://docs.templatical.com/quality/links/rule-catalog#unsupported-protocols",
|
|
1630
1630
|
severity: "warning"
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1633
|
-
bn,
|
|
1631
|
+
}, Ln = /^(?:\/|\.{1,2}\/|\?)/, Rn = [
|
|
1632
|
+
vn,
|
|
1634
1633
|
Cn,
|
|
1635
|
-
|
|
1636
|
-
|
|
1634
|
+
En,
|
|
1635
|
+
jn,
|
|
1636
|
+
Fn,
|
|
1637
1637
|
{
|
|
1638
|
-
meta:
|
|
1638
|
+
meta: In,
|
|
1639
1639
|
template(e) {
|
|
1640
1640
|
let t = [];
|
|
1641
|
-
for (let n of
|
|
1641
|
+
for (let n of B(e)) {
|
|
1642
1642
|
let e = n.url?.trim();
|
|
1643
|
-
e &&
|
|
1643
|
+
e && Ln.test(e) && t.push({
|
|
1644
1644
|
blockId: n.blockId,
|
|
1645
1645
|
params: { url: e }
|
|
1646
1646
|
});
|
|
@@ -1649,11 +1649,11 @@ var Mn = {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
];
|
|
1652
|
-
function
|
|
1653
|
-
return t.disabled === !0 || t.links === !1 ? [] :
|
|
1652
|
+
function zn(e, t = {}) {
|
|
1653
|
+
return t.disabled === !0 || t.links === !1 ? [] : S(e, Rn, ke(t.locale, t.links ?? {}, Rn), (e, t, n) => mn(e, t, n));
|
|
1654
1654
|
}
|
|
1655
1655
|
// ../quality/src/deliverability/messages/de.ts
|
|
1656
|
-
var
|
|
1656
|
+
var Bn = /* @__PURE__ */ e({ default: () => Vn }), Vn = {
|
|
1657
1657
|
"deliverability.link-text-domain-mismatch": {
|
|
1658
1658
|
message: "Der Linktext zeigt {textHost}, der Link führt aber zu {linkHost}. Spamfilter werten solche Links als Phishing.",
|
|
1659
1659
|
suggestion: "Lass den Text zum Ziel passen oder verwende Wörter statt einer Adresse."
|
|
@@ -1670,7 +1670,7 @@ var Ln = /* @__PURE__ */ e({ default: () => Rn }), Rn = {
|
|
|
1670
1670
|
message: "Diese E-Mail enthält Bilder, aber nur {count} Zeichen Text (weniger als {min}). Manche Spamfilter bewerten bildlastige E-Mails mit wenig Text negativ, und wer Bilder blockiert, sieht fast nichts.",
|
|
1671
1671
|
suggestion: "Ergänze Text, der die Botschaft trägt."
|
|
1672
1672
|
}
|
|
1673
|
-
},
|
|
1673
|
+
}, Hn = /* @__PURE__ */ e({ default: () => V }), V = {
|
|
1674
1674
|
"deliverability.link-text-domain-mismatch": {
|
|
1675
1675
|
message: "The link text shows {textHost}, but the link goes to {linkHost}. Spam filters flag links like this as phishing.",
|
|
1676
1676
|
suggestion: "Make the text match the destination, or use words instead of an address."
|
|
@@ -1687,25 +1687,25 @@ var Ln = /* @__PURE__ */ e({ default: () => Rn }), Rn = {
|
|
|
1687
1687
|
message: "This email has images but only {count} characters of text (under {min}). Some spam filters score image-heavy emails with little text, and readers who block images see almost nothing.",
|
|
1688
1688
|
suggestion: "Add text that carries the message."
|
|
1689
1689
|
}
|
|
1690
|
-
},
|
|
1691
|
-
"./de.ts":
|
|
1692
|
-
"./en.ts":
|
|
1693
|
-
}),
|
|
1694
|
-
for (let e in
|
|
1690
|
+
}, Un = /* #__PURE__ */ Object.assign({
|
|
1691
|
+
"./de.ts": Bn,
|
|
1692
|
+
"./en.ts": Hn
|
|
1693
|
+
}), H = {};
|
|
1694
|
+
for (let e in Un) {
|
|
1695
1695
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
1696
1696
|
if (!t) continue;
|
|
1697
1697
|
let n = t[1];
|
|
1698
|
-
n !== "index" && (
|
|
1698
|
+
n !== "index" && (H[n] = Un[e].default);
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1701
|
-
return
|
|
1700
|
+
function Wn(e) {
|
|
1701
|
+
return H[e.split("-")[0]?.toLowerCase() ?? "en"] ?? H.en ?? V;
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
return
|
|
1703
|
+
function Gn(e, t, n) {
|
|
1704
|
+
return T(Wn(e)[t] ?? V[t], n);
|
|
1705
1705
|
}
|
|
1706
1706
|
// ../quality/src/deliverability/same-site.ts
|
|
1707
|
-
var
|
|
1708
|
-
function
|
|
1707
|
+
var Kn = "ac.jp ac.uk co.at co.id co.il co.in co.jp co.kr co.nz co.uk co.za com.ar com.au com.br com.cn com.co com.hk com.mx com.my com.ph com.pl com.sg com.tr com.tw com.ua edu.au go.jp gov.au gov.uk ltd.uk me.uk ne.jp net.au net.br net.cn net.in net.nz or.at or.jp or.kr org.au org.br org.cn org.in org.nz org.uk plc.uk".split(" "), qn = new Set(Kn);
|
|
1708
|
+
function U(e) {
|
|
1709
1709
|
try {
|
|
1710
1710
|
let t = new URL(e);
|
|
1711
1711
|
return (t.protocol === "http:" || t.protocol === "https:") && !/[{}]/.test(t.hostname) ? t : null;
|
|
@@ -1713,41 +1713,41 @@ function K(e) {
|
|
|
1713
1713
|
return null;
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function W(e) {
|
|
1717
1717
|
return e.hostname.toLowerCase().replace(/\.$/, "").replace(/^www\./, "");
|
|
1718
1718
|
}
|
|
1719
|
-
function
|
|
1719
|
+
function Jn(e) {
|
|
1720
1720
|
if (/^\d+\.\d+\.\d+\.\d+$/.test(e) || e.startsWith("[")) return e;
|
|
1721
1721
|
let t = e.split("."), n = t.slice(-2).join(".");
|
|
1722
|
-
return t.slice(-(
|
|
1722
|
+
return t.slice(-(qn.has(n) ? 3 : 2)).join(".");
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1725
|
-
let n =
|
|
1726
|
-
return !n || !r ? !1 :
|
|
1724
|
+
function Yn(e, t) {
|
|
1725
|
+
let n = U(`http://${e}`), r = U(`http://${t}`);
|
|
1726
|
+
return !n || !r ? !1 : Jn(W(n)) === Jn(W(r));
|
|
1727
1727
|
}
|
|
1728
1728
|
// ../quality/src/deliverability/rules/link-text-domain-mismatch.ts
|
|
1729
|
-
var
|
|
1729
|
+
var Xn = {
|
|
1730
1730
|
id: "deliverability.link-text-domain-mismatch",
|
|
1731
1731
|
reference: "https://docs.rspamd.com/modules/phishing/",
|
|
1732
1732
|
severity: "warning"
|
|
1733
|
-
},
|
|
1734
|
-
function
|
|
1733
|
+
}, Zn = /^(?:https?:\/\/)?(?:[\p{L}\p{N}](?:[\p{L}\p{N}-]*[\p{L}\p{N}])?\.)+(?:\p{L}{2,}|xn--[a-z0-9-]+)(?::\d+)?(?:[/?#][^\s]*)?$/iu;
|
|
1734
|
+
function Qn(e) {
|
|
1735
1735
|
if (!e) return null;
|
|
1736
1736
|
let t = e.trim();
|
|
1737
|
-
return t.startsWith("<") && t.endsWith(">") && (t = t.slice(1, -1)), t = t.replace(/[.,;:!?)]+$/, ""),
|
|
1737
|
+
return t.startsWith("<") && t.endsWith(">") && (t = t.slice(1, -1)), t = t.replace(/[.,;:!?)]+$/, ""), Zn.test(t) ? U(/^https?:\/\//i.test(t) ? t : `http://${t}`) : null;
|
|
1738
1738
|
}
|
|
1739
1739
|
// ../quality/src/deliverability/index.ts
|
|
1740
|
-
var
|
|
1740
|
+
var $n = [
|
|
1741
1741
|
{
|
|
1742
|
-
meta:
|
|
1742
|
+
meta: Xn,
|
|
1743
1743
|
template(e) {
|
|
1744
1744
|
let t = [];
|
|
1745
|
-
for (let n of
|
|
1745
|
+
for (let n of B(e)) {
|
|
1746
1746
|
if (n.source !== "anchor" && n.source !== "button" && n.source !== "menu-item") continue;
|
|
1747
|
-
let e =
|
|
1747
|
+
let e = Qn(n.label), r = U(n.url);
|
|
1748
1748
|
if (!e || !r) continue;
|
|
1749
|
-
let i =
|
|
1750
|
-
|
|
1749
|
+
let i = W(e), a = W(r);
|
|
1750
|
+
Yn(i, a) || t.push({
|
|
1751
1751
|
blockId: n.blockId,
|
|
1752
1752
|
params: {
|
|
1753
1753
|
textHost: i,
|
|
@@ -1766,10 +1766,10 @@ var Xn = [
|
|
|
1766
1766
|
},
|
|
1767
1767
|
template(e, t) {
|
|
1768
1768
|
let n = [];
|
|
1769
|
-
for (let r of
|
|
1770
|
-
let e =
|
|
1769
|
+
for (let r of B(e)) {
|
|
1770
|
+
let e = U(r.url);
|
|
1771
1771
|
if (!e) continue;
|
|
1772
|
-
let i =
|
|
1772
|
+
let i = W(e);
|
|
1773
1773
|
t.deliverability.shortenerHosts.some((e) => i === e || i.endsWith(`.${e}`)) && n.push({
|
|
1774
1774
|
blockId: r.blockId,
|
|
1775
1775
|
params: { host: i }
|
|
@@ -1786,10 +1786,10 @@ var Xn = [
|
|
|
1786
1786
|
},
|
|
1787
1787
|
template(e) {
|
|
1788
1788
|
let t = [];
|
|
1789
|
-
for (let n of
|
|
1790
|
-
let e =
|
|
1789
|
+
for (let n of B(e)) {
|
|
1790
|
+
let e = U(n.url);
|
|
1791
1791
|
if (!e) continue;
|
|
1792
|
-
let r =
|
|
1792
|
+
let r = W(e), i = /^(?:\d{1,3}\.){3}\d{1,3}$/.test(r), a = r.startsWith("[") && r.endsWith("]");
|
|
1793
1793
|
(i || a) && (r.startsWith("127.") || r === "0.0.0.0" || r === "[::1]" || t.push({
|
|
1794
1794
|
blockId: n.blockId,
|
|
1795
1795
|
params: { host: r }
|
|
@@ -1806,26 +1806,26 @@ var Xn = [
|
|
|
1806
1806
|
},
|
|
1807
1807
|
template(e, t) {
|
|
1808
1808
|
let r = !1, a = !1, o = [];
|
|
1809
|
-
if (
|
|
1810
|
-
if (e.type === "custom" && (r = !0), (
|
|
1811
|
-
if (
|
|
1809
|
+
if (x(e, (e) => {
|
|
1810
|
+
if (e.type === "custom" && (r = !0), (l(e) && e.src.trim() !== "" || ie(e) || ue(e)) && (a = !0), (n(e) || g(e) || fe(e)) && o.push(A(e.content)), ae(e)) for (let t of e.rows) for (let e of t.cells) o.push(A(e.content));
|
|
1811
|
+
if (m(e) && o.push(e.text), i(e)) for (let t of e.items) o.push(t.text);
|
|
1812
1812
|
}), r || !a) return [];
|
|
1813
|
-
let
|
|
1814
|
-
return
|
|
1813
|
+
let s = o.join(" ").replace(/\s+/g, " ").trim().length, c = t.deliverability.minTextLength;
|
|
1814
|
+
return s < c ? [{
|
|
1815
1815
|
blockId: null,
|
|
1816
1816
|
params: {
|
|
1817
|
-
count:
|
|
1818
|
-
min:
|
|
1817
|
+
count: s,
|
|
1818
|
+
min: c
|
|
1819
1819
|
}
|
|
1820
1820
|
}] : [];
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
];
|
|
1824
|
-
function
|
|
1825
|
-
return t.disabled === !0 || t.deliverability === !1 ? [] :
|
|
1824
|
+
function er(e, t = {}) {
|
|
1825
|
+
return t.disabled === !0 || t.deliverability === !1 ? [] : S(e, $n, Te(t.locale, t.deliverability ?? {}, $n), (e, t, n) => Gn(e, t, n));
|
|
1826
1826
|
}
|
|
1827
1827
|
// ../quality/src/compatibility/data/caniemail.generated.ts
|
|
1828
|
-
var
|
|
1828
|
+
var tr = {
|
|
1829
1829
|
family: {
|
|
1830
1830
|
gmail: "Gmail",
|
|
1831
1831
|
outlook: "Outlook",
|
|
@@ -1862,7 +1862,7 @@ var Qn = {
|
|
|
1862
1862
|
"windows-mail": "Windows Mail",
|
|
1863
1863
|
"outlook-com": "Outlook.com"
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1865
|
+
}, nr = {
|
|
1866
1866
|
"css-display-flex": {
|
|
1867
1867
|
title: "display:flex",
|
|
1868
1868
|
url: "https://www.caniemail.com/features/css-display-flex/",
|
|
@@ -3893,7 +3893,7 @@ var Qn = {
|
|
|
3893
3893
|
}
|
|
3894
3894
|
}
|
|
3895
3895
|
}
|
|
3896
|
-
},
|
|
3896
|
+
}, rr = [
|
|
3897
3897
|
"css-display-flex",
|
|
3898
3898
|
"css-display-grid",
|
|
3899
3899
|
"css-position",
|
|
@@ -3913,7 +3913,7 @@ var Qn = {
|
|
|
3913
3913
|
"image-base64"
|
|
3914
3914
|
];
|
|
3915
3915
|
// ../quality/src/compatibility/scan.ts
|
|
3916
|
-
function
|
|
3916
|
+
function ir(e) {
|
|
3917
3917
|
let t = "", n = 0;
|
|
3918
3918
|
for (;;) {
|
|
3919
3919
|
let r = e.indexOf("/*", n);
|
|
@@ -3924,7 +3924,7 @@ function tr(e) {
|
|
|
3924
3924
|
n = i + 2;
|
|
3925
3925
|
}
|
|
3926
3926
|
}
|
|
3927
|
-
function
|
|
3927
|
+
function G(e) {
|
|
3928
3928
|
let t = e.toLowerCase(), n = (e, n) => {
|
|
3929
3929
|
let r = t.indexOf(e, n);
|
|
3930
3930
|
return r === -1 ? Infinity : r;
|
|
@@ -3958,8 +3958,8 @@ function J(e) {
|
|
|
3958
3958
|
o = l + 1;
|
|
3959
3959
|
}
|
|
3960
3960
|
}
|
|
3961
|
-
function
|
|
3962
|
-
let a = [], o =
|
|
3961
|
+
function ar(e, t, n, r, i) {
|
|
3962
|
+
let a = [], o = ir(e).replace(/data:([\w.+-]+\/[\w.+-]+)[^)"']*/gi, "data:$1");
|
|
3963
3963
|
for (let e of o.matchAll(/(?:^|[;{])\s*([\w-]+)\s*:\s*([^;}]+)/g)) a.push({
|
|
3964
3964
|
prop: e[1].toLowerCase(),
|
|
3965
3965
|
value: e[2].trim(),
|
|
@@ -3970,19 +3970,19 @@ function nr(e, t, n, r, i) {
|
|
|
3970
3970
|
});
|
|
3971
3971
|
return a;
|
|
3972
3972
|
}
|
|
3973
|
-
function
|
|
3973
|
+
function or(e, t = "", n = []) {
|
|
3974
3974
|
let r = {
|
|
3975
3975
|
tags: [],
|
|
3976
3976
|
css: [],
|
|
3977
3977
|
cssTexts: [],
|
|
3978
3978
|
urls: [...n]
|
|
3979
3979
|
}, i = !1, a = "", o = 0, s = (e, t, n, i) => {
|
|
3980
|
-
r.cssTexts.push(
|
|
3980
|
+
r.cssTexts.push(ir(e));
|
|
3981
3981
|
let a = o++;
|
|
3982
|
-
if (i) r.css.push(...
|
|
3983
|
-
else for (let [i, o] of e.split("}").entries()) r.css.push(...
|
|
3982
|
+
if (i) r.css.push(...ar(e, t, n, !0, `${a}`));
|
|
3983
|
+
else for (let [i, o] of e.split("}").entries()) r.css.push(...ar(o, t, n, !1, `${a}:${i}`));
|
|
3984
3984
|
};
|
|
3985
|
-
return new
|
|
3985
|
+
return new _({
|
|
3986
3986
|
onopentag(e, t) {
|
|
3987
3987
|
r.tags.push({
|
|
3988
3988
|
tag: e,
|
|
@@ -3997,7 +3997,7 @@ function rr(e, t = "", n = []) {
|
|
|
3997
3997
|
}
|
|
3998
3998
|
}, { decodeEntities: !0 }).end(e), t && s(t, "stylesheet", {}, !1), r;
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4000
|
+
function sr(e) {
|
|
4001
4001
|
let t = [], n = [], r = [];
|
|
4002
4002
|
switch (e.type) {
|
|
4003
4003
|
case "html":
|
|
@@ -4022,15 +4022,15 @@ function ir(e) {
|
|
|
4022
4022
|
break;
|
|
4023
4023
|
case "wrapper": e.backgroundImage && r.push(e.backgroundImage.url);
|
|
4024
4024
|
}
|
|
4025
|
-
return
|
|
4025
|
+
return or(t.join("\n"), n.join("\n"), r);
|
|
4026
4026
|
}
|
|
4027
4027
|
// ../quality/src/compatibility/detect.ts
|
|
4028
|
-
var
|
|
4029
|
-
function
|
|
4028
|
+
var cr = (e) => e.replace(/\s+/g, " ").trim().slice(0, 80), K = ({ prop: e, value: t }) => cr(`${e}: ${t}`), lr = (e) => `<${e}>`, ur = /#[0-9a-f]{3,8}\b|\b(?:rgba?|hsla?)\(/i;
|
|
4029
|
+
function dr(e) {
|
|
4030
4030
|
let t = /^\s*data:(image\/[\w.+-]+)/i.exec(e);
|
|
4031
4031
|
return t ? t[1].toLowerCase() : null;
|
|
4032
4032
|
}
|
|
4033
|
-
function
|
|
4033
|
+
function fr(e) {
|
|
4034
4034
|
let t = /* @__PURE__ */ new Map();
|
|
4035
4035
|
for (let n of e.css) {
|
|
4036
4036
|
let e = n.group, r = t.get(e);
|
|
@@ -4038,27 +4038,27 @@ function lr(e) {
|
|
|
4038
4038
|
}
|
|
4039
4039
|
for (let e of t.values()) {
|
|
4040
4040
|
let t = e.find((e) => (e.prop === "background" || e.prop === "background-image") && /url\(/i.test(e.value));
|
|
4041
|
-
if (!(!t || "bgcolor" in t.attrs) && !e.some((e) => e.prop === "background-color" || e.prop === "background" &&
|
|
4041
|
+
if (!(!t || "bgcolor" in t.attrs) && !e.some((e) => e.prop === "background-color" || e.prop === "background" && ur.test(G(e.value)))) return t;
|
|
4042
4042
|
}
|
|
4043
4043
|
}
|
|
4044
|
-
function
|
|
4044
|
+
function pr(e, t) {
|
|
4045
4045
|
let n = e.css, r = e.tags, i, a;
|
|
4046
4046
|
switch (t) {
|
|
4047
4047
|
case "compat.css-display-flex":
|
|
4048
4048
|
case "compat.css-display-grid": {
|
|
4049
4049
|
let e = t.endsWith("flex") ? "flex" : "grid";
|
|
4050
4050
|
return i = n.find((t) => t.prop === "display" && RegExp(`^(?:inline-)?${e}\\b`, "i").test(t.value)), i ? {
|
|
4051
|
-
excerpt:
|
|
4051
|
+
excerpt: K(i),
|
|
4052
4052
|
usage: i.value.match(/^(?:inline-)?(?:flex|grid)/i)?.[0].toLowerCase()
|
|
4053
4053
|
} : null;
|
|
4054
4054
|
}
|
|
4055
4055
|
case "compat.css-position": return i = n.find((e) => e.prop === "position" && /^(absolute|fixed|sticky)\b/i.test(e.value)), i ? {
|
|
4056
|
-
excerpt:
|
|
4056
|
+
excerpt: K(i),
|
|
4057
4057
|
usage: i.value.match(/^\w+/)?.[0].toLowerCase(),
|
|
4058
4058
|
value: i.value.match(/^\w+/)?.[0].toLowerCase()
|
|
4059
4059
|
} : null;
|
|
4060
|
-
case "compat.css-variables": return i = n.find((e) => /\bvar\(\s*--/i.test(
|
|
4061
|
-
case "compat.css-at-import": return e.cssTexts.some((e) => /@import\b/i.test(
|
|
4060
|
+
case "compat.css-variables": return i = n.find((e) => /\bvar\(\s*--/i.test(G(e.value))), i ? { excerpt: K(i) } : null;
|
|
4061
|
+
case "compat.css-at-import": return e.cssTexts.some((e) => /@import\b/i.test(G(e))) ? { excerpt: "@import" } : null;
|
|
4062
4062
|
case "compat.html-link": return r.some((e) => e.tag === "link" && /(?:^|\s)stylesheet(?:\s|$)/i.test(e.attrs.rel ?? "")) ? { excerpt: "<link rel=\"stylesheet\">" } : null;
|
|
4063
4063
|
case "compat.html-style":
|
|
4064
4064
|
case "compat.html-svg":
|
|
@@ -4066,33 +4066,33 @@ function ur(e, t) {
|
|
|
4066
4066
|
case "compat.html-video":
|
|
4067
4067
|
case "compat.html-audio":
|
|
4068
4068
|
case "compat.html-script":
|
|
4069
|
-
case "compat.html-iframe": return a = t.slice(12), r.some((e) => e.tag === a) ? { excerpt:
|
|
4069
|
+
case "compat.html-iframe": return a = t.slice(12), r.some((e) => e.tag === a) ? { excerpt: lr(a) } : null;
|
|
4070
4070
|
case "compat.html-form": return a = r.find((e) => [
|
|
4071
4071
|
"form",
|
|
4072
4072
|
"input",
|
|
4073
4073
|
"select",
|
|
4074
4074
|
"textarea"
|
|
4075
|
-
].includes(e.tag))?.tag, a ? { excerpt:
|
|
4075
|
+
].includes(e.tag))?.tag, a ? { excerpt: lr(a) } : null;
|
|
4076
4076
|
case "compat.css-width": return i = n.find((e) => e.inline && e.prop === "width" && ([
|
|
4077
4077
|
"div",
|
|
4078
4078
|
"p",
|
|
4079
4079
|
"span",
|
|
4080
4080
|
"body"
|
|
4081
4081
|
].includes(e.tag) || e.tag === "img" && !("width" in e.attrs))), i ? {
|
|
4082
|
-
excerpt:
|
|
4082
|
+
excerpt: K(i),
|
|
4083
4083
|
tag: i.tag
|
|
4084
4084
|
} : null;
|
|
4085
4085
|
case "compat.css-max-width": return i = n.find((e) => e.inline && e.prop === "max-width" && e.tag !== "table"), i ? {
|
|
4086
|
-
excerpt:
|
|
4086
|
+
excerpt: K(i),
|
|
4087
4087
|
tag: i.tag
|
|
4088
4088
|
} : null;
|
|
4089
4089
|
case "compat.css-float": return i = n.find((e) => e.prop === "float"), i ? {
|
|
4090
|
-
excerpt:
|
|
4090
|
+
excerpt: K(i),
|
|
4091
4091
|
tag: i.tag
|
|
4092
4092
|
} : null;
|
|
4093
|
-
case "compat.css-background-image": return i =
|
|
4093
|
+
case "compat.css-background-image": return i = fr(e), i ? { excerpt: K(i) } : null;
|
|
4094
4094
|
case "compat.image-base64": {
|
|
4095
|
-
let t = e.cssTexts.flatMap((e) => [...e.matchAll(/url\(\s*['"]?\s*(data:image\/[\w.+-]+)/gi)].map((e) => e[1])), n = [...e.urls, ...t].map(
|
|
4095
|
+
let t = e.cssTexts.flatMap((e) => [...e.matchAll(/url\(\s*['"]?\s*(data:image\/[\w.+-]+)/gi)].map((e) => e[1])), n = [...e.urls, ...t].map(dr).find((e) => e !== null);
|
|
4096
4096
|
return n ? {
|
|
4097
4097
|
excerpt: `data:${n}`,
|
|
4098
4098
|
usage: n
|
|
@@ -4102,14 +4102,14 @@ function ur(e, t) {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
4104
|
// ../quality/src/compatibility/support.ts
|
|
4105
|
-
var
|
|
4105
|
+
var mr = nr, hr = [
|
|
4106
4106
|
"gmail",
|
|
4107
4107
|
"outlook",
|
|
4108
4108
|
"apple-mail",
|
|
4109
4109
|
"yahoo",
|
|
4110
4110
|
"samsung-email"
|
|
4111
|
-
],
|
|
4112
|
-
function
|
|
4111
|
+
], q = tr.family, gr = tr.platform;
|
|
4112
|
+
function _r(e, t, n) {
|
|
4113
4113
|
switch (e) {
|
|
4114
4114
|
case "css-display-flex": return t === 2 && n === "inline-flex";
|
|
4115
4115
|
case "css-position": {
|
|
@@ -4128,14 +4128,14 @@ function mr(e, t, n) {
|
|
|
4128
4128
|
default: return !1;
|
|
4129
4129
|
}
|
|
4130
4130
|
}
|
|
4131
|
-
function
|
|
4132
|
-
let n =
|
|
4131
|
+
function vr(e, t = "") {
|
|
4132
|
+
let n = mr[e];
|
|
4133
4133
|
if (!n) return [];
|
|
4134
4134
|
let r = [];
|
|
4135
4135
|
for (let [i, a] of Object.entries(n.cells)) {
|
|
4136
|
-
let o = i.indexOf("."), s = i.slice(0, o), c = i.slice(o + 1), l = a.notes.some((n) =>
|
|
4136
|
+
let o = i.indexOf("."), s = i.slice(0, o), c = i.slice(o + 1), l = a.notes.some((n) => _r(e, n, t)) || a.value === "n" ? "unsupported" : a.value === "a" ? "partial" : null;
|
|
4137
4137
|
if (!l) continue;
|
|
4138
|
-
let u =
|
|
4138
|
+
let u = q[s] ?? s, d = gr[c] ?? c;
|
|
4139
4139
|
r.push({
|
|
4140
4140
|
id: i,
|
|
4141
4141
|
name: d.toLowerCase().includes(u.toLowerCase()) ? d : `${u} ${d}`,
|
|
@@ -4146,7 +4146,7 @@ function hr(e, t = "") {
|
|
|
4146
4146
|
}
|
|
4147
4147
|
return r;
|
|
4148
4148
|
}
|
|
4149
|
-
function
|
|
4149
|
+
function yr(e, t, n) {
|
|
4150
4150
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
4151
4151
|
for (let n of e) {
|
|
4152
4152
|
let e = n.id.split(".")[0], a = r.get(e);
|
|
@@ -4156,16 +4156,16 @@ function gr(e, t, n) {
|
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
let a = [...i.keys()].sort((e, t) => {
|
|
4159
|
-
let n =
|
|
4160
|
-
return n === r ? (
|
|
4159
|
+
let n = hr.indexOf(e), r = hr.indexOf(t);
|
|
4160
|
+
return n === r ? (q[e] ?? e).localeCompare(q[t] ?? t) : (n < 0 ? Infinity : n) - (r < 0 ? Infinity : r);
|
|
4161
4161
|
}).map((e) => {
|
|
4162
|
-
let t =
|
|
4163
|
-
return n.length === r.get(e).length ? t : `${t} (${n.map((e) =>
|
|
4162
|
+
let t = q[e] ?? e, n = i.get(e);
|
|
4163
|
+
return n.length === r.get(e).length ? t : `${t} (${n.map((e) => gr[e.id.split(".")[1]] ?? e.name).join(", ")})`;
|
|
4164
4164
|
}), o = a.slice(0, 4);
|
|
4165
4165
|
return a.length > 4 && o.push(`${a.length - 4} ${n.startsWith("de") ? "weitere" : "more"}`), new Intl.ListFormat(n.startsWith("de") ? "de" : "en", { type: "conjunction" }).format(o);
|
|
4166
4166
|
}
|
|
4167
4167
|
// ../quality/src/compatibility/messages/de.ts
|
|
4168
|
-
var
|
|
4168
|
+
var br = /* @__PURE__ */ e({ default: () => xr }), xr = {
|
|
4169
4169
|
templates: {
|
|
4170
4170
|
unsupported: "{feature} funktioniert in {unsupported} nicht.",
|
|
4171
4171
|
partial: "{feature} funktioniert in {partial} nur teilweise.",
|
|
@@ -4256,7 +4256,7 @@ var _r = /* @__PURE__ */ e({ default: () => vr }), vr = {
|
|
|
4256
4256
|
suggestion: "Bleibe unter {max} KB: Kürze den Inhalt, verschiebe lange Abschnitte auf eine Webseite oder ersetze Base64-Bilder durch gehostete Bilder."
|
|
4257
4257
|
}
|
|
4258
4258
|
}
|
|
4259
|
-
},
|
|
4259
|
+
}, Sr = /* @__PURE__ */ e({ default: () => Cr }), Cr = {
|
|
4260
4260
|
templates: {
|
|
4261
4261
|
unsupported: "{feature} doesn't work in {unsupported}.",
|
|
4262
4262
|
partial: "{feature} only partly works in {partial}.",
|
|
@@ -4347,24 +4347,24 @@ var _r = /* @__PURE__ */ e({ default: () => vr }), vr = {
|
|
|
4347
4347
|
suggestion: "Bring it under {max} KB: shorten the content, move long sections to a web page, or replace base64 images with hosted ones."
|
|
4348
4348
|
}
|
|
4349
4349
|
}
|
|
4350
|
-
},
|
|
4351
|
-
"./de.ts":
|
|
4352
|
-
"./en.ts":
|
|
4353
|
-
}),
|
|
4354
|
-
for (let e in
|
|
4355
|
-
function
|
|
4356
|
-
return
|
|
4350
|
+
}, wr = /* #__PURE__ */ Object.assign({
|
|
4351
|
+
"./de.ts": br,
|
|
4352
|
+
"./en.ts": Sr
|
|
4353
|
+
}), J = {};
|
|
4354
|
+
for (let e in wr) J[e.slice(2, -3)] = wr[e].default;
|
|
4355
|
+
function Tr(e) {
|
|
4356
|
+
return J[e.split("-")[0]?.toLowerCase() ?? "en"] ?? J.en ?? Cr;
|
|
4357
4357
|
}
|
|
4358
|
-
function
|
|
4359
|
-
let r =
|
|
4360
|
-
if (i) return
|
|
4358
|
+
function Er(e, t, n = {}) {
|
|
4359
|
+
let r = Tr(e), i = r.hand[t];
|
|
4360
|
+
if (i) return T(i, n);
|
|
4361
4361
|
let a = t.slice(7), o = r.features[a];
|
|
4362
4362
|
if (!o) throw Error(`Missing compatibility message: ${t}`);
|
|
4363
|
-
let s = n.unsupported && n.partial ? "mixed" : n.unsupported ? "unsupported" : "partial", c =
|
|
4363
|
+
let s = n.unsupported && n.partial ? "mixed" : n.unsupported ? "unsupported" : "partial", c = T({
|
|
4364
4364
|
message: o.feature,
|
|
4365
4365
|
suggestion: o.suggestion
|
|
4366
4366
|
}, n);
|
|
4367
|
-
return
|
|
4367
|
+
return T({
|
|
4368
4368
|
message: r.templates[s],
|
|
4369
4369
|
suggestion: c.suggestion
|
|
4370
4370
|
}, {
|
|
@@ -4373,22 +4373,22 @@ function wr(e, t, n = {}) {
|
|
|
4373
4373
|
});
|
|
4374
4374
|
}
|
|
4375
4375
|
// ../quality/src/compatibility/index.ts
|
|
4376
|
-
var
|
|
4377
|
-
...
|
|
4376
|
+
var Dr = "https://docs.templatical.com/quality/compatibility/rule-catalog", Or = ["html-script", "html-iframe"], Y = [
|
|
4377
|
+
...rr.map((e) => ({ meta: {
|
|
4378
4378
|
id: `compat.${e}`,
|
|
4379
4379
|
severity: "warning",
|
|
4380
|
-
reference:
|
|
4380
|
+
reference: nr[e].url
|
|
4381
4381
|
} })),
|
|
4382
|
-
...
|
|
4382
|
+
...Or.map((e) => ({ meta: {
|
|
4383
4383
|
id: `compat.${e}`,
|
|
4384
4384
|
severity: "warning",
|
|
4385
|
-
reference: `${
|
|
4385
|
+
reference: `${Dr}#compat-${e}`
|
|
4386
4386
|
} })),
|
|
4387
4387
|
{
|
|
4388
4388
|
meta: {
|
|
4389
4389
|
id: "compat.gmail-clipping",
|
|
4390
4390
|
severity: "warning",
|
|
4391
|
-
reference: `${
|
|
4391
|
+
reference: `${Dr}#compat-gmail-clipping`
|
|
4392
4392
|
},
|
|
4393
4393
|
compiledHtml(e, t) {
|
|
4394
4394
|
let n = new TextEncoder().encode(e).byteLength;
|
|
@@ -4408,27 +4408,27 @@ var Tr = "https://docs.templatical.com/quality/compatibility/rule-catalog", Er =
|
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
];
|
|
4411
|
-
function
|
|
4412
|
-
let r = n.compatibility || {}, i =
|
|
4413
|
-
for (let n of
|
|
4411
|
+
function kr(e, t, n) {
|
|
4412
|
+
let r = n.compatibility || {}, i = Ee(n.locale, r, Y), a = [];
|
|
4413
|
+
for (let n of Y) {
|
|
4414
4414
|
let o = n.meta.id;
|
|
4415
4415
|
if (o === "compat.gmail-clipping" || i.severity(o) === "off") continue;
|
|
4416
|
-
let s =
|
|
4416
|
+
let s = pr(e, o);
|
|
4417
4417
|
if (!s) continue;
|
|
4418
|
-
let c = o === "compat.html-script" || o === "compat.html-iframe", l = c ? void 0 :
|
|
4418
|
+
let c = o === "compat.html-script" || o === "compat.html-iframe", l = c ? void 0 : vr(o.slice(7), s.usage);
|
|
4419
4419
|
if (!c && l?.length === 0) continue;
|
|
4420
|
-
let u = l?.some((e) => e.support === "unsupported") ?? !0, d = u ? "warning" : "info", f = r.rules?.[o],
|
|
4420
|
+
let u = l?.some((e) => e.support === "unsupported") ?? !0, d = u ? "warning" : "info", f = r.rules?.[o], p = f && f !== "off" ? f : d, m = {
|
|
4421
4421
|
excerpt: s.excerpt,
|
|
4422
4422
|
value: s.value ?? "",
|
|
4423
4423
|
tag: s.tag ?? ""
|
|
4424
4424
|
};
|
|
4425
|
-
l && (u && (
|
|
4426
|
-
let
|
|
4425
|
+
l && (u && (m.unsupported = yr(l, "unsupported", i.locale)), l.some((e) => e.support === "partial") && (m.partial = yr(l, "partial", i.locale)));
|
|
4426
|
+
let ee = Er(i.locale, o, m);
|
|
4427
4427
|
a.push({
|
|
4428
4428
|
blockId: t,
|
|
4429
4429
|
ruleId: o,
|
|
4430
|
-
severity:
|
|
4431
|
-
...
|
|
4430
|
+
severity: p,
|
|
4431
|
+
...ee,
|
|
4432
4432
|
reference: n.meta.reference,
|
|
4433
4433
|
...l ? { clients: l } : {},
|
|
4434
4434
|
excerpt: s.excerpt
|
|
@@ -4436,27 +4436,27 @@ function Dr(e, t, n) {
|
|
|
4436
4436
|
}
|
|
4437
4437
|
return a;
|
|
4438
4438
|
}
|
|
4439
|
-
function
|
|
4439
|
+
function Ar(e, t = {}) {
|
|
4440
4440
|
if (t.disabled === !0 || t.compatibility === !1) return [];
|
|
4441
4441
|
let n = [], r = /* @__PURE__ */ new WeakMap();
|
|
4442
|
-
return
|
|
4442
|
+
return x(e, (e) => {
|
|
4443
4443
|
let i = r.get(e);
|
|
4444
|
-
i || (i =
|
|
4444
|
+
i || (i = sr(e), r.set(e, i)), n.push(...kr(i, e.id, t));
|
|
4445
4445
|
}), n;
|
|
4446
4446
|
}
|
|
4447
|
-
function
|
|
4447
|
+
function jr(e, t = {}) {
|
|
4448
4448
|
if (t.disabled === !0 || t.compatibility === !1) return [];
|
|
4449
|
-
let n =
|
|
4449
|
+
let n = Ee(t.locale, t.compatibility || {}, Y), r = Y.find((e) => e.meta.id === "compat.gmail-clipping"), i = n.severity(r.meta.id);
|
|
4450
4450
|
return i === "off" ? [] : r.compiledHtml(e, n).map((e) => ({
|
|
4451
4451
|
blockId: null,
|
|
4452
4452
|
ruleId: r.meta.id,
|
|
4453
4453
|
severity: i,
|
|
4454
|
-
...
|
|
4454
|
+
...Er(n.locale, r.meta.id, e.params),
|
|
4455
4455
|
reference: r.meta.reference
|
|
4456
4456
|
}));
|
|
4457
4457
|
}
|
|
4458
4458
|
// ../quality/src/localization/messages/de.ts
|
|
4459
|
-
var
|
|
4459
|
+
var Mr = /* @__PURE__ */ e({ default: () => Nr }), Nr = {
|
|
4460
4460
|
"localization.untranslated": {
|
|
4461
4461
|
message: "Das Feld {field} hat keine Übersetzung.",
|
|
4462
4462
|
suggestion: "Übersetze {field} oder verwende die Standardsprache als Fallback."
|
|
@@ -4469,7 +4469,7 @@ var Ar = /* @__PURE__ */ e({ default: () => jr }), jr = {
|
|
|
4469
4469
|
message: "Die Merge-Tags in {field} weichen von der Standardsprache ab.",
|
|
4470
4470
|
suggestion: "Verwende in {field} dieselben Merge-Tags mit derselben Anzahl an Vorkommen."
|
|
4471
4471
|
}
|
|
4472
|
-
},
|
|
4472
|
+
}, Pr = /* @__PURE__ */ e({ default: () => X }), X = {
|
|
4473
4473
|
"localization.untranslated": {
|
|
4474
4474
|
message: "The field {field} has no translation.",
|
|
4475
4475
|
suggestion: "Translate {field}, or keep the default language as a fallback."
|
|
@@ -4482,34 +4482,34 @@ var Ar = /* @__PURE__ */ e({ default: () => jr }), jr = {
|
|
|
4482
4482
|
message: "The merge tags in {field} differ from the default language.",
|
|
4483
4483
|
suggestion: "Keep the same merge tags and occurrence counts in {field}."
|
|
4484
4484
|
}
|
|
4485
|
-
},
|
|
4486
|
-
"./de.ts":
|
|
4487
|
-
"./en.ts":
|
|
4488
|
-
}),
|
|
4489
|
-
for (let e in
|
|
4485
|
+
}, Fr = /* #__PURE__ */ Object.assign({
|
|
4486
|
+
"./de.ts": Mr,
|
|
4487
|
+
"./en.ts": Pr
|
|
4488
|
+
}), Z = {};
|
|
4489
|
+
for (let e in Fr) {
|
|
4490
4490
|
let t = /\.\/([^/]+)\.ts$/.exec(e);
|
|
4491
4491
|
if (!t) continue;
|
|
4492
4492
|
let n = t[1];
|
|
4493
|
-
n !== "index" && (
|
|
4493
|
+
n !== "index" && (Z[n] = Fr[e].default);
|
|
4494
4494
|
}
|
|
4495
4495
|
function Ir(e) {
|
|
4496
|
-
return
|
|
4496
|
+
return Z[e.split("-")[0]?.toLowerCase() ?? "en"] ?? Z.en ?? X;
|
|
4497
4497
|
}
|
|
4498
4498
|
function Lr(e, t, n) {
|
|
4499
|
-
return
|
|
4499
|
+
return T(Ir(e)[t] ?? X[t], n);
|
|
4500
4500
|
}
|
|
4501
4501
|
// ../quality/src/localization/rules.ts
|
|
4502
|
-
function
|
|
4502
|
+
function Q(e, t) {
|
|
4503
4503
|
let n = /* @__PURE__ */ new Map();
|
|
4504
|
-
|
|
4505
|
-
for (let r of
|
|
4504
|
+
x(e, (e) => {
|
|
4505
|
+
for (let r of oe(e, t.customBlocks)) n.set(`${e.id}/${r}`, {
|
|
4506
4506
|
blockId: e.id,
|
|
4507
4507
|
field: r,
|
|
4508
4508
|
target: e,
|
|
4509
|
-
format: e.type === "html" ||
|
|
4509
|
+
format: e.type === "html" || c[e.type]?.includes(r) ? "html" : "text"
|
|
4510
4510
|
});
|
|
4511
4511
|
});
|
|
4512
|
-
for (let t of
|
|
4512
|
+
for (let t of f) n.set(`settings/${t}`, {
|
|
4513
4513
|
blockId: null,
|
|
4514
4514
|
field: t,
|
|
4515
4515
|
target: e.settings,
|
|
@@ -4517,28 +4517,28 @@ function Rr(e, t) {
|
|
|
4517
4517
|
});
|
|
4518
4518
|
return n;
|
|
4519
4519
|
}
|
|
4520
|
-
function
|
|
4520
|
+
function $({ blockId: e, field: t }) {
|
|
4521
4521
|
return {
|
|
4522
4522
|
blockId: e,
|
|
4523
4523
|
params: { field: t }
|
|
4524
4524
|
};
|
|
4525
4525
|
}
|
|
4526
|
-
function
|
|
4527
|
-
return
|
|
4526
|
+
function Rr(e, t) {
|
|
4527
|
+
return o(e, t.contentLocale, t.customBlocks);
|
|
4528
4528
|
}
|
|
4529
4529
|
function zr(e, t, n) {
|
|
4530
4530
|
let r = [], i = "\0MT";
|
|
4531
4531
|
for (; e.includes(i);) i += "_";
|
|
4532
|
-
let a = n === "html" ?
|
|
4532
|
+
let a = n === "html" ? ee(e, (e) => {
|
|
4533
4533
|
let t = r.push(e) - 1;
|
|
4534
4534
|
return `${i}${t}\u0000`;
|
|
4535
4535
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
4536
4536
|
start: e.index,
|
|
4537
4537
|
end: e.index + e[0].length
|
|
4538
|
-
})), s = [], c =
|
|
4538
|
+
})), s = [], c = se(a, t, "logic"), l = [], u = 0;
|
|
4539
4539
|
for (let e of ["logic", "value"]) {
|
|
4540
4540
|
let r = 0;
|
|
4541
|
-
for (let i of e === "logic" ? c :
|
|
4541
|
+
for (let i of e === "logic" ? c : se(a, t, "value")) {
|
|
4542
4542
|
let t = i.index, a = t + i.value.length;
|
|
4543
4543
|
for (; o[r]?.end <= t;) r++;
|
|
4544
4544
|
let c = o[r];
|
|
@@ -4554,7 +4554,7 @@ function zr(e, t, n) {
|
|
|
4554
4554
|
}), s.push({
|
|
4555
4555
|
start: t,
|
|
4556
4556
|
end: a,
|
|
4557
|
-
value: n === "html" ?
|
|
4557
|
+
value: n === "html" ? h(i.value) : i.value
|
|
4558
4558
|
});
|
|
4559
4559
|
}
|
|
4560
4560
|
}
|
|
@@ -4569,8 +4569,8 @@ var Br = [
|
|
|
4569
4569
|
reference: "https://docs.templatical.com/guide/localized-templates#missing-values"
|
|
4570
4570
|
},
|
|
4571
4571
|
template: (e, t) => {
|
|
4572
|
-
let n =
|
|
4573
|
-
return
|
|
4572
|
+
let n = Q(e, t);
|
|
4573
|
+
return Rr(e, t).missing.map((e) => $(n.get(e)));
|
|
4574
4574
|
}
|
|
4575
4575
|
},
|
|
4576
4576
|
{
|
|
@@ -4580,8 +4580,8 @@ var Br = [
|
|
|
4580
4580
|
reference: "https://docs.templatical.com/guide/localized-templates#out-of-date-values"
|
|
4581
4581
|
},
|
|
4582
4582
|
template: (e, t) => {
|
|
4583
|
-
let n =
|
|
4584
|
-
return
|
|
4583
|
+
let n = Q(e, t);
|
|
4584
|
+
return Rr(e, t).stale.map((e) => $(n.get(e)));
|
|
4585
4585
|
}
|
|
4586
4586
|
},
|
|
4587
4587
|
{
|
|
@@ -4590,30 +4590,30 @@ var Br = [
|
|
|
4590
4590
|
severity: "warning",
|
|
4591
4591
|
reference: "https://docs.templatical.com/guide/localized-templates#merge-tags"
|
|
4592
4592
|
},
|
|
4593
|
-
template: (e,
|
|
4594
|
-
let
|
|
4595
|
-
return [...
|
|
4596
|
-
let
|
|
4597
|
-
return typeof l != "string" || u === void 0 || JSON.stringify(zr(l,
|
|
4593
|
+
template: (e, n) => {
|
|
4594
|
+
let r = Q(e, n), i = Rr(e, n), a = le(n.mergeTagSyntax);
|
|
4595
|
+
return [...i.translated, ...i.stale].flatMap((e) => {
|
|
4596
|
+
let i = r.get(e), { target: o, field: s, format: c } = i, l = t(o, s), u = o?.l10n?.[n.contentLocale]?.text?.[s]?.value;
|
|
4597
|
+
return typeof l != "string" || u === void 0 || JSON.stringify(zr(l, a, c)) === JSON.stringify(zr(u, a, c)) ? [] : [$(i)];
|
|
4598
4598
|
});
|
|
4599
4599
|
}
|
|
4600
4600
|
}
|
|
4601
4601
|
];
|
|
4602
4602
|
// ../quality/src/localization/index.ts
|
|
4603
|
-
function Vr(e,
|
|
4604
|
-
if (
|
|
4605
|
-
let
|
|
4606
|
-
return
|
|
4607
|
-
...
|
|
4608
|
-
locale:
|
|
4603
|
+
function Vr(e, t = {}) {
|
|
4604
|
+
if (t.disabled === !0 || t.localization === !1) return [];
|
|
4605
|
+
let n = t.contentLocale ?? d(e);
|
|
4606
|
+
return n === d(e) ? [] : (e.settings.locales?.includes(n) || ne(e, n), S(e, Br, {
|
|
4607
|
+
...C({
|
|
4608
|
+
locale: t.locale,
|
|
4609
4609
|
rules: Br,
|
|
4610
|
-
overrides:
|
|
4610
|
+
overrides: t.localization?.rules,
|
|
4611
4611
|
thresholds: void 0,
|
|
4612
4612
|
nonProductionHosts: void 0
|
|
4613
4613
|
}),
|
|
4614
|
-
contentLocale:
|
|
4615
|
-
customBlocks:
|
|
4616
|
-
mergeTagSyntax:
|
|
4614
|
+
contentLocale: n,
|
|
4615
|
+
customBlocks: t.customBlocks,
|
|
4616
|
+
mergeTagSyntax: t.mergeTagSyntax
|
|
4617
4617
|
}, (e, t, n) => Lr(e, t, n)));
|
|
4618
4618
|
}
|
|
4619
4619
|
// ../quality/src/util.ts
|
|
@@ -4621,22 +4621,22 @@ function Hr(e) {
|
|
|
4621
4621
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
4622
4622
|
}
|
|
4623
4623
|
// ../quality/src/lint-template.ts
|
|
4624
|
-
function Ur(e,
|
|
4625
|
-
if (Hr(
|
|
4626
|
-
let
|
|
4627
|
-
...
|
|
4628
|
-
...
|
|
4629
|
-
...
|
|
4630
|
-
...
|
|
4631
|
-
...
|
|
4632
|
-
...Vr(e,
|
|
4624
|
+
function Ur(e, t = {}) {
|
|
4625
|
+
if (Hr(t)) return [];
|
|
4626
|
+
let n = d(e), r = t.contentLocale ?? n, i = ne(e, r), a = [
|
|
4627
|
+
...Vt(i, t),
|
|
4628
|
+
...cn(i, t),
|
|
4629
|
+
...zn(i, t),
|
|
4630
|
+
...er(i, t),
|
|
4631
|
+
...Ar(i, t),
|
|
4632
|
+
...Vr(e, t)
|
|
4633
4633
|
];
|
|
4634
|
-
return
|
|
4634
|
+
return r === n ? a : a.map((e) => {
|
|
4635
4635
|
if (!e.fix?.removesBlock) return e;
|
|
4636
4636
|
let t = { ...e };
|
|
4637
4637
|
return delete t.fix, t;
|
|
4638
4638
|
});
|
|
4639
4639
|
}
|
|
4640
|
-
export {
|
|
4640
|
+
export { jr as lintCompiledHtml, Ur as lintTemplate };
|
|
4641
4641
|
|
|
4642
|
-
//# sourceMappingURL=src-
|
|
4642
|
+
//# sourceMappingURL=src-BmzzkUf7.js.map
|