forge-edit 0.1.0-beta.1 → 0.1.0-beta.10

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/index.js ADDED
@@ -0,0 +1,4340 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-100:oklch(96.7% .003 264.542);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[calc\\(100\\%\\+4px\\)\\]{top:calc(100% + 4px)}.top-\\[calc\\(100\\%\\+8px\\)\\]{top:calc(100% + 8px)}.top-full{top:100%}.left-0{left:0}.left-1\\/2{left:50%}.left-\\[-7px\\]{left:-7px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[5\\]{z-index:5}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-40{height:calc(var(--spacing) * 40)}.h-\\[30px\\]{height:30px}.h-full{height:100%}.h-px{height:1px}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-\\[220px\\]{max-height:220px}.min-h-\\[60px\\]{min-height:60px}.min-h-\\[120px\\]{min-height:120px}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-40{width:calc(var(--spacing) * 40)}.w-\\[1px\\]{width:1px}.w-full{width:100%}.max-w-\\[65px\\]{max-width:65px}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[28px\\]{min-width:28px}.min-w-\\[70px\\]{min-width:70px}.min-w-\\[110px\\]{min-width:110px}.min-w-\\[130px\\]{min-width:130px}.min-w-\\[150px\\]{min-width:150px}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[200px\\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.cursor-s-resize{cursor:s-resize}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-\\[4px\\]{gap:4px}.gap-px{gap:1px}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px * var(--tw-space-x-reverse));margin-inline-end:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\\[\\#ccc\\]>:not(:last-child)){border-color:#ccc}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[3px\\]{border-top-left-radius:3px;border-top-right-radius:3px}.rounded-b-\\[3px\\]{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-7{border-right-style:var(--tw-border-style);border-right-width:7px}.border-r-8{border-right-style:var(--tw-border-style);border-right-width:8px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-7{border-bottom-style:var(--tw-border-style);border-bottom-width:7px}.border-b-8{border-bottom-style:var(--tw-border-style);border-bottom-width:8px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-7{border-left-style:var(--tw-border-style);border-left-width:7px}.border-l-8{border-left-style:var(--tw-border-style);border-left-width:8px}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#2c2c2c\\]{border-color:#2c2c2c}.border-\\[\\#4a90d9\\]{border-color:#4a90d9}.border-\\[\\#ccc\\]{border-color:#ccc}.border-\\[\\#d1d5db\\]{border-color:#d1d5db}.border-\\[\\#ddd\\]{border-color:#ddd}.border-\\[\\#eee\\]{border-color:#eee}.border-black{border-color:var(--color-black)}.border-r-transparent{border-right-color:#0000}.border-b-\\[\\#ccc\\]{border-bottom-color:#ccc}.border-b-white{border-bottom-color:var(--color-white)}.border-l-transparent{border-left-color:#0000}.bg-\\[\\#1e1e1e\\]{background-color:#1e1e1e}.bg-\\[\\#888\\]{background-color:#888}.bg-\\[\\#e2e8f0\\]{background-color:#e2e8f0}.bg-\\[\\#e5e7eb\\]{background-color:#e5e7eb}.bg-\\[\\#f0f0f0\\]{background-color:#f0f0f0}.bg-\\[\\#f5f5f5\\]{background-color:#f5f5f5}.bg-\\[rgba\\(74\\,144\\,217\\,0\\.4\\)\\]{background-color:#4a90d966}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.bg-white\\/30{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.bg-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\,linear-gradient\\(90deg\\,rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\]{background-image:linear-gradient(#0000000d 1px,#0000 1px),linear-gradient(90deg,#0000000d 1px,#0000 1px)}.bg-\\[size\\:16px_16px\\]{background-size:16px 16px}.fill-current{fill:currentColor}.fill-none{fill:none}.stroke-black{stroke:var(--color-black)}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-\\[5px\\]{padding:5px}.p-\\[10px\\]{padding:10px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[7px\\]{padding-inline:7px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-1{padding-right:var(--spacing)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-black{color:var(--color-black)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.not-italic{font-style:normal}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.shadow-\\[0_2px_6px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_1px_3px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-shadow:inset 0 1px 3px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-\\[width\\,height\\]{transition-property:width,height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-has-\\[\\.is-open\\]\\:hidden:is(:where(.group):has(.is-open) *){display:none}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:bottom-full:before{content:var(--tw-content);bottom:100%}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:-translate-x-1\\/2:before{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.before\\:border-x-\\[5px\\]:before{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:5px}.before\\:border-t-0:before{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.before\\:border-b-\\[5px\\]:before{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:5px}.before\\:border-solid:before{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.before\\:border-x-transparent:before{content:var(--tw-content);border-inline-color:#0000}.before\\:border-b-\\[\\#2c2c2c\\]:before{content:var(--tw-content);border-bottom-color:#2c2c2c}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:bottom-full:after{content:var(--tw-content);bottom:100%}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:translate-y-\\[1px\\]:after{content:var(--tw-content);--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:border-x-\\[4px\\]:after{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:4px}.after\\:border-t-0:after{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.after\\:border-b-\\[4px\\]:after{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.after\\:border-solid:after{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.after\\:border-x-transparent:after{content:var(--tw-content);border-inline-color:#0000}.after\\:border-b-\\[\\#1e1e1e\\]:after{content:var(--tw-content);border-bottom-color:#1e1e1e}.last\\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\\:pr-0:last-child{padding-right:0}@media (hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-\\[\\#999\\]:hover{border-color:#999}.hover\\:border-\\[\\#aaa\\]:hover{border-color:#aaa}.hover\\:border-black:hover{border-color:var(--color-black)}.hover\\:bg-\\[\\#e6e6e6\\]:hover{background-color:#e6e6e6}.hover\\:bg-\\[\\#f0f0f0\\]:hover{background-color:#f0f0f0}.hover\\:bg-\\[\\#f5f5f5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#f9f9f9\\]:hover{background-color:#f9f9f9}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:translate-y-px:active{--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:bg-\\[\\#d0d0d0\\]:active{background-color:#d0d0d0}.active\\:bg-\\[\\#e8e8e8\\]:active{background-color:#e8e8e8}.rtl\\:right-0:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){right:0}.rtl\\:left-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:50%}.rtl\\:left-auto:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:auto}.rtl\\:-translate-x-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}:where(.rtl\\:divide-x-reverse:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-divide-x-reverse:1}.\\[\\&_blockquote\\]\\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\\[\\&_blockquote\\]\\:border-l-4 blockquote{border-left-style:var(--tw-border-style);border-left-width:4px}.\\[\\&_blockquote\\]\\:border-\\[\\#ccc\\] blockquote{border-color:#ccc}.\\[\\&_blockquote\\]\\:pl-4 blockquote{padding-left:calc(var(--spacing) * 4)}.\\[\\&_blockquote\\]\\:italic blockquote{font-style:italic}.\\[\\&_h1\\]\\:text-2xl h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\\[\\&_h1\\]\\:font-bold h1{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h2\\]\\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\\[\\&_h2\\]\\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h3\\]\\:text-lg h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\[\\&_h3\\]\\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_pre\\]\\:rounded pre{border-radius:.25rem}.\\[\\&_pre\\]\\:bg-\\[\\#f4f4f4\\] pre{background-color:#f4f4f4}.\\[\\&_pre\\]\\:p-2 pre{padding:calc(var(--spacing) * 2)}.\\[\\&\\.is-active\\]\\:bg-\\[\\#e5e5e5\\].is-active{background-color:#e5e5e5}.\\[\\&\\.is-open\\]\\:block.is-open{display:block}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
+ //#region \0rolldown/runtime.js
3
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
4
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
5
+ get: ((e) => i[e]).bind(null, d),
6
+ enumerable: !(s = n(i, d)) || s.enumerable
7
+ });
8
+ return e;
9
+ }, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
10
+ value: n,
11
+ enumerable: !0
12
+ }) : o, n));
13
+ //#endregion
14
+ //#region src/components/shared/Hooks/options.js
15
+ function l(e) {
16
+ return {
17
+ type: e.getAttribute("type") || "light",
18
+ placeholder: e.getAttribute("placeholder") || "",
19
+ width: e.getAttribute("width") || "100%",
20
+ height: e.getAttribute("height") || "300px",
21
+ lang: e.getAttribute("lang") || "en",
22
+ dir: e.getAttribute("dir") || "ltr"
23
+ };
24
+ }
25
+ //#endregion
26
+ //#region node_modules/preact/dist/preact.module.js
27
+ var u, d, f, p, m, h, g, _, v, y, b, x, S, C, w = {}, T = [], E = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, D = Array.isArray;
28
+ function O(e, t) {
29
+ for (var n in t) e[n] = t[n];
30
+ return e;
31
+ }
32
+ function ee(e) {
33
+ e && e.parentNode && e.parentNode.removeChild(e);
34
+ }
35
+ function te(e, t, n) {
36
+ var r, i, a, o = {};
37
+ for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];
38
+ if (arguments.length > 2 && (o.children = arguments.length > 3 ? u.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
39
+ return k(e, o, r, i, null);
40
+ }
41
+ function k(e, t, n, r, i) {
42
+ var a = {
43
+ type: e,
44
+ props: t,
45
+ key: n,
46
+ ref: r,
47
+ __k: null,
48
+ __: null,
49
+ __b: 0,
50
+ __e: null,
51
+ __c: null,
52
+ constructor: void 0,
53
+ __v: i ?? ++f,
54
+ __i: -1,
55
+ __u: 0
56
+ };
57
+ return i == null && d.vnode != null && d.vnode(a), a;
58
+ }
59
+ function ne(e) {
60
+ return e.children;
61
+ }
62
+ function re(e, t) {
63
+ this.props = e, this.context = t;
64
+ }
65
+ function A(e, t) {
66
+ if (t == null) return e.__ ? A(e.__, e.__i + 1) : null;
67
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
68
+ return typeof e.type == "function" ? A(e) : null;
69
+ }
70
+ function ie(e) {
71
+ if (e.__P && e.__d) {
72
+ var t = e.__v, n = t.__e, r = [], i = [], a = O({}, t);
73
+ a.__v = t.__v + 1, d.vnode && d.vnode(a), pe(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? A(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, P(r, a, i), t.__e = t.__ = null, a.__e != n && j(a);
74
+ }
75
+ }
76
+ function j(e) {
77
+ if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
78
+ if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
79
+ }), j(e);
80
+ }
81
+ function ae(e) {
82
+ (!e.__d && (e.__d = !0) && p.push(e) && !M.__r++ || m != d.debounceRendering) && ((m = d.debounceRendering) || h)(M);
83
+ }
84
+ function M() {
85
+ try {
86
+ for (var e, t = 1; p.length;) p.length > t && p.sort(g), e = p.shift(), t = p.length, ie(e);
87
+ } finally {
88
+ p.length = M.__r = 0;
89
+ }
90
+ }
91
+ function oe(e, t, n, r, i, a, o, s, c, l, u) {
92
+ var d, f, p, m, h, g, _ = r && r.__k || T, v = t.length;
93
+ for (c = se(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || w, p.__i = d, g = pe(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && he(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = ce(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
94
+ return n.__e = h, c;
95
+ }
96
+ function se(e, t, n, r, i) {
97
+ var a, o, s, c, l, u = n.length, d = u, f = 0;
98
+ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = k(null, o, null, null, null) : D(o) ? o = e.__k[a] = k(ne, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = k(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = le(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
99
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = A(s)), ge(s, s));
100
+ return r;
101
+ }
102
+ function ce(e, t, n) {
103
+ var r, i;
104
+ if (typeof e.type == "function") {
105
+ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = ce(r[i], t, n));
106
+ return t;
107
+ }
108
+ e.__e != t && (t && e.type && !t.parentNode && (t = A(e)), t = n.insertBefore(e.__e, t || null));
109
+ do
110
+ t &&= t.nextSibling;
111
+ while (t != null && t.nodeType == 8);
112
+ return t;
113
+ }
114
+ function le(e, t, n, r) {
115
+ var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
116
+ if (l === null && s == null || u && s == l.key && c == l.type) return n;
117
+ if (r > +!!u) {
118
+ for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) != null && !(2 & l.__u) && s == l.key && c == l.type) return o;
119
+ }
120
+ return -1;
121
+ }
122
+ function ue(e, t, n) {
123
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || E.test(t) ? n : n + "px";
124
+ }
125
+ function de(e, t, n, r, i) {
126
+ var a, o;
127
+ n: if (t == "style") {
128
+ if (typeof n == "string") e.style.cssText = n;
129
+ else {
130
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ue(e.style, t, "");
131
+ if (n) for (t in n) r && n[t] == r[t] || ue(e.style, t, n[t]);
132
+ }
133
+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(b, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[y] = r[y] : (n[y] = x, e.addEventListener(t, a ? C : S, a)) : e.removeEventListener(t, a ? C : S, a);
134
+ else {
135
+ if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
136
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
137
+ e[t] = n ?? "";
138
+ break n;
139
+ } catch {}
140
+ typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
141
+ }
142
+ }
143
+ function fe(e) {
144
+ return function(t) {
145
+ if (this.l) {
146
+ var n = this.l[t.type + e];
147
+ if (t[v] == null) t[v] = x++;
148
+ else if (t[v] < n[y]) return;
149
+ return n(d.event ? d.event(t) : t);
150
+ }
151
+ };
152
+ }
153
+ function pe(e, t, n, r, i, a, o, s, c, l) {
154
+ var u, f, p, m, h, g, _, v, y, b, x, S, C, w, E, te, k = t.type;
155
+ if (t.constructor !== void 0) return null;
156
+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = d.__b) && u(t);
157
+ n: if (typeof k == "function") {
158
+ f = o.length;
159
+ try {
160
+ if (y = t.props, b = k.prototype && k.prototype.render, x = (u = k.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (p = t.__c = n.__c).__ = p.__E : (b ? t.__c = p = new k(y, S) : (t.__c = p = new re(y, S), p.constructor = k, p.render = _e), x && x.sub(p), p.state || (p.state = {}), p.__n = r, m = p.__d = !0, p.__h = [], p._sb = []), b && p.__s == null && (p.__s = p.state), b && k.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = O({}, p.__s)), O(p.__s, k.getDerivedStateFromProps(y, p.__s))), h = p.props, g = p.state, p.__v = t, m) b && k.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), b && p.componentDidMount != null && p.__h.push(p.componentDidMount);
161
+ else {
162
+ if (b && k.getDerivedStateFromProps == null && y !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(y, S), t.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(y, p.__s, S)) {
163
+ t.__v != n.__v && (p.props = y, p.state = p.__s, p.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
164
+ e && (e.__ = t);
165
+ }), T.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && o.push(p), s = A(n);
166
+ break n;
167
+ }
168
+ p.componentWillUpdate != null && p.componentWillUpdate(y, p.__s, S), b && p.componentDidUpdate != null && p.__h.push(function() {
169
+ p.componentDidUpdate(h, g, _);
170
+ });
171
+ }
172
+ if (p.context = S, p.props = y, p.__P = e, p.__e = !1, C = d.__r, w = 0, b) p.state = p.__s, p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), T.push.apply(p.__h, p._sb), p._sb = [];
173
+ else do
174
+ p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), p.state = p.__s;
175
+ while (p.__d && ++w < 25);
176
+ p.state = p.__s, p.getChildContext != null && (r = O(O({}, r), p.getChildContext())), b && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), E = u != null && u.type === ne && u.key == null ? me(u.props.children) : u, s = oe(e, D(E) ? E : [E], t, n, r, i, a, o, s, c, l), p.base = t.__e, t.__u &= -161, p.__h.length && o.push(p), v && (p.__E = p.__ = null);
177
+ } catch (e) {
178
+ if (o.length = f, t.__v = null, c || a != null) {
179
+ if (e.then) {
180
+ for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
181
+ a != null && (a[a.indexOf(s)] = null), t.__e = s;
182
+ } else if (a != null) for (te = a.length; te--;) ee(a[te]);
183
+ } else t.__e = n.__e;
184
+ t.__k ??= n.__k || [], e.then || N(t), d.__e(e, t, n);
185
+ }
186
+ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = F(n.__e, t, n, r, i, a, o, c, l);
187
+ return (u = d.diffed) && u(t), 128 & t.__u ? void 0 : s;
188
+ }
189
+ function N(e) {
190
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(N));
191
+ }
192
+ function P(e, t, n) {
193
+ for (var r = 0; r < n.length; r++) he(n[r], n[++r], n[++r]);
194
+ d.__c && d.__c(t, e), e.some(function(t) {
195
+ try {
196
+ e = t.__h, t.__h = [], e.some(function(e) {
197
+ e.call(t);
198
+ });
199
+ } catch (e) {
200
+ d.__e(e, t.__v);
201
+ }
202
+ });
203
+ }
204
+ function me(e) {
205
+ return typeof e != "object" || !e || e.__b > 0 ? e : D(e) ? e.map(me) : e.constructor === void 0 ? O({}, e) : null;
206
+ }
207
+ function F(e, t, n, r, i, a, o, s, c) {
208
+ var l, f, p, m, h, g, _, v = n.props || w, y = t.props, b = t.type;
209
+ if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
210
+ for (l = 0; l < a.length; l++) if ((h = a[l]) && "setAttribute" in h == !!b && (b ? h.localName == b : h.nodeType == 3)) {
211
+ e = h, a[l] = null;
212
+ break;
213
+ }
214
+ }
215
+ if (e == null) {
216
+ if (b == null) return document.createTextNode(y);
217
+ e = document.createElementNS(i, b, y.is && y), s &&= (d.__m && d.__m(t, a), !1), a = null;
218
+ }
219
+ if (b == null) v === y || s && e.data == y || (e.data = y);
220
+ else {
221
+ if (a = b == "textarea" && y.defaultValue != null ? null : a && u.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(h = e.attributes[l]).name] = h.value;
222
+ for (l in v) h = v[l], l == "dangerouslySetInnerHTML" ? p = h : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || de(e, l, null, h, i);
223
+ for (l in y) h = y[l], l == "children" ? m = h : l == "dangerouslySetInnerHTML" ? f = h : l == "value" ? g = h : l == "checked" ? _ = h : s && typeof h != "function" || v[l] === h || de(e, l, h, v[l], i);
224
+ if (f) s || p && (f.__html == p.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
225
+ else if (p && (e.innerHTML = ""), oe(t.type == "template" ? e.content : e, D(m) ? m : [m], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && A(n, 0), s, c), a != null) for (l = a.length; l--;) ee(a[l]);
226
+ s && b != "textarea" || (l = "value", b == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || b == "progress" && !g || b == "option" && g != v[l]) && de(e, l, g, v[l], i), l = "checked", _ != null && _ != e[l] && de(e, l, _, v[l], i));
227
+ }
228
+ return e;
229
+ }
230
+ function he(e, t, n) {
231
+ try {
232
+ if (typeof e == "function") {
233
+ var r = typeof e.__u == "function";
234
+ r && e.__u(), r && t == null || (e.__u = e(t));
235
+ } else e.current = t;
236
+ } catch (e) {
237
+ d.__e(e, n);
238
+ }
239
+ }
240
+ function ge(e, t, n) {
241
+ var r, i;
242
+ if (d.unmount && d.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || he(r, null, t)), (r = e.__c) != null) {
243
+ if (r.componentWillUnmount) try {
244
+ r.componentWillUnmount();
245
+ } catch (e) {
246
+ d.__e(e, t);
247
+ }
248
+ r.base = r.__P = r.__n = null;
249
+ }
250
+ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && ge(r[i], t, n || typeof e.type != "function");
251
+ n || ee(e.__e), e.__c = e.__ = e.__e = void 0;
252
+ }
253
+ function _e(e, t, n) {
254
+ return this.constructor(e, n);
255
+ }
256
+ function I(e, t, n) {
257
+ var r, i, a, o;
258
+ t == document && (t = document.documentElement), d.__ && d.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], pe(t, e = (!r && n || t).__k = te(ne, null, [e]), i || w, w, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? u.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), P(a, e, o), e.props.children = null;
259
+ }
260
+ u = T.slice, d = { __e: function(e, t, n, r) {
261
+ for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
262
+ if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
263
+ } catch (t) {
264
+ e = t;
265
+ }
266
+ throw e;
267
+ } }, f = 0, re.prototype.setState = function(e, t) {
268
+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = O({}, this.state);
269
+ typeof e == "function" && (e = e(O({}, n), this.props)), e && O(n, e), e != null && this.__v && (t && this._sb.push(t), ae(this));
270
+ }, re.prototype.forceUpdate = function(e) {
271
+ this.__v && (this.__e = !0, e && this.__h.push(e), ae(this));
272
+ }, re.prototype.render = ne, p = [], h = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, g = function(e, t) {
273
+ return e.__v.__b - t.__v.__b;
274
+ }, M.__r = 0, _ = Math.random().toString(8), v = "__d" + _, y = "__a" + _, b = /(PointerCapture)$|Capture$/i, x = 0, S = fe(!1), C = fe(!0);
275
+ //#endregion
276
+ //#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
277
+ var L = 0;
278
+ Array.isArray;
279
+ function R(e, t, n, r, i, a) {
280
+ t ||= {};
281
+ var o, s, c = t;
282
+ if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];
283
+ var l = {
284
+ type: e,
285
+ props: c,
286
+ key: n,
287
+ ref: o,
288
+ __k: null,
289
+ __: null,
290
+ __b: 0,
291
+ __e: null,
292
+ __c: null,
293
+ constructor: void 0,
294
+ __v: --L,
295
+ __i: -1,
296
+ __u: 0,
297
+ __source: i,
298
+ __self: a
299
+ };
300
+ if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);
301
+ return d.vnode && d.vnode(l), l;
302
+ }
303
+ //#endregion
304
+ //#region src/components/shared/toolbar/Style/Components/StyleToolbar.jsx
305
+ function ve() {
306
+ let e = "forge-dropdown-item block w-full text-left cursor-pointer whitespace-nowrap px-3 py-1 text-[#333] no-underline transition-colors duration-100 hover:bg-[#f0f0f0]";
307
+ return /* @__PURE__ */ R("div", {
308
+ className: "forge-toolbar-group forge-toolbar-style flex items-center gap-0.5",
309
+ children: /* @__PURE__ */ R("div", {
310
+ className: "relative group",
311
+ children: [/* @__PURE__ */ R("button", {
312
+ type: "button",
313
+ className: "forge-toolbar-button group relative flex h-7 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px [&.is-active]:bg-[#e5e5e5]",
314
+ "data-command": "style",
315
+ "aria-label": "Style",
316
+ children: [/* @__PURE__ */ R("span", {
317
+ className: "forge-icon",
318
+ children: "✦"
319
+ }), /* @__PURE__ */ R("span", {
320
+ className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
321
+ "data-i18n": "style",
322
+ children: "Style"
323
+ })]
324
+ }), /* @__PURE__ */ R("div", {
325
+ className: "forge-toolbar-dropdown forge-dropdown-style absolute left-0 top-[calc(100%+4px)] z-20 hidden [&.is-open]:block max-h-24 min-w-[110px] overflow-y-auto rounded-[2px] border border-[#ccc] bg-white p-0 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0",
326
+ role: "list",
327
+ "aria-label": "Style",
328
+ children: [
329
+ /* @__PURE__ */ R("button", {
330
+ type: "button",
331
+ className: e,
332
+ "data-value": "p",
333
+ role: "listitem",
334
+ children: /* @__PURE__ */ R("p", {
335
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
336
+ children: "Normal"
337
+ })
338
+ }),
339
+ /* @__PURE__ */ R("button", {
340
+ type: "button",
341
+ className: e,
342
+ "data-value": "blockquote",
343
+ role: "listitem",
344
+ children: /* @__PURE__ */ R("blockquote", {
345
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
346
+ children: "Blockquote"
347
+ })
348
+ }),
349
+ /* @__PURE__ */ R("button", {
350
+ type: "button",
351
+ className: e,
352
+ "data-value": "pre",
353
+ role: "listitem",
354
+ children: /* @__PURE__ */ R("pre", {
355
+ className: "m-0 font-mono text-[13px] leading-[1.4]",
356
+ children: "Code"
357
+ })
358
+ }),
359
+ /* @__PURE__ */ R("button", {
360
+ type: "button",
361
+ className: e,
362
+ "data-value": "h1",
363
+ role: "listitem",
364
+ children: /* @__PURE__ */ R("h1", {
365
+ className: "m-0 text-[20px] font-normal leading-[1.4]",
366
+ children: "Heading 1"
367
+ })
368
+ }),
369
+ /* @__PURE__ */ R("button", {
370
+ type: "button",
371
+ className: e,
372
+ "data-value": "h2",
373
+ role: "listitem",
374
+ children: /* @__PURE__ */ R("h2", {
375
+ className: "m-0 text-[18px] font-normal leading-[1.4]",
376
+ children: "Heading 2"
377
+ })
378
+ }),
379
+ /* @__PURE__ */ R("button", {
380
+ type: "button",
381
+ className: e,
382
+ "data-value": "h3",
383
+ role: "listitem",
384
+ children: /* @__PURE__ */ R("h3", {
385
+ className: "m-0 text-[16px] font-normal leading-[1.4]",
386
+ children: "Heading 3"
387
+ })
388
+ }),
389
+ /* @__PURE__ */ R("button", {
390
+ type: "button",
391
+ className: e,
392
+ "data-value": "h4",
393
+ role: "listitem",
394
+ children: /* @__PURE__ */ R("h4", {
395
+ className: "m-0 text-[15px] font-normal leading-[1.4]",
396
+ children: "Heading 4"
397
+ })
398
+ }),
399
+ /* @__PURE__ */ R("button", {
400
+ type: "button",
401
+ className: e,
402
+ "data-value": "h5",
403
+ role: "listitem",
404
+ children: /* @__PURE__ */ R("h5", {
405
+ className: "m-0 text-[14px] font-normal leading-[1.4]",
406
+ children: "Heading 5"
407
+ })
408
+ }),
409
+ /* @__PURE__ */ R("button", {
410
+ type: "button",
411
+ className: e,
412
+ "data-value": "h6",
413
+ role: "listitem",
414
+ children: /* @__PURE__ */ R("h6", {
415
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
416
+ children: "Heading 6"
417
+ })
418
+ })
419
+ ]
420
+ })]
421
+ })
422
+ });
423
+ }
424
+ //#endregion
425
+ //#region src/components/shared/toolbar/Style/Components/index.jsx
426
+ function z() {
427
+ return ve();
428
+ }
429
+ //#endregion
430
+ //#region src/components/shared/toolbar/font/Components/FontToolbar.jsx
431
+ function B({ onCommand: e, isBold: t, isUnderline: n }) {
432
+ let r = "group relative flex h-7 w-7 items-center justify-center p-0 text-sm leading-none cursor-pointer transition-colors duration-150 active:translate-y-px", i = "bg-white text-[#333] hover:bg-[#f0f0f0]", a = "bg-[#e2e8f0] text-black border-inner shadow-[inset_0_1px_3px_rgba(0,0,0,0.2)] font-bold", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
433
+ return /* @__PURE__ */ R("div", {
434
+ className: "forge-toolbar-group forge-toolbar-font inline-flex items-center rounded-sm border border-[#ccc] bg-white divide-x divide-[#ccc] rtl:divide-x-reverse",
435
+ children: [
436
+ /* @__PURE__ */ R("button", {
437
+ type: "button",
438
+ className: `${r} ${t ? a : i}`,
439
+ onClick: () => e("bold"),
440
+ "aria-label": "Bold",
441
+ children: [/* @__PURE__ */ R("span", {
442
+ className: "text-sm font-bold font-serif",
443
+ children: "B"
444
+ }), /* @__PURE__ */ R("span", {
445
+ className: o,
446
+ "data-i18n": "bold",
447
+ children: "Bold"
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ R("button", {
451
+ type: "button",
452
+ className: `${r} ${n ? a : i}`,
453
+ onClick: () => e("underline"),
454
+ "aria-label": "Underline",
455
+ children: [/* @__PURE__ */ R("span", {
456
+ className: "text-sm font-bold font-serif underline",
457
+ children: "U"
458
+ }), /* @__PURE__ */ R("span", {
459
+ className: o,
460
+ "data-i18n": "underline",
461
+ children: "Underline"
462
+ })]
463
+ }),
464
+ /* @__PURE__ */ R("button", {
465
+ type: "button",
466
+ className: `${r} ${i}`,
467
+ onClick: () => e("removeFormat"),
468
+ "aria-label": "Remove Font Style",
469
+ children: [/* @__PURE__ */ R("span", {
470
+ className: "inline-block h-4 w-4 text-center text-sm leading-none",
471
+ children: /* @__PURE__ */ R("svg", {
472
+ viewBox: "0 0 20 20",
473
+ className: "block h-4 w-4 fill-none stroke-black",
474
+ strokeWidth: "2",
475
+ children: /* @__PURE__ */ R("path", { d: "M 4 4 L 16 16 M 16 4 L 4 16" })
476
+ })
477
+ }), /* @__PURE__ */ R("span", {
478
+ className: o,
479
+ "data-i18n": "removeFormat",
480
+ children: "Remove Font Style"
481
+ })]
482
+ })
483
+ ]
484
+ });
485
+ }
486
+ //#endregion
487
+ //#region node_modules/preact/hooks/dist/hooks.module.js
488
+ var ye, V, be, H, xe = 0, Se = [], U = d, Ce = U.__b, we = U.__r, Te = U.diffed, Ee = U.__c, De = U.unmount, Oe = U.__;
489
+ function W(e, t) {
490
+ U.__h && U.__h(V, e, xe || t), xe = 0;
491
+ var n = V.__H || (V.__H = {
492
+ __: [],
493
+ __h: []
494
+ });
495
+ return e >= n.__.length && n.__.push({}), n.__[e];
496
+ }
497
+ function G(e) {
498
+ return xe = 1, ke(Le, e);
499
+ }
500
+ function ke(e, t, n) {
501
+ var r = W(ye++, 2);
502
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Le(void 0, t), function(e) {
503
+ var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
504
+ t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
505
+ }], r.__c = V, !V.__f)) {
506
+ var i = function(e, t, n) {
507
+ if (!r.__c.__H) return !0;
508
+ var i = !1, o = r.__c.props !== e;
509
+ if (r.__c.__H.__.some(function(e) {
510
+ if (e.__N) {
511
+ i = !0;
512
+ var t = e.__[0];
513
+ e.__ = e.__N, e.__N = void 0, t !== e.__[0] && (o = !0);
514
+ }
515
+ }), a) {
516
+ var s = a.call(this, e, t, n);
517
+ return i ? s || o : s;
518
+ }
519
+ return !i || o;
520
+ };
521
+ V.__f = !0;
522
+ var a = V.shouldComponentUpdate, o = V.componentWillUpdate;
523
+ V.componentWillUpdate = function(e, t, n) {
524
+ if (this.__e) {
525
+ var r = a;
526
+ a = void 0, i(e, t, n), a = r;
527
+ }
528
+ o && o.call(this, e, t, n);
529
+ }, V.shouldComponentUpdate = i;
530
+ }
531
+ return r.__N || r.__;
532
+ }
533
+ function K(e, t) {
534
+ var n = W(ye++, 3);
535
+ !U.__s && Ie(n.__H, t) && (n.__ = e, n.u = t, V.__H.__h.push(n));
536
+ }
537
+ function q(e) {
538
+ return xe = 5, Ae(function() {
539
+ return { current: e };
540
+ }, []);
541
+ }
542
+ function Ae(e, t) {
543
+ var n = W(ye++, 7);
544
+ return Ie(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
545
+ }
546
+ function je() {
547
+ for (var e; e = Se.shift();) {
548
+ var t = e.__H;
549
+ if (e.__P && t) try {
550
+ t.__h.some(Pe), t.__h.some(Fe), t.__h = [];
551
+ } catch (n) {
552
+ t.__h = [], U.__e(n, e.__v);
553
+ }
554
+ }
555
+ }
556
+ U.__b = function(e) {
557
+ V = null, Ce && Ce(e);
558
+ }, U.__ = function(e, t) {
559
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Oe && Oe(e, t);
560
+ }, U.__r = function(e) {
561
+ we && we(e), ye = 0;
562
+ var t = (V = e.__c).__H;
563
+ t && (be === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
564
+ e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
565
+ })) : (t.__h.some(Pe), t.__h.some(Fe), t.__h = [], ye = 0)), be = V;
566
+ }, U.diffed = function(e) {
567
+ Te && Te(e);
568
+ var t = e.__c;
569
+ t && t.__H && (t.__H.__h.length && (Se.push(t) !== 1 && H === U.requestAnimationFrame || ((H = U.requestAnimationFrame) || Ne)(je)), t.__H.__.some(function(e) {
570
+ e.u &&= (e.__H = e.u, void 0);
571
+ })), be = V = null;
572
+ }, U.__c = function(e, t) {
573
+ t.some(function(e) {
574
+ try {
575
+ e.__h.some(Pe), e.__h = e.__h.filter(function(e) {
576
+ return !e.__ || Fe(e);
577
+ });
578
+ } catch (n) {
579
+ t.some(function(e) {
580
+ e.__h &&= [];
581
+ }), t = [], U.__e(n, e.__v);
582
+ }
583
+ }), Ee && Ee(e, t);
584
+ }, U.unmount = function(e) {
585
+ De && De(e);
586
+ var t, n = e.__c;
587
+ n && n.__H && (n.__H.__.some(function(e) {
588
+ try {
589
+ Pe(e);
590
+ } catch (e) {
591
+ t = e;
592
+ }
593
+ }), n.__H = void 0, t && U.__e(t, n.__v));
594
+ };
595
+ var Me = typeof requestAnimationFrame == "function";
596
+ function Ne(e) {
597
+ var t, n = function() {
598
+ clearTimeout(r), Me && cancelAnimationFrame(t), setTimeout(e);
599
+ }, r = setTimeout(n, 35);
600
+ Me && (t = requestAnimationFrame(n));
601
+ }
602
+ function Pe(e) {
603
+ var t = V, n = e.__c;
604
+ typeof n == "function" && (e.__c = void 0, n()), V = t;
605
+ }
606
+ function Fe(e) {
607
+ var t = V;
608
+ e.__c = e.__(), V = t;
609
+ }
610
+ function Ie(e, t) {
611
+ return !e || e.length !== t.length || t.some(function(t, n) {
612
+ return t !== e[n];
613
+ });
614
+ }
615
+ function Le(e, t) {
616
+ return typeof t == "function" ? t(e) : t;
617
+ }
618
+ //#endregion
619
+ //#region src/components/shared/toolbar/font/Hooks/boldHandler.jsx
620
+ var Re = (e, t, n) => {
621
+ if (!e.collapsed) {
622
+ if (n) {
623
+ let t = e.commonAncestorContainer;
624
+ for (t.nodeType === 3 && (t = t.parentNode); t && t.getAttribute && t.getAttribute("contenteditable") !== "true";) {
625
+ if (t.style && t.style.fontWeight) {
626
+ if (t.style.fontWeight = "", !t.getAttribute("style")) {
627
+ let e = t.parentNode;
628
+ for (; t.firstChild;) e.insertBefore(t.firstChild, t);
629
+ e.removeChild(t);
630
+ }
631
+ break;
632
+ }
633
+ t = t.parentNode;
634
+ }
635
+ } else {
636
+ let t = e.extractContents(), n = document.createElement("span");
637
+ n.style.fontWeight = "bold", n.appendChild(t), e.insertNode(n);
638
+ }
639
+ return;
640
+ }
641
+ if (n) {
642
+ let n = e.startContainer, r = n.nodeType === 1 ? n : n.parentNode;
643
+ for (; r && r.getAttribute && r.getAttribute("contenteditable") !== "true" && !(r.style && r.style.fontWeight);) r = r.parentNode;
644
+ let i = document.createElement("span");
645
+ i.innerHTML = "​", r && r.parentNode ? r.nextSibling ? r.parentNode.insertBefore(i, r.nextSibling) : r.parentNode.appendChild(i) : e.insertNode(i);
646
+ let a = document.createRange();
647
+ a.setStart(i, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
648
+ } else {
649
+ let n = document.createElement("span");
650
+ n.style.fontWeight = "bold", n.innerHTML = "​", e.insertNode(n);
651
+ let r = document.createRange();
652
+ r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
653
+ }
654
+ }, ze = (e, t, n) => {
655
+ if (!e.collapsed) {
656
+ if (n) {
657
+ let t = e.commonAncestorContainer;
658
+ for (t.nodeType === 3 && (t = t.parentNode); t && t.getAttribute && t.getAttribute("contenteditable") !== "true";) {
659
+ if (t.style && t.style.textDecoration) {
660
+ if (t.style.textDecoration = "", !t.getAttribute("style")) {
661
+ let e = t.parentNode;
662
+ for (; t.firstChild;) e.insertBefore(t.firstChild, t);
663
+ e.removeChild(t);
664
+ }
665
+ break;
666
+ }
667
+ t = t.parentNode;
668
+ }
669
+ } else {
670
+ let t = e.extractContents(), n = document.createElement("span");
671
+ n.style.textDecoration = "underline", n.appendChild(t), e.insertNode(n);
672
+ }
673
+ return;
674
+ }
675
+ if (n) {
676
+ let n = e.startContainer, r = n.nodeType === 1 ? n : n.parentNode;
677
+ for (; r && r.getAttribute && r.getAttribute("contenteditable") !== "true" && !(r.style && r.style.textDecoration);) r = r.parentNode;
678
+ let i = document.createElement("span");
679
+ i.innerHTML = "​", r && r.parentNode ? r.nextSibling ? r.parentNode.insertBefore(i, r.nextSibling) : r.parentNode.appendChild(i) : e.insertNode(i);
680
+ let a = document.createRange();
681
+ a.setStart(i, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
682
+ } else {
683
+ let n = document.createElement("span");
684
+ n.style.textDecoration = "underline", n.innerHTML = "​", e.insertNode(n);
685
+ let r = document.createRange();
686
+ r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
687
+ }
688
+ }, Be = (e) => {
689
+ let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, null, !1), n;
690
+ for (; n = t.nextNode();) n.nodeValue = n.nodeValue.replace(/\u00A0/g, " ");
691
+ }, Ve = (e) => {
692
+ e.querySelectorAll("span, b, u, strong").forEach((e) => {
693
+ let t = e.getAttribute("style") || e.getAttribute("class"), n = [
694
+ "B",
695
+ "U",
696
+ "STRONG"
697
+ ].includes(e.tagName);
698
+ if (!t && !n) {
699
+ let t = e.parentNode;
700
+ for (; e.firstChild;) t.insertBefore(e.firstChild, e);
701
+ t.removeChild(e);
702
+ } else (!e.textContent || e.textContent.replace(/\u200B/g, "").length === 0) && e.remove();
703
+ });
704
+ }, He = (e, t) => {
705
+ if (e.collapsed) return;
706
+ let n = e.commonAncestorContainer;
707
+ for (n.nodeType === 3 && (n = n.parentNode); n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
708
+ let e = window.getComputedStyle(n).display;
709
+ if (e === "block" || e === "flex" || n.tagName === "PRE") break;
710
+ n = n.parentNode;
711
+ }
712
+ let r = e.extractContents().textContent.replace(/\u00A0/g, " "), i = document.createTextNode(r);
713
+ e.insertNode(i), n && n.getAttribute("contenteditable") !== "true" && (Ve(n), Be(n), n.normalize());
714
+ let a = document.createRange();
715
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
716
+ };
717
+ //#endregion
718
+ //#region src/components/shared/toolbar/font/Hooks/fontLogic.jsx
719
+ function Ue() {
720
+ let [e, t] = G(!1), [n, r] = G(!1), i = () => {
721
+ let e = window.getSelection();
722
+ if (!e || e.rangeCount === 0) return;
723
+ let n = e.anchorNode;
724
+ if (!n) return;
725
+ n.nodeType === 3 && (n = n.parentNode);
726
+ let i = !1, a = !1;
727
+ for (; n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
728
+ let e = window.getComputedStyle(n).fontWeight, t = window.getComputedStyle(n).textDecoration;
729
+ (e === "bold" || parseInt(e) >= 700 || n.tagName === "B" || n.tagName === "STRONG") && (i = !0), (t.includes("underline") || n.tagName === "U") && (a = !0), n = n.parentNode;
730
+ }
731
+ t(i), r(a);
732
+ };
733
+ return K(() => (document.addEventListener("selectionchange", i), () => document.removeEventListener("selectionchange", i)), []), {
734
+ executeCommand: (t) => {
735
+ let r = window.getSelection();
736
+ if (!r || r.rangeCount === 0) return;
737
+ let a = r.getRangeAt(0);
738
+ t === "bold" ? Re(a, r, e) : t === "underline" ? ze(a, r, n) : t === "removeFormat" && He(a, r), i();
739
+ },
740
+ isBold: e,
741
+ isUnderline: n
742
+ };
743
+ }
744
+ //#endregion
745
+ //#region src/components/shared/toolbar/font/Components/index.jsx
746
+ function J() {
747
+ let { executeCommand: e, isBold: t, isUnderline: n } = Ue();
748
+ return /* @__PURE__ */ R(B, {
749
+ onCommand: e,
750
+ isBold: t,
751
+ isUnderline: n
752
+ });
753
+ }
754
+ //#endregion
755
+ //#region src/components/shared/toolbar/FontName/Hooks/fontNameHandler.jsx
756
+ var We = (e, t, n) => {
757
+ let r = n || "Arial";
758
+ if (!e || !t) return;
759
+ if (!e.collapsed) {
760
+ let n = document.createElement("span");
761
+ n.style.fontFamily = r;
762
+ try {
763
+ n.appendChild(e.extractContents()), e.insertNode(n);
764
+ } catch {
765
+ document.execCommand("fontName", !1, r);
766
+ return;
767
+ }
768
+ let i = document.createRange();
769
+ i.selectNodeContents(n), t.removeAllRanges(), t.addRange(i);
770
+ return;
771
+ }
772
+ let i = document.createElement("span");
773
+ i.style.fontFamily = r;
774
+ let a = document.createTextNode("​");
775
+ i.appendChild(a), e.insertNode(i);
776
+ let o = document.createRange();
777
+ o.setStart(i.firstChild, 1), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
778
+ }, Ge = (e) => {
779
+ let t = window.getSelection();
780
+ if (!t || t.rangeCount === 0) return null;
781
+ let n = t.anchorNode;
782
+ if (!n || e && !e.contains(n)) return null;
783
+ for (n.nodeType === 3 && (n = n.parentNode); n && n !== e;) {
784
+ if (n.style && n.style.fontFamily) {
785
+ let e = n.style.fontFamily.split(",")[0].replace(/['"]/g, "").trim();
786
+ if (e) return e;
787
+ }
788
+ n = n.parentNode;
789
+ }
790
+ let r = window.getComputedStyle(e).fontFamily;
791
+ return r ? r.split(",")[0].replace(/['"]/g, "").trim() : null;
792
+ };
793
+ //#endregion
794
+ //#region src/components/shared/toolbar/FontName/Hooks/fontNameLogic.jsx
795
+ function Ke(e) {
796
+ let [t, n] = G("Arial"), r = q("Arial"), i = q(null), a = () => {
797
+ let t = window.getSelection();
798
+ if (t && t.rangeCount > 0) {
799
+ let n = t.getRangeAt(0), r = e?.current;
800
+ r && r.contains(n.commonAncestorContainer) && (i.current = n.cloneRange());
801
+ }
802
+ }, o = () => {
803
+ let t = e?.current;
804
+ if (!t) return;
805
+ let i = Ge(t);
806
+ i && (n(i), r.current = i);
807
+ };
808
+ return K(() => {
809
+ let t = () => {
810
+ a(), o();
811
+ };
812
+ document.addEventListener("selectionchange", t);
813
+ let n = e?.current;
814
+ if (!n) return () => {
815
+ document.removeEventListener("selectionchange", t);
816
+ };
817
+ let i = (e) => {
818
+ if (e.inputType !== "insertText" || !e.data) return;
819
+ let t = window.getSelection();
820
+ if (!t || t.rangeCount === 0) return;
821
+ let n = t.getRangeAt(0), i = n.startContainer;
822
+ if (i.nodeType === 3 && (i = i.parentNode), i && i.tagName === "SPAN" && i.style.fontFamily && i.style.fontFamily.replace(/['"]/g, "").toLowerCase() === r.current.toLowerCase()) return;
823
+ e.preventDefault();
824
+ let a = document.createElement("span");
825
+ a.style.fontFamily = r.current, a.textContent = e.data, n.deleteContents(), n.insertNode(a);
826
+ let o = document.createRange();
827
+ o.setStart(a.firstChild, a.textContent.length), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
828
+ };
829
+ return n.addEventListener("beforeinput", i), () => {
830
+ document.removeEventListener("selectionchange", t), n.removeEventListener("beforeinput", i);
831
+ };
832
+ }, [e, e?.current]), {
833
+ currentFont: t,
834
+ applyFont: (t) => {
835
+ let o = t || "Arial";
836
+ r.current = o, n(o);
837
+ let s = e?.current;
838
+ if (!s) return;
839
+ s.focus();
840
+ let c = window.getSelection(), l = null;
841
+ if (i.current ? (c.removeAllRanges(), c.addRange(i.current), l = i.current) : c.rangeCount > 0 && (l = c.getRangeAt(0)), !l) {
842
+ let e = document.createRange();
843
+ e.selectNodeContents(s), e.collapse(!1), c.removeAllRanges(), c.addRange(e), l = e;
844
+ }
845
+ We(l, c, o), a();
846
+ }
847
+ };
848
+ }
849
+ //#endregion
850
+ //#region src/components/shared/toolbar/Hooks/dropdown.js
851
+ function qe(e, t) {
852
+ function n() {
853
+ t.classList.remove("is-open"), e.classList.remove("is-active"), document.removeEventListener("click", r);
854
+ }
855
+ function r(r) {
856
+ !t.contains(r.target) && !e.contains(r.target) && n();
857
+ }
858
+ function i(n) {
859
+ n.stopPropagation();
860
+ let i = t.classList.contains("is-open");
861
+ document.querySelectorAll(".forge-toolbar-dropdown.is-open").forEach((e) => {
862
+ e.classList.remove("is-open");
863
+ }), document.querySelectorAll(".forge-toolbar-button.is-active").forEach((e) => {
864
+ e.classList.remove("is-active");
865
+ }), i || (t.classList.add("is-open"), e.classList.add("is-active"), document.addEventListener("click", r));
866
+ }
867
+ return e.addEventListener("click", i), function() {
868
+ e.removeEventListener("click", i), document.removeEventListener("click", r);
869
+ };
870
+ }
871
+ //#endregion
872
+ //#region src/components/shared/toolbar/FontName/Components/FontNameToolbar.jsx
873
+ var Je = [
874
+ "Arial",
875
+ "Arial Black",
876
+ "Comic Sans MS",
877
+ "Courier New",
878
+ "Helvetica",
879
+ "Impact",
880
+ "Tahoma",
881
+ "Times New Roman",
882
+ "Verdana",
883
+ "Nunito Sans",
884
+ "Segoe UI"
885
+ ], Ye = 32;
886
+ function Xe({ currentFont: e, applyFont: t }) {
887
+ let n = q(null), r = q(null);
888
+ K(() => {
889
+ if (n.current && r.current) return qe(n.current, r.current);
890
+ }, []);
891
+ let i = (e) => {
892
+ t(e), r.current && r.current.classList.remove("is-open"), n.current && n.current.classList.remove("is-active");
893
+ }, a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
894
+ return /* @__PURE__ */ R("div", {
895
+ className: "forge-toolbar-group forge-toolbar-fontname relative flex items-center",
896
+ children: [/* @__PURE__ */ R("div", {
897
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
898
+ children: [/* @__PURE__ */ R("button", {
899
+ type: "button",
900
+ className: "forge-fontname-main group relative flex h-full items-center justify-center min-w-[70px] cursor-pointer border-none bg-transparent px-2 hover:bg-black/5",
901
+ onMouseDown: (e) => e.preventDefault(),
902
+ onClick: () => {
903
+ n.current && n.current.click();
904
+ },
905
+ "aria-label": "Current font",
906
+ children: [/* @__PURE__ */ R("span", {
907
+ className: "forge-current-fontname max-w-[65px] truncate text-xs text-[#333]",
908
+ style: { fontFamily: e },
909
+ children: e
910
+ }), /* @__PURE__ */ R("span", {
911
+ className: a,
912
+ "data-i18n": "fontName",
913
+ children: "Font Family"
914
+ })]
915
+ }), /* @__PURE__ */ R("button", {
916
+ ref: n,
917
+ type: "button",
918
+ className: "forge-fontname-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
919
+ onMouseDown: (e) => e.preventDefault(),
920
+ "aria-label": "More fonts",
921
+ children: [/* @__PURE__ */ R(() => /* @__PURE__ */ R("svg", {
922
+ className: "h-2 w-2 fill-current text-[#666]",
923
+ viewBox: "0 0 10 6",
924
+ xmlns: "http://www.w3.org/2000/svg",
925
+ children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
926
+ }), {}), /* @__PURE__ */ R("span", {
927
+ className: a,
928
+ "data-i18n": "moreFont",
929
+ children: "More Fonts"
930
+ })]
931
+ })]
932
+ }), /* @__PURE__ */ R("div", {
933
+ ref: r,
934
+ className: "forge-toolbar-dropdown forge-dropdown-fontname absolute left-0 top-full z-20 hidden mt-1 min-w-[150px] overflow-y-auto rounded border border-[#ccc] bg-white p-1 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
935
+ style: { maxHeight: "128px" },
936
+ children: Je.map((e) => /* @__PURE__ */ R("button", {
937
+ type: "button",
938
+ className: "forge-dropdown-item flex w-full cursor-pointer items-center whitespace-nowrap rounded-sm px-2 text-left text-xs text-[#333] hover:bg-[#f0f0f0]",
939
+ style: {
940
+ fontFamily: e,
941
+ height: `${Ye}px`
942
+ },
943
+ onMouseDown: (e) => e.preventDefault(),
944
+ onClick: () => i(e),
945
+ children: e
946
+ }, e))
947
+ })]
948
+ });
949
+ }
950
+ //#endregion
951
+ //#region src/components/shared/toolbar/FontName/Components/index.jsx
952
+ function Ze({ editorRef: e }) {
953
+ let { currentFont: t, applyFont: n } = Ke(e);
954
+ return /* @__PURE__ */ R(Xe, {
955
+ currentFont: t,
956
+ applyFont: n
957
+ });
958
+ }
959
+ //#endregion
960
+ //#region src/components/shared/toolbar/Color/Components/colorPalette.jsx
961
+ var Qe = [
962
+ [
963
+ "#000000",
964
+ "#424242",
965
+ "#636363",
966
+ "#9C9C94",
967
+ "#CEC6CE",
968
+ "#EFEFEF",
969
+ "#F7F7F7",
970
+ "#FFFFFF"
971
+ ],
972
+ [
973
+ "#FF0000",
974
+ "#FF9C00",
975
+ "#FFFF00",
976
+ "#00FF00",
977
+ "#00FFFF",
978
+ "#0000FF",
979
+ "#9C00FF",
980
+ "#FF00FF"
981
+ ],
982
+ [
983
+ "#F7C6CE",
984
+ "#FFE7CE",
985
+ "#FFEFC6",
986
+ "#D6EFD6",
987
+ "#CEDEE7",
988
+ "#CEE7F7",
989
+ "#D6D6E7",
990
+ "#E7D6DE"
991
+ ],
992
+ [
993
+ "#E79C9C",
994
+ "#FFC69C",
995
+ "#FFE79C",
996
+ "#B5D6A5",
997
+ "#A5C6CE",
998
+ "#9CC6EF",
999
+ "#B5A5D6",
1000
+ "#D6A5BD"
1001
+ ],
1002
+ [
1003
+ "#E76363",
1004
+ "#F7AD6B",
1005
+ "#FFD663",
1006
+ "#94BD7B",
1007
+ "#73A5AD",
1008
+ "#6BADDE",
1009
+ "#8C7BC6",
1010
+ "#C67BA5"
1011
+ ],
1012
+ [
1013
+ "#CE0000",
1014
+ "#E79439",
1015
+ "#EFC631",
1016
+ "#6BA54A",
1017
+ "#4A7B8C",
1018
+ "#3984C6",
1019
+ "#634AA5",
1020
+ "#A54A7B"
1021
+ ],
1022
+ [
1023
+ "#9C0000",
1024
+ "#B56308",
1025
+ "#BD9400",
1026
+ "#397B21",
1027
+ "#104A5A",
1028
+ "#085294",
1029
+ "#311873",
1030
+ "#731842"
1031
+ ],
1032
+ [
1033
+ "#630000",
1034
+ "#7B3900",
1035
+ "#846300",
1036
+ "#295218",
1037
+ "#083139",
1038
+ "#003163",
1039
+ "#21104A",
1040
+ "#4A1031"
1041
+ ]
1042
+ ];
1043
+ function $e({ event: e, onApply: t, currentColor: n }) {
1044
+ return /* @__PURE__ */ R("div", {
1045
+ className: "forge-color-palette flex flex-col gap-1",
1046
+ children: Qe.map((r, i) => /* @__PURE__ */ R("div", {
1047
+ className: "forge-color-row flex gap-1 justify-between",
1048
+ children: r.map((r) => {
1049
+ let i = n?.toLowerCase() === r.toLowerCase();
1050
+ return /* @__PURE__ */ R("button", {
1051
+ type: "button",
1052
+ title: r,
1053
+ className: `forge-color-button h-4 w-4 cursor-pointer rounded-[2px] border p-0 hover:scale-110 hover:border-black transition-transform ${i ? "border-2 border-black" : "border-[#ccc]"}`,
1054
+ style: { backgroundColor: r },
1055
+ onMouseDown: (e) => e.preventDefault(),
1056
+ onClick: () => t(e, r),
1057
+ "aria-label": r,
1058
+ "aria-pressed": i
1059
+ }, r);
1060
+ })
1061
+ }, i))
1062
+ });
1063
+ }
1064
+ //#endregion
1065
+ //#region src/components/shared/toolbar/Color/Components/ColorToolbar.jsx
1066
+ function Y({ logic: e }) {
1067
+ let { applyColor: t, applyRecentColor: n, resetColor: r, recentForeColor: i, recentBackColor: a } = e, o = q(null), s = q(null), c = q(null), l = q(null);
1068
+ K(() => {
1069
+ if (o.current && s.current) return qe(o.current, s.current);
1070
+ }, []), K(() => {
1071
+ if (c.current && l.current) return qe(c.current, l.current);
1072
+ }, []);
1073
+ let u = (e, n) => {
1074
+ t(e, n), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
1075
+ }, d = (e, n) => {
1076
+ t(e, n), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
1077
+ }, f = () => {
1078
+ r("foreColor"), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
1079
+ }, p = () => {
1080
+ r("backColor"), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
1081
+ }, m = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", h = () => /* @__PURE__ */ R("svg", {
1082
+ className: "h-2 w-2 fill-current text-[#666]",
1083
+ viewBox: "0 0 10 6",
1084
+ xmlns: "http://www.w3.org/2000/svg",
1085
+ children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
1086
+ });
1087
+ return /* @__PURE__ */ R("div", {
1088
+ className: "forge-toolbar-group forge-toolbar-color flex items-center gap-1",
1089
+ children: [/* @__PURE__ */ R("div", {
1090
+ className: "forge-color-item relative flex items-center",
1091
+ children: [/* @__PURE__ */ R("div", {
1092
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
1093
+ children: [/* @__PURE__ */ R("button", {
1094
+ type: "button",
1095
+ className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
1096
+ onMouseDown: (e) => e.preventDefault(),
1097
+ onClick: () => n("foreColor"),
1098
+ "aria-label": "Apply text color",
1099
+ children: [/* @__PURE__ */ R("span", {
1100
+ className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
1101
+ style: {
1102
+ backgroundColor: "transparent",
1103
+ color: i
1104
+ },
1105
+ children: "A"
1106
+ }), /* @__PURE__ */ R("span", {
1107
+ className: m,
1108
+ "data-i18n": "recentColor",
1109
+ children: "Recent Color"
1110
+ })]
1111
+ }), /* @__PURE__ */ R("button", {
1112
+ ref: o,
1113
+ type: "button",
1114
+ className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
1115
+ onMouseDown: (e) => e.preventDefault(),
1116
+ "aria-label": "More text colors",
1117
+ children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
1118
+ className: m,
1119
+ "data-i18n": "moreColor",
1120
+ children: "More Color"
1121
+ })]
1122
+ })]
1123
+ }), /* @__PURE__ */ R("div", {
1124
+ ref: s,
1125
+ className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
1126
+ children: /* @__PURE__ */ R("div", {
1127
+ className: "forge-color-section",
1128
+ children: [/* @__PURE__ */ R("div", {
1129
+ className: "forge-color-section-header mb-1.5 flex items-center justify-between",
1130
+ children: [/* @__PURE__ */ R("span", {
1131
+ className: "forge-color-title text-xs font-bold text-[#333]",
1132
+ children: "Text Color"
1133
+ }), /* @__PURE__ */ R("button", {
1134
+ type: "button",
1135
+ className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
1136
+ onMouseDown: (e) => e.preventDefault(),
1137
+ onClick: f,
1138
+ children: "Reset"
1139
+ })]
1140
+ }), /* @__PURE__ */ R($e, {
1141
+ event: "foreColor",
1142
+ onApply: u
1143
+ })]
1144
+ })
1145
+ })]
1146
+ }), /* @__PURE__ */ R("div", {
1147
+ className: "forge-color-item relative flex items-center",
1148
+ children: [/* @__PURE__ */ R("div", {
1149
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
1150
+ children: [/* @__PURE__ */ R("button", {
1151
+ type: "button",
1152
+ className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
1153
+ onMouseDown: (e) => e.preventDefault(),
1154
+ onClick: () => n("backColor"),
1155
+ "aria-label": "Apply background color",
1156
+ children: [/* @__PURE__ */ R("span", {
1157
+ className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
1158
+ style: {
1159
+ backgroundColor: a || "#FFFFFF",
1160
+ color: "#000"
1161
+ },
1162
+ children: "A"
1163
+ }), /* @__PURE__ */ R("span", {
1164
+ className: m,
1165
+ "data-i18n": "recentBackColor",
1166
+ children: "Recent Background Color"
1167
+ })]
1168
+ }), /* @__PURE__ */ R("button", {
1169
+ ref: c,
1170
+ type: "button",
1171
+ className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
1172
+ onMouseDown: (e) => e.preventDefault(),
1173
+ "aria-label": "More background colors",
1174
+ children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
1175
+ className: m,
1176
+ "data-i18n": "moreBackColor",
1177
+ children: "More Background Colors"
1178
+ })]
1179
+ })]
1180
+ }), /* @__PURE__ */ R("div", {
1181
+ ref: l,
1182
+ className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
1183
+ children: /* @__PURE__ */ R("div", {
1184
+ className: "forge-color-section",
1185
+ children: [/* @__PURE__ */ R("div", {
1186
+ className: "forge-color-section-header mb-1.5 flex items-center justify-between",
1187
+ children: [/* @__PURE__ */ R("span", {
1188
+ className: "forge-color-title text-xs font-bold text-[#333]",
1189
+ children: "Background Color"
1190
+ }), /* @__PURE__ */ R("button", {
1191
+ type: "button",
1192
+ className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
1193
+ onMouseDown: (e) => e.preventDefault(),
1194
+ onClick: p,
1195
+ children: "White"
1196
+ })]
1197
+ }), /* @__PURE__ */ R($e, {
1198
+ event: "backColor",
1199
+ onApply: d
1200
+ })]
1201
+ })
1202
+ })]
1203
+ })]
1204
+ });
1205
+ }
1206
+ //#endregion
1207
+ //#region src/components/shared/toolbar/Color/Hooks/colorUtils.jsx
1208
+ function et(e) {
1209
+ let t = document.createElement("span");
1210
+ t.style.color = e, document.body.appendChild(t);
1211
+ let n = window.getComputedStyle(t).color;
1212
+ return document.body.removeChild(t), n;
1213
+ }
1214
+ function tt(e, t) {
1215
+ let n = e;
1216
+ for (; n && n !== document.body;) {
1217
+ if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color && et(n.style.color) === t) return n;
1218
+ n = n.parentElement;
1219
+ }
1220
+ return null;
1221
+ }
1222
+ //#endregion
1223
+ //#region src/components/shared/toolbar/Color/Hooks/usePenMode.jsx
1224
+ function nt(e, t) {
1225
+ K(() => {
1226
+ function n(n) {
1227
+ if (n.inputType !== "insertText" || !n.data || !e.current) return;
1228
+ let r = n.target;
1229
+ if (!r || !r.classList || !r.classList.contains(t)) return;
1230
+ let i = window.getSelection();
1231
+ if (!i || !i.rangeCount) return;
1232
+ let a = i.getRangeAt(0);
1233
+ if (!a.collapsed) return;
1234
+ let o = et(e.current), s = a.startContainer;
1235
+ s.nodeType === Node.TEXT_NODE && (s = s.parentElement);
1236
+ let c = tt(s, o);
1237
+ if (n.preventDefault(), c) {
1238
+ let e = document.createTextNode(n.data);
1239
+ a.insertNode(e), a.setStartAfter(e), a.collapse(!0), i.removeAllRanges(), i.addRange(a);
1240
+ return;
1241
+ }
1242
+ let l = document.createElement("span");
1243
+ l.style.color = e.current, l.textContent = n.data, a.deleteContents(), a.insertNode(l);
1244
+ let u = document.createRange();
1245
+ u.selectNodeContents(l), u.collapse(!1), i.removeAllRanges(), i.addRange(u);
1246
+ }
1247
+ return document.addEventListener("beforeinput", n, !0), () => document.removeEventListener("beforeinput", n, !0);
1248
+ }, []);
1249
+ }
1250
+ //#endregion
1251
+ //#region src/components/shared/toolbar/Color/Hooks/foreColorHandler.jsx
1252
+ var rt = (e, t, n) => {
1253
+ let r = n || "#000000";
1254
+ if (!e) return;
1255
+ if (!e.collapsed) {
1256
+ let n = e.extractContents(), i = document.createElement("span");
1257
+ i.style.color = r, i.appendChild(n), e.insertNode(i);
1258
+ let a = document.createRange();
1259
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
1260
+ return;
1261
+ }
1262
+ let i = document.createElement("span");
1263
+ i.style.color = r, i.appendChild(document.createTextNode("​")), e.insertNode(i);
1264
+ let a = document.createRange();
1265
+ a.setStart(i.firstChild, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
1266
+ };
1267
+ //#endregion
1268
+ //#region src/components/shared/toolbar/Color/Hooks/useForeColor.jsx
1269
+ function it(e = "forge-editor__content") {
1270
+ let [t, n] = G("#000000"), r = q(null);
1271
+ nt(r, e);
1272
+ let i = (e) => {
1273
+ let t = e || "#000000", i = window.getSelection();
1274
+ i && i.rangeCount > 0 && rt(i.getRangeAt(0), i, t), r.current = t, n(t);
1275
+ };
1276
+ return {
1277
+ recentForeColor: t,
1278
+ applyForeColor: i,
1279
+ applyRecentForeColor: () => {
1280
+ i(t);
1281
+ },
1282
+ resetForeColor: () => {
1283
+ i("#000000"), r.current = null;
1284
+ }
1285
+ };
1286
+ }
1287
+ //#endregion
1288
+ //#region src/components/shared/toolbar/Color/Hooks/usePenModeBack.jsx
1289
+ function at(e, t) {
1290
+ K(() => {
1291
+ let n = (n) => {
1292
+ if (!e.current || n.inputType !== "insertText" || !n.data) return;
1293
+ let r = window.getSelection();
1294
+ if (!r || !r.rangeCount) return;
1295
+ let i = r.getRangeAt(0);
1296
+ if (!(i.startContainer.nodeType === 1 ? i.startContainer.closest(`.${t}`) : i.startContainer.parentElement?.closest(`.${t}`))) return;
1297
+ n.preventDefault();
1298
+ let a = document.createElement("span");
1299
+ a.style.backgroundColor = e.current, a.textContent = n.data, i.deleteContents(), i.insertNode(a);
1300
+ let o = document.createRange();
1301
+ o.setStartAfter(a), o.collapse(!0), r.removeAllRanges(), r.addRange(o);
1302
+ };
1303
+ return document.addEventListener("beforeinput", n, !0), () => {
1304
+ document.removeEventListener("beforeinput", n, !0);
1305
+ };
1306
+ }, [t, e]);
1307
+ }
1308
+ //#endregion
1309
+ //#region src/components/shared/toolbar/Color/Hooks/backColorHandler.jsx
1310
+ var ot = (e, t, n) => {
1311
+ let r = n || "#FFFFFF";
1312
+ if (!e) return;
1313
+ if (!e.collapsed) {
1314
+ let n = e.extractContents(), i = document.createElement("span");
1315
+ i.style.backgroundColor = r, i.appendChild(n), e.insertNode(i);
1316
+ let a = document.createRange();
1317
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
1318
+ return;
1319
+ }
1320
+ let i = document.createElement("span");
1321
+ i.style.backgroundColor = r, i.appendChild(document.createTextNode("​")), e.insertNode(i);
1322
+ let a = document.createRange();
1323
+ a.setStart(i.firstChild, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
1324
+ };
1325
+ //#endregion
1326
+ //#region src/components/shared/toolbar/Color/Hooks/useBackColor.jsx
1327
+ function st(e = "forge-editor__content") {
1328
+ let [t, n] = G("#FFFFFF"), r = q(null);
1329
+ at(r, e);
1330
+ let i = (e) => {
1331
+ let t = e || "#FFFFFF", i = window.getSelection();
1332
+ i && i.rangeCount > 0 && ot(i.getRangeAt(0), i, t), r.current = t, n(t);
1333
+ };
1334
+ return {
1335
+ recentBackColor: t,
1336
+ applyBackColor: i,
1337
+ applyRecentBackColor: () => {
1338
+ i(t);
1339
+ },
1340
+ resetBackColor: () => {
1341
+ i("#FFFFFF"), r.current = null;
1342
+ }
1343
+ };
1344
+ }
1345
+ //#endregion
1346
+ //#region src/components/shared/toolbar/Color/Hooks/colorLogic.jsx
1347
+ function ct() {
1348
+ let e = it(), t = st();
1349
+ return {
1350
+ applyColor: (n, r) => {
1351
+ n === "foreColor" ? e.applyForeColor(r) : n === "backColor" && t.applyBackColor(r);
1352
+ },
1353
+ applyRecentColor: (n) => {
1354
+ n === "foreColor" ? e.applyRecentForeColor() : n === "backColor" && t.applyRecentBackColor();
1355
+ },
1356
+ resetColor: (n) => {
1357
+ n === "foreColor" ? e.resetForeColor() : n === "backColor" && t.resetBackColor();
1358
+ },
1359
+ recentForeColor: e.recentForeColor,
1360
+ recentBackColor: t.recentBackColor
1361
+ };
1362
+ }
1363
+ //#endregion
1364
+ //#region src/components/shared/toolbar/Color/Components/index.jsx
1365
+ function lt() {
1366
+ return /* @__PURE__ */ R(Y, { logic: ct() });
1367
+ }
1368
+ //#endregion
1369
+ //#region src/components/shared/toolbar/Paragraph/Components/ParagraphToolbar.jsx
1370
+ function ut({ logic: e = {} }) {
1371
+ let { saveSelectionRange: t, toggleUnorderedList: n, toggleOrderedList: r, setAlignment: i, outdent: a, indent: o } = e, [s, c] = G(!1), l = q(null);
1372
+ K(() => {
1373
+ let e = (e) => {
1374
+ l.current && !l.current.contains(e.target) && c(!1);
1375
+ };
1376
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1377
+ }, []);
1378
+ let u = (e, n, r = null) => {
1379
+ e.preventDefault(), typeof t == "function" && t(), typeof n == "function" && n(r);
1380
+ }, d = "forge-toolbar-button group relative flex h-8 items-center justify-center bg-white px-2.5 text-sm transition-all duration-150 hover:bg-[#f5f5f5] active:bg-[#e8e8e8] focus:outline-none", f = "forge-toolbar-icon inline-block h-4 w-4", p = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", m = "group relative flex h-7 w-7 items-center justify-center rounded hover:bg-gray-100";
1381
+ return /* @__PURE__ */ R("div", {
1382
+ ref: l,
1383
+ className: "forge-toolbar-group forge-toolbar-paragraph relative inline-flex items-center text-black",
1384
+ children: [
1385
+ /* @__PURE__ */ R("style", { children: "\n .forge-toolbar-paragraph svg * {\n vector-effect: non-scaling-stroke;\n }\n " }),
1386
+ /* @__PURE__ */ R("div", {
1387
+ className: "inline-flex rounded-md border border-[#d1d5db] bg-white shadow-sm -space-x-px",
1388
+ children: [
1389
+ /* @__PURE__ */ R("button", {
1390
+ type: "button",
1391
+ className: d,
1392
+ onMouseDown: (e) => u(e, n),
1393
+ "aria-label": "Unordered list",
1394
+ children: [/* @__PURE__ */ R("span", {
1395
+ className: f,
1396
+ children: /* @__PURE__ */ R("svg", {
1397
+ viewBox: "0 0 20 20",
1398
+ className: "block h-4 w-4",
1399
+ children: [
1400
+ /* @__PURE__ */ R("circle", {
1401
+ cx: "3",
1402
+ cy: "5",
1403
+ r: "1.5",
1404
+ fill: "black"
1405
+ }),
1406
+ /* @__PURE__ */ R("circle", {
1407
+ cx: "3",
1408
+ cy: "10",
1409
+ r: "1.5",
1410
+ fill: "black"
1411
+ }),
1412
+ /* @__PURE__ */ R("circle", {
1413
+ cx: "3",
1414
+ cy: "15",
1415
+ r: "1.5",
1416
+ fill: "black"
1417
+ }),
1418
+ /* @__PURE__ */ R("rect", {
1419
+ x: "7",
1420
+ y: "4",
1421
+ width: "11",
1422
+ height: "2",
1423
+ rx: "1",
1424
+ fill: "black"
1425
+ }),
1426
+ /* @__PURE__ */ R("rect", {
1427
+ x: "7",
1428
+ y: "9",
1429
+ width: "11",
1430
+ height: "2",
1431
+ rx: "1",
1432
+ fill: "black"
1433
+ }),
1434
+ /* @__PURE__ */ R("rect", {
1435
+ x: "7",
1436
+ y: "14",
1437
+ width: "11",
1438
+ height: "2",
1439
+ rx: "1",
1440
+ fill: "black"
1441
+ })
1442
+ ]
1443
+ })
1444
+ }), /* @__PURE__ */ R("span", {
1445
+ className: p,
1446
+ "data-i18n": "unorderedList",
1447
+ children: "Bullet list"
1448
+ })]
1449
+ }),
1450
+ /* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
1451
+ /* @__PURE__ */ R("button", {
1452
+ type: "button",
1453
+ className: d,
1454
+ onMouseDown: (e) => u(e, r),
1455
+ "aria-label": "Ordered list",
1456
+ children: [/* @__PURE__ */ R("span", {
1457
+ className: f,
1458
+ children: /* @__PURE__ */ R("svg", {
1459
+ viewBox: "0 0 20 20",
1460
+ className: "block h-4 w-4",
1461
+ children: [
1462
+ /* @__PURE__ */ R("rect", {
1463
+ x: "7",
1464
+ y: "4",
1465
+ width: "11",
1466
+ height: "2",
1467
+ rx: "1",
1468
+ fill: "black"
1469
+ }),
1470
+ /* @__PURE__ */ R("rect", {
1471
+ x: "7",
1472
+ y: "9",
1473
+ width: "11",
1474
+ height: "2",
1475
+ rx: "1",
1476
+ fill: "black"
1477
+ }),
1478
+ /* @__PURE__ */ R("rect", {
1479
+ x: "7",
1480
+ y: "14",
1481
+ width: "11",
1482
+ height: "2",
1483
+ rx: "1",
1484
+ fill: "black"
1485
+ }),
1486
+ /* @__PURE__ */ R("path", {
1487
+ d: "M 1.5 4.5 L 3.5 3 L 3.5 10 M 2 10 L 5 10",
1488
+ fill: "none",
1489
+ stroke: "black",
1490
+ strokeWidth: "1.6",
1491
+ strokeLinecap: "round",
1492
+ strokeLinejoin: "round"
1493
+ }),
1494
+ /* @__PURE__ */ R("path", {
1495
+ d: "M 1.5 14 C 1.5 12.8 4.5 12.8 4.5 14.5 C 4.5 16 1.5 16.5 1.5 18 L 5 18",
1496
+ fill: "none",
1497
+ stroke: "black",
1498
+ strokeWidth: "1.6",
1499
+ strokeLinecap: "round",
1500
+ strokeLinejoin: "round"
1501
+ })
1502
+ ]
1503
+ })
1504
+ }), /* @__PURE__ */ R("span", {
1505
+ className: p,
1506
+ "data-i18n": "orderedList",
1507
+ children: "Numbered list"
1508
+ })]
1509
+ }),
1510
+ /* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
1511
+ /* @__PURE__ */ R("button", {
1512
+ type: "button",
1513
+ className: `${d} gap-1 pr-1.5`,
1514
+ onMouseDown: (e) => {
1515
+ e.preventDefault(), typeof t == "function" && t();
1516
+ },
1517
+ onClick: () => c(!s),
1518
+ "aria-label": "Paragraph",
1519
+ children: [
1520
+ /* @__PURE__ */ R("span", {
1521
+ className: f,
1522
+ children: /* @__PURE__ */ R("svg", {
1523
+ viewBox: "0 0 20 20",
1524
+ className: "block h-4 w-4",
1525
+ children: [
1526
+ /* @__PURE__ */ R("rect", {
1527
+ x: "1",
1528
+ y: "4",
1529
+ width: "18",
1530
+ height: "2",
1531
+ rx: "1",
1532
+ fill: "black"
1533
+ }),
1534
+ /* @__PURE__ */ R("rect", {
1535
+ x: "1",
1536
+ y: "9",
1537
+ width: "18",
1538
+ height: "2",
1539
+ rx: "1",
1540
+ fill: "black"
1541
+ }),
1542
+ /* @__PURE__ */ R("rect", {
1543
+ x: "1",
1544
+ y: "14",
1545
+ width: "12",
1546
+ height: "2",
1547
+ rx: "1",
1548
+ fill: "black"
1549
+ })
1550
+ ]
1551
+ })
1552
+ }),
1553
+ /* @__PURE__ */ R("svg", {
1554
+ className: `h-2.5 w-2.5 fill-current text-gray-700 transition-transform ${s ? "rotate-180" : ""}`,
1555
+ viewBox: "0 0 20 20",
1556
+ children: /* @__PURE__ */ R("path", { d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" })
1557
+ }),
1558
+ /* @__PURE__ */ R("span", {
1559
+ className: p,
1560
+ "data-i18n": "paragraph",
1561
+ children: "Paragraph options"
1562
+ })
1563
+ ]
1564
+ })
1565
+ ]
1566
+ }),
1567
+ s && /* @__PURE__ */ R("div", {
1568
+ className: "forge-toolbar-dropdown absolute left-0 top-full mt-1 z-20 min-w-[130px] rounded-md border border-[#ccc] bg-white p-1 shadow-lg rtl:left-auto rtl:right-0 block",
1569
+ role: "list",
1570
+ "aria-label": "Paragraph options",
1571
+ children: [/* @__PURE__ */ R("div", {
1572
+ className: "forge-toolbar-group forge-toolbar-align mb-0.5 flex gap-0.5 border-b border-[#eee] pb-1",
1573
+ children: [
1574
+ /* @__PURE__ */ R("button", {
1575
+ type: "button",
1576
+ className: m,
1577
+ onMouseDown: (e) => {
1578
+ u(e, i, "left"), c(!1);
1579
+ },
1580
+ "aria-label": "Align left",
1581
+ children: [/* @__PURE__ */ R("span", {
1582
+ className: f,
1583
+ children: /* @__PURE__ */ R("svg", {
1584
+ viewBox: "0 0 20 20",
1585
+ className: "block h-4 w-4",
1586
+ children: [
1587
+ /* @__PURE__ */ R("rect", {
1588
+ x: "1",
1589
+ y: "4",
1590
+ width: "18",
1591
+ height: "2",
1592
+ rx: "1",
1593
+ fill: "black"
1594
+ }),
1595
+ /* @__PURE__ */ R("rect", {
1596
+ x: "1",
1597
+ y: "9",
1598
+ width: "12",
1599
+ height: "2",
1600
+ rx: "1",
1601
+ fill: "black"
1602
+ }),
1603
+ /* @__PURE__ */ R("rect", {
1604
+ x: "1",
1605
+ y: "14",
1606
+ width: "18",
1607
+ height: "2",
1608
+ rx: "1",
1609
+ fill: "black"
1610
+ })
1611
+ ]
1612
+ })
1613
+ }), /* @__PURE__ */ R("span", {
1614
+ className: p,
1615
+ "data-i18n": "alignLeft",
1616
+ children: "Align left"
1617
+ })]
1618
+ }),
1619
+ /* @__PURE__ */ R("button", {
1620
+ type: "button",
1621
+ className: m,
1622
+ onMouseDown: (e) => {
1623
+ u(e, i, "center"), c(!1);
1624
+ },
1625
+ "aria-label": "Align center",
1626
+ children: [/* @__PURE__ */ R("span", {
1627
+ className: f,
1628
+ children: /* @__PURE__ */ R("svg", {
1629
+ viewBox: "0 0 20 20",
1630
+ className: "block h-4 w-4",
1631
+ children: [
1632
+ /* @__PURE__ */ R("rect", {
1633
+ x: "1",
1634
+ y: "4",
1635
+ width: "18",
1636
+ height: "2",
1637
+ rx: "1",
1638
+ fill: "black"
1639
+ }),
1640
+ /* @__PURE__ */ R("rect", {
1641
+ x: "4",
1642
+ y: "9",
1643
+ width: "12",
1644
+ height: "2",
1645
+ rx: "1",
1646
+ fill: "black"
1647
+ }),
1648
+ /* @__PURE__ */ R("rect", {
1649
+ x: "1",
1650
+ y: "14",
1651
+ width: "18",
1652
+ height: "2",
1653
+ rx: "1",
1654
+ fill: "black"
1655
+ })
1656
+ ]
1657
+ })
1658
+ }), /* @__PURE__ */ R("span", {
1659
+ className: p,
1660
+ "data-i18n": "alignCenter",
1661
+ children: "Align center"
1662
+ })]
1663
+ }),
1664
+ /* @__PURE__ */ R("button", {
1665
+ type: "button",
1666
+ className: m,
1667
+ onMouseDown: (e) => {
1668
+ u(e, i, "right"), c(!1);
1669
+ },
1670
+ "aria-label": "Align right",
1671
+ children: [/* @__PURE__ */ R("span", {
1672
+ className: f,
1673
+ children: /* @__PURE__ */ R("svg", {
1674
+ viewBox: "0 0 20 20",
1675
+ className: "block h-4 w-4",
1676
+ children: [
1677
+ /* @__PURE__ */ R("rect", {
1678
+ x: "1",
1679
+ y: "4",
1680
+ width: "18",
1681
+ height: "2",
1682
+ rx: "1",
1683
+ fill: "black"
1684
+ }),
1685
+ /* @__PURE__ */ R("rect", {
1686
+ x: "7",
1687
+ y: "9",
1688
+ width: "12",
1689
+ height: "2",
1690
+ rx: "1",
1691
+ fill: "black"
1692
+ }),
1693
+ /* @__PURE__ */ R("rect", {
1694
+ x: "1",
1695
+ y: "14",
1696
+ width: "18",
1697
+ height: "2",
1698
+ rx: "1",
1699
+ fill: "black"
1700
+ })
1701
+ ]
1702
+ })
1703
+ }), /* @__PURE__ */ R("span", {
1704
+ className: p,
1705
+ "data-i18n": "alignRight",
1706
+ children: "Align right"
1707
+ })]
1708
+ }),
1709
+ /* @__PURE__ */ R("button", {
1710
+ type: "button",
1711
+ className: m,
1712
+ onMouseDown: (e) => {
1713
+ u(e, i, "justify"), c(!1);
1714
+ },
1715
+ "aria-label": "Justify",
1716
+ children: [/* @__PURE__ */ R("span", {
1717
+ className: f,
1718
+ children: /* @__PURE__ */ R("svg", {
1719
+ viewBox: "0 0 20 20",
1720
+ className: "block h-4 w-4",
1721
+ children: [
1722
+ /* @__PURE__ */ R("rect", {
1723
+ x: "1",
1724
+ y: "4",
1725
+ width: "18",
1726
+ height: "2",
1727
+ rx: "1",
1728
+ fill: "black"
1729
+ }),
1730
+ /* @__PURE__ */ R("rect", {
1731
+ x: "1",
1732
+ y: "9",
1733
+ width: "18",
1734
+ height: "2",
1735
+ rx: "1",
1736
+ fill: "black"
1737
+ }),
1738
+ /* @__PURE__ */ R("rect", {
1739
+ x: "1",
1740
+ y: "14",
1741
+ width: "18",
1742
+ height: "2",
1743
+ rx: "1",
1744
+ fill: "black"
1745
+ })
1746
+ ]
1747
+ })
1748
+ }), /* @__PURE__ */ R("span", {
1749
+ className: p,
1750
+ "data-i18n": "justify",
1751
+ children: "Justify"
1752
+ })]
1753
+ })
1754
+ ]
1755
+ }), /* @__PURE__ */ R("div", {
1756
+ className: "forge-toolbar-group forge-toolbar-list flex gap-0.5 py-0.5",
1757
+ children: [/* @__PURE__ */ R("button", {
1758
+ type: "button",
1759
+ className: m,
1760
+ onMouseDown: (e) => {
1761
+ u(e, a), c(!1);
1762
+ },
1763
+ "aria-label": "Outdent",
1764
+ children: [/* @__PURE__ */ R("span", {
1765
+ className: f,
1766
+ children: /* @__PURE__ */ R("svg", {
1767
+ viewBox: "0 0 20 20",
1768
+ className: "block h-4 w-4",
1769
+ fill: "none",
1770
+ stroke: "black",
1771
+ strokeWidth: "2",
1772
+ strokeLinecap: "round",
1773
+ strokeLinejoin: "round",
1774
+ children: [
1775
+ /* @__PURE__ */ R("line", {
1776
+ x1: "9",
1777
+ y1: "4",
1778
+ x2: "19",
1779
+ y2: "4"
1780
+ }),
1781
+ /* @__PURE__ */ R("line", {
1782
+ x1: "9",
1783
+ y1: "10",
1784
+ x2: "19",
1785
+ y2: "10"
1786
+ }),
1787
+ /* @__PURE__ */ R("line", {
1788
+ x1: "9",
1789
+ y1: "16",
1790
+ x2: "19",
1791
+ y2: "16"
1792
+ }),
1793
+ /* @__PURE__ */ R("polyline", { points: "6,8 2,12 6,16" })
1794
+ ]
1795
+ })
1796
+ }), /* @__PURE__ */ R("span", {
1797
+ className: p,
1798
+ "data-i18n": "outdent",
1799
+ children: "Outdent"
1800
+ })]
1801
+ }), /* @__PURE__ */ R("button", {
1802
+ type: "button",
1803
+ className: m,
1804
+ onMouseDown: (e) => {
1805
+ u(e, o), c(!1);
1806
+ },
1807
+ "aria-label": "Indent",
1808
+ children: [/* @__PURE__ */ R("span", {
1809
+ className: f,
1810
+ children: /* @__PURE__ */ R("svg", {
1811
+ viewBox: "0 0 20 20",
1812
+ className: "block h-4 w-4",
1813
+ fill: "none",
1814
+ stroke: "black",
1815
+ strokeWidth: "2",
1816
+ strokeLinecap: "round",
1817
+ strokeLinejoin: "round",
1818
+ children: [
1819
+ /* @__PURE__ */ R("line", {
1820
+ x1: "9",
1821
+ y1: "4",
1822
+ x2: "19",
1823
+ y2: "4"
1824
+ }),
1825
+ /* @__PURE__ */ R("line", {
1826
+ x1: "9",
1827
+ y1: "10",
1828
+ x2: "19",
1829
+ y2: "10"
1830
+ }),
1831
+ /* @__PURE__ */ R("line", {
1832
+ x1: "9",
1833
+ y1: "16",
1834
+ x2: "19",
1835
+ y2: "16"
1836
+ }),
1837
+ /* @__PURE__ */ R("polyline", { points: "2,8 6,12 2,16" })
1838
+ ]
1839
+ })
1840
+ }), /* @__PURE__ */ R("span", {
1841
+ className: p,
1842
+ "data-i18n": "indent",
1843
+ children: "Indent"
1844
+ })]
1845
+ })]
1846
+ })]
1847
+ })
1848
+ ]
1849
+ });
1850
+ }
1851
+ //#endregion
1852
+ //#region src/components/shared/toolbar/Paragraph/Hooks/paragraphLogic.jsx
1853
+ function dt() {
1854
+ let e = window.getSelection();
1855
+ return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
1856
+ }
1857
+ function ft(e) {
1858
+ if (!e) return;
1859
+ let t = window.getSelection();
1860
+ t && (t.removeAllRanges(), t.addRange(e));
1861
+ }
1862
+ function pt(e) {
1863
+ if (!e) return;
1864
+ let t = document.createRange();
1865
+ t.selectNodeContents(e), t.collapse(!1);
1866
+ let n = window.getSelection();
1867
+ n && (n.removeAllRanges(), n.addRange(t));
1868
+ }
1869
+ function mt(e) {
1870
+ if (!e || e.nodeType !== 1) return !1;
1871
+ let t = e.tagName.toLowerCase();
1872
+ return [
1873
+ "p",
1874
+ "div",
1875
+ "h1",
1876
+ "h2",
1877
+ "h3",
1878
+ "h4",
1879
+ "h5",
1880
+ "h6",
1881
+ "li",
1882
+ "blockquote",
1883
+ "pre"
1884
+ ].includes(t);
1885
+ }
1886
+ function ht(e) {
1887
+ if (!e) return null;
1888
+ let t = e.nodeType === 3 ? e.parentNode : e;
1889
+ for (; t && t !== document.body && !mt(t);) t = t.parentNode;
1890
+ return t && mt(t) ? t : null;
1891
+ }
1892
+ function gt(e) {
1893
+ if (!e) return null;
1894
+ let t = e.nodeType === 3 ? e.parentNode : e;
1895
+ for (; t && t !== document.body && t.tagName !== "LI";) t = t.parentNode;
1896
+ return t && t.tagName === "LI" ? t : null;
1897
+ }
1898
+ function _t(e) {
1899
+ let t = document.createElement(e);
1900
+ return t.className = e === "ul" ? "list-disc pl-5 my-2" : "list-decimal pl-5 my-2", t;
1901
+ }
1902
+ function vt(e, t) {
1903
+ let n = _t(t), r = document.createElement("li");
1904
+ return r.innerHTML = e.innerHTML, n.appendChild(r), e.parentNode.replaceChild(n, e), r;
1905
+ }
1906
+ function yt(e) {
1907
+ let t = e.parentNode, n = document.createDocumentFragment(), r = Array.from(e.children), i = null;
1908
+ return r.forEach((e) => {
1909
+ let t = document.createElement("div");
1910
+ t.innerHTML = e.innerHTML, n.appendChild(t), i = t;
1911
+ }), t.replaceChild(n, e), i;
1912
+ }
1913
+ function bt(e, t) {
1914
+ let n = _t(t);
1915
+ return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n;
1916
+ }
1917
+ function xt() {
1918
+ let e = q(null), t = () => {
1919
+ e.current = dt();
1920
+ }, n = (t) => {
1921
+ ft(e.current);
1922
+ let n = window.getSelection();
1923
+ if (!n || !n.rangeCount) return;
1924
+ let r = n.anchorNode;
1925
+ if (!r) return;
1926
+ r.nodeType === 3 && (r = r.parentNode);
1927
+ let i = gt(r);
1928
+ if (i) {
1929
+ let n = i.parentNode;
1930
+ if (n && (n.tagName === "UL" || n.tagName === "OL")) {
1931
+ if (n.tagName.toLowerCase() === t) {
1932
+ let e = yt(n);
1933
+ e && pt(e);
1934
+ } else {
1935
+ let e = bt(n, t).lastElementChild;
1936
+ e && pt(e);
1937
+ }
1938
+ e.current = dt();
1939
+ return;
1940
+ }
1941
+ }
1942
+ let a = ht(r);
1943
+ if (a) {
1944
+ if (a.getAttribute && a.getAttribute("contenteditable") === "true") {
1945
+ let e = document.createElement("div");
1946
+ e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e), pt(vt(e, t));
1947
+ } else pt(vt(a, t));
1948
+ e.current = dt();
1949
+ }
1950
+ };
1951
+ return {
1952
+ saveSelectionRange: t,
1953
+ toggleUnorderedList: () => n("ul"),
1954
+ toggleOrderedList: () => n("ol"),
1955
+ setAlignment: (t) => {
1956
+ ft(e.current);
1957
+ let n = window.getSelection();
1958
+ if (!n || !n.rangeCount) return;
1959
+ let r = n.anchorNode;
1960
+ if (!r) return;
1961
+ r.nodeType === 3 && (r = r.parentNode);
1962
+ let i = r.closest("p, div, h1, h2, h3, h4, h5, h6, li, blockquote, pre");
1963
+ i && (i.style.textAlign = t), e.current = dt();
1964
+ },
1965
+ indent: () => {
1966
+ ft(e.current);
1967
+ let t = window.getSelection();
1968
+ if (!t || !t.rangeCount) return;
1969
+ let n = t.anchorNode;
1970
+ if (!n) return;
1971
+ n.nodeType === 3 && (n = n.parentNode);
1972
+ let r = gt(n);
1973
+ if (r) {
1974
+ let e = r.parentNode;
1975
+ if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
1976
+ let t = r.previousElementSibling;
1977
+ if (!t || t.tagName !== "LI") return;
1978
+ let n = t.querySelector(":scope > ul, :scope > ol");
1979
+ n || (n = _t(e.tagName.toLowerCase()), t.appendChild(n)), n.appendChild(r), pt(r);
1980
+ } else {
1981
+ let e = ht(n);
1982
+ if (!e) return;
1983
+ let t = parseInt(e.style.marginLeft) || 0;
1984
+ e.style.marginLeft = t + 20 + "px";
1985
+ }
1986
+ e.current = dt();
1987
+ },
1988
+ outdent: () => {
1989
+ ft(e.current);
1990
+ let t = window.getSelection();
1991
+ if (!t || !t.rangeCount) return;
1992
+ let n = t.anchorNode;
1993
+ if (!n) return;
1994
+ n.nodeType === 3 && (n = n.parentNode);
1995
+ let r = gt(n);
1996
+ if (r) {
1997
+ let e = r.parentNode;
1998
+ if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
1999
+ let t = e.parentNode;
2000
+ if (t && t.tagName === "LI") t.parentNode.insertBefore(r, t.nextSibling), e.children.length === 0 && e.remove(), pt(r);
2001
+ else {
2002
+ let t = document.createElement("div");
2003
+ t.innerHTML = r.innerHTML;
2004
+ let n = e.parentNode;
2005
+ e.children.length === 1 ? n.replaceChild(t, e) : (n.insertBefore(t, e.nextSibling), e.removeChild(r)), pt(t);
2006
+ }
2007
+ } else {
2008
+ let e = ht(n);
2009
+ if (!e) return;
2010
+ let t = parseInt(e.style.marginLeft) || 0;
2011
+ e.style.marginLeft = Math.max(0, t - 20) + "px";
2012
+ }
2013
+ e.current = dt();
2014
+ }
2015
+ };
2016
+ }
2017
+ //#endregion
2018
+ //#region src/components/shared/toolbar/Paragraph/Components/index.jsx
2019
+ function St() {
2020
+ return /* @__PURE__ */ R(ut, { logic: xt() });
2021
+ }
2022
+ //#endregion
2023
+ //#region src/components/shared/toolbar/Table/Components/TableToolbar.jsx
2024
+ var Ct = 10;
2025
+ function wt({ logic: e }) {
2026
+ let { insertTable: t } = e, [n, r] = G(1), [i, a] = G(1), [o, s] = G(!1), c = q(null), l = q(null), u = q(null);
2027
+ K(() => {
2028
+ if (!o) return;
2029
+ function e(e) {
2030
+ l.current && !l.current.contains(e.target) && c.current && !c.current.contains(e.target) && s(!1);
2031
+ }
2032
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2033
+ }, [o]);
2034
+ let d = (e) => {
2035
+ if (!u.current) return;
2036
+ let t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, o = t.width / Ct, s = Math.min(Math.floor(n / o) + 1, Ct), c = Math.min(Math.floor(i / o) + 1, Ct);
2037
+ a(s), r(c);
2038
+ }, f = () => {
2039
+ r(1), a(1);
2040
+ }, p = () => {
2041
+ t(n, i), s(!1), r(1), a(1);
2042
+ }, m = i / Ct * 100, h = n / Ct * 100;
2043
+ return /* @__PURE__ */ R("div", {
2044
+ className: "forge-toolbar-group forge-toolbar-table relative flex items-center gap-0.5",
2045
+ children: [/* @__PURE__ */ R("button", {
2046
+ ref: c,
2047
+ type: "button",
2048
+ className: "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px",
2049
+ "aria-label": "Table",
2050
+ onClick: () => s(!o),
2051
+ children: [/* @__PURE__ */ R("span", {
2052
+ className: "forge-toolbar-icon",
2053
+ children: "▦"
2054
+ }), /* @__PURE__ */ R("span", {
2055
+ className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
2056
+ "data-i18n": "table",
2057
+ children: "Table"
2058
+ })]
2059
+ }), /* @__PURE__ */ R("div", {
2060
+ ref: l,
2061
+ className: `forge-toolbar-dropdown forge-dropdown-table absolute left-0 top-full z-10 mt-1 min-w-[160px] rounded-[3px] border border-[#ccc] bg-white p-2 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0 ${o ? "block" : "hidden"}`,
2062
+ role: "list",
2063
+ "aria-label": "Insert table",
2064
+ children: [/* @__PURE__ */ R("div", {
2065
+ ref: u,
2066
+ className: "note-dimension-picker relative mx-auto h-40 w-40 cursor-pointer overflow-hidden rounded-[3px] border border-[#ccc] bg-[#f5f5f5]",
2067
+ onMouseMove: d,
2068
+ onMouseLeave: f,
2069
+ onClick: p,
2070
+ children: [
2071
+ /* @__PURE__ */ R("div", { className: "absolute inset-0 z-[5]" }),
2072
+ /* @__PURE__ */ R("div", {
2073
+ className: "pointer-events-none absolute left-0 top-0 z-[3] border-2 border-[#4a90d9] bg-[rgba(74,144,217,0.4)] transition-[width,height] duration-75 ease-in-out",
2074
+ style: {
2075
+ width: m + "%",
2076
+ height: h + "%"
2077
+ }
2078
+ }),
2079
+ /* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[2] bg-white/30" }),
2080
+ /* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[1] bg-[linear-gradient(rgba(0,0,0,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(0,0,0,0.05)_1px,transparent_1px)] bg-[size:16px_16px]" })
2081
+ ]
2082
+ }), /* @__PURE__ */ R("div", {
2083
+ className: "note-dimension-display px-0 pt-1.5 pb-0.5 text-center text-[13px] font-semibold text-[#333]",
2084
+ children: [
2085
+ n,
2086
+ " x ",
2087
+ i
2088
+ ]
2089
+ })]
2090
+ })]
2091
+ });
2092
+ }
2093
+ //#endregion
2094
+ //#region src/components/shared/toolbar/Table/Hooks/tableLogic.jsx
2095
+ function Tt() {
2096
+ let e = document.querySelector(".forge-editor__content");
2097
+ if (e) {
2098
+ e.focus();
2099
+ let t = document.createRange(), n = window.getSelection();
2100
+ if (n) {
2101
+ let r = e.lastChild;
2102
+ r ? (t.setStartAfter(r), t.collapse(!0)) : (t.selectNodeContents(e), t.collapse(!1)), n.removeAllRanges(), n.addRange(t);
2103
+ }
2104
+ }
2105
+ }
2106
+ function Et(e) {
2107
+ let t = window.getSelection();
2108
+ if (!t || !t.rangeCount) {
2109
+ Tt(), setTimeout(() => Et(e), 50);
2110
+ return;
2111
+ }
2112
+ let n = t.getRangeAt(0);
2113
+ n.deleteContents();
2114
+ let r = n.createContextualFragment(e), i = r.lastChild;
2115
+ n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
2116
+ }
2117
+ function Dt() {
2118
+ return { insertTable: (e, t) => {
2119
+ let n = (100 / t).toFixed(2) + "%", r = "<table style=\"width:100%;table-layout:fixed;border-collapse:collapse;border:1px solid #ddd;\">";
2120
+ for (let i = 0; i < e; i++) {
2121
+ r += "<tr>";
2122
+ for (let e = 0; e < t; e++) r += `<td style="border:1px solid #ddd;padding:8px;width:${n};text-align:center;vertical-align:middle;overflow:hidden;word-break:break-word;"><br></td>`;
2123
+ r += "</tr>";
2124
+ }
2125
+ r += "</table><br>", Tt(), Et(r);
2126
+ } };
2127
+ }
2128
+ //#endregion
2129
+ //#region src/components/shared/toolbar/Table/Components/index.jsx
2130
+ function Ot() {
2131
+ return /* @__PURE__ */ R(wt, { logic: Dt() });
2132
+ }
2133
+ //#endregion
2134
+ //#region src/components/shared/toolbar/Insert/Components/InsertToolbar.jsx
2135
+ function kt({ logic: e }) {
2136
+ let { insertLink: t, insertImage: n, insertVideo: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center gap-0.5 rounded-[2px] border border-[#ccc] bg-white px-[7px] py-1 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "forge-toolbar-icon inline-block min-w-4 text-center text-sm font-medium leading-none", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
2137
+ return /* @__PURE__ */ R("div", {
2138
+ className: "forge-toolbar-group forge-toolbar-insert flex items-center gap-0.5",
2139
+ children: [
2140
+ /* @__PURE__ */ R("button", {
2141
+ type: "button",
2142
+ className: i,
2143
+ onClick: t,
2144
+ "aria-label": "Link",
2145
+ children: [/* @__PURE__ */ R("span", {
2146
+ className: a,
2147
+ children: "🔗"
2148
+ }), /* @__PURE__ */ R("span", {
2149
+ className: o,
2150
+ "data-i18n": "link",
2151
+ children: "Link"
2152
+ })]
2153
+ }),
2154
+ /* @__PURE__ */ R("button", {
2155
+ type: "button",
2156
+ className: i,
2157
+ onClick: n,
2158
+ "aria-label": "Image",
2159
+ children: [/* @__PURE__ */ R("span", {
2160
+ className: a,
2161
+ children: "🖼"
2162
+ }), /* @__PURE__ */ R("span", {
2163
+ className: o,
2164
+ "data-i18n": "image",
2165
+ children: "Image"
2166
+ })]
2167
+ }),
2168
+ /* @__PURE__ */ R("button", {
2169
+ type: "button",
2170
+ className: i,
2171
+ onClick: r,
2172
+ "aria-label": "Video",
2173
+ children: [/* @__PURE__ */ R("span", {
2174
+ className: a,
2175
+ children: "▶"
2176
+ }), /* @__PURE__ */ R("span", {
2177
+ className: o,
2178
+ "data-i18n": "video",
2179
+ children: "Video"
2180
+ })]
2181
+ })
2182
+ ]
2183
+ });
2184
+ }
2185
+ //#endregion
2186
+ //#region src/components/shared/Hooks/sweetAlert.jsx
2187
+ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2188
+ (function(n, r) {
2189
+ typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.Sweetalert2 = r());
2190
+ })(e, (function() {
2191
+ function e(e, t, n) {
2192
+ if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
2193
+ throw TypeError("Private element is not present on this object");
2194
+ }
2195
+ function t(e, t) {
2196
+ if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
2197
+ }
2198
+ function n(t, n) {
2199
+ return t.get(e(t, n));
2200
+ }
2201
+ function r(e, n, r) {
2202
+ t(e, n), n.set(e, r);
2203
+ }
2204
+ function i(t, n, r) {
2205
+ return t.set(e(t, n), r), r;
2206
+ }
2207
+ let a = {}, o = () => {
2208
+ a.previousActiveElement instanceof HTMLElement ? (a.previousActiveElement.focus(), a.previousActiveElement = null) : document.body && document.body.focus();
2209
+ }, s = (e) => new Promise((t) => {
2210
+ if (!e) return t();
2211
+ let n = window.scrollX, r = window.scrollY;
2212
+ a.restoreFocusTimeout = setTimeout(() => {
2213
+ o(), t();
2214
+ }, 100), window.scrollTo(n, r);
2215
+ }), c = "swal2-", l = (/* @__PURE__ */ "container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging".split(".")).reduce((e, t) => (e[t] = c + t, e), {}), u = [
2216
+ "success",
2217
+ "warning",
2218
+ "info",
2219
+ "question",
2220
+ "error"
2221
+ ].reduce((e, t) => (e[t] = c + t, e), {}), d = "SweetAlert2:", f = (e) => e.charAt(0).toUpperCase() + e.slice(1), p = (e) => {
2222
+ console.warn(`${d} ${typeof e == "object" ? e.join(" ") : e}`);
2223
+ }, m = (e) => {
2224
+ console.error(`${d} ${e}`);
2225
+ }, h = [], g = (e) => {
2226
+ h.includes(e) || (h.push(e), p(e));
2227
+ }, _ = (e, t = null) => {
2228
+ g(`"${e}" is deprecated and will be removed in the next major release.${t ? ` Use "${t}" instead.` : ""}`);
2229
+ }, v = (e) => typeof e == "function" ? e() : e, y = (e) => e && typeof e.toPromise == "function", b = (e) => y(e) ? e.toPromise() : Promise.resolve(e), x = (e) => e && Promise.resolve(e) === e, S = () => navigator.userAgent.includes("Firefox"), C = () => document.body.querySelector(`.${l.container}`), w = (e) => {
2230
+ let t = C();
2231
+ return t ? t.querySelector(e) : null;
2232
+ }, T = (e) => w(`.${e}`), E = () => T(l.popup), D = () => T(l.icon), O = () => T(l["icon-content"]), ee = () => T(l.title), te = () => T(l["html-container"]), k = () => T(l.image), ne = () => T(l["progress-steps"]), re = () => T(l["validation-message"]), A = () => w(`.${l.actions} .${l.confirm}`), ie = () => w(`.${l.actions} .${l.cancel}`), j = () => w(`.${l.actions} .${l.deny}`), ae = () => T(l["input-label"]), M = () => w(`.${l.loader}`), oe = () => T(l.actions), se = () => T(l.footer), ce = () => T(l["timer-progress-bar"]), le = () => T(l.close), ue = () => {
2233
+ let e = E();
2234
+ if (!e) return [];
2235
+ let t = e.querySelectorAll("[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])"), n = Array.from(t).sort((e, t) => {
2236
+ let n = parseInt(e.getAttribute("tabindex") || "0"), r = parseInt(t.getAttribute("tabindex") || "0");
2237
+ return n > r ? 1 : n < r ? -1 : 0;
2238
+ }), r = e.querySelectorAll("\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"), i = Array.from(r).filter((e) => e.getAttribute("tabindex") !== "-1");
2239
+ return [...new Set(n.concat(i))].filter((e) => H(e));
2240
+ }, de = () => P(document.body, l.shown) && !P(document.body, l["toast-shown"]) && !P(document.body, l["no-backdrop"]), fe = () => {
2241
+ let e = E();
2242
+ return e ? P(e, l.toast) : !1;
2243
+ }, pe = () => {
2244
+ let e = E();
2245
+ return e ? e.hasAttribute("data-loading") : !1;
2246
+ }, N = (e, t) => {
2247
+ if (e.textContent = "", t) {
2248
+ let n = new DOMParser().parseFromString(t, "text/html"), r = n.querySelector("head");
2249
+ r && Array.from(r.childNodes).forEach((t) => {
2250
+ e.appendChild(t);
2251
+ });
2252
+ let i = n.querySelector("body");
2253
+ i && Array.from(i.childNodes).forEach((t) => {
2254
+ t instanceof HTMLVideoElement || t instanceof HTMLAudioElement ? e.appendChild(t.cloneNode(!0)) : e.appendChild(t);
2255
+ });
2256
+ }
2257
+ }, P = (e, t) => t ? t.split(/\s+/).every((t) => e.classList.contains(t)) : !1, me = (e, t) => {
2258
+ Array.from(e.classList).forEach((n) => {
2259
+ !Object.values(l).includes(n) && !Object.values(u).includes(n) && !Object.values(t.showClass || {}).includes(n) && e.classList.remove(n);
2260
+ });
2261
+ }, F = (e, t, n) => {
2262
+ if (me(e, t), !t.customClass) return;
2263
+ let r = t.customClass[n];
2264
+ if (r) {
2265
+ if (typeof r != "string" && !r.forEach) {
2266
+ p(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`);
2267
+ return;
2268
+ }
2269
+ I(e, r);
2270
+ }
2271
+ }, he = (e, t) => {
2272
+ if (!t) return null;
2273
+ switch (t) {
2274
+ case "select":
2275
+ case "textarea":
2276
+ case "file": return e.querySelector(`.${l.popup} > .${l[t]}`);
2277
+ case "checkbox": return e.querySelector(`.${l.popup} > .${l.checkbox} input`);
2278
+ case "radio": return e.querySelector(`.${l.popup} > .${l.radio} input:checked`) || e.querySelector(`.${l.popup} > .${l.radio} input:first-child`);
2279
+ case "range": return e.querySelector(`.${l.popup} > .${l.range} input`);
2280
+ default: return e.querySelector(`.${l.popup} > .${l.input}`);
2281
+ }
2282
+ }, ge = (e) => {
2283
+ if (e.focus(), e.type !== "file") {
2284
+ let t = e.value;
2285
+ e.value = "", e.value = t;
2286
+ }
2287
+ }, _e = (e, t, n) => {
2288
+ if (!e || !t) return;
2289
+ let r = typeof t == "string" ? t.split(/\s+/).filter(Boolean) : t;
2290
+ (Array.isArray(e) ? e : [e]).forEach((e) => {
2291
+ r.forEach((t) => {
2292
+ n ? e.classList.add(t) : e.classList.remove(t);
2293
+ });
2294
+ });
2295
+ }, I = (e, t) => {
2296
+ _e(e, t, !0);
2297
+ }, L = (e, t) => {
2298
+ _e(e, t, !1);
2299
+ }, R = (e, t) => Array.from(e.children).find((e) => e instanceof HTMLElement && P(e, t)), ve = (e, t, n) => {
2300
+ n === `${parseInt(`${n}`)}` && (n = parseInt(n)), n || n === 0 ? e.style.setProperty(t, typeof n == "number" ? `${n}px` : n) : e.style.removeProperty(t);
2301
+ }, z = (e, t = "flex") => {
2302
+ e && (e.style.display = t);
2303
+ }, B = (e) => {
2304
+ e && (e.style.display = "none");
2305
+ }, ye = (e, t = "block") => {
2306
+ e && new MutationObserver(() => {
2307
+ be(e, e.innerHTML, t);
2308
+ }).observe(e, {
2309
+ childList: !0,
2310
+ subtree: !0
2311
+ });
2312
+ }, V = (e, t, n, r) => {
2313
+ let i = e.querySelector(t);
2314
+ i && i.style.setProperty(n, r);
2315
+ }, be = (e, t, n = "flex") => {
2316
+ t ? z(e, n) : B(e);
2317
+ }, H = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), xe = () => !H(A()) && !H(j()) && !H(ie()), Se = (e) => e.scrollHeight > e.clientHeight, U = (e, t) => {
2318
+ let n = e;
2319
+ for (; n && n !== t;) {
2320
+ if (Se(n)) return !0;
2321
+ n = n.parentElement;
2322
+ }
2323
+ return !1;
2324
+ }, Ce = (e) => {
2325
+ let t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), r = parseFloat(t.getPropertyValue("transition-duration") || "0");
2326
+ return n > 0 || r > 0;
2327
+ }, we = (e, t = !1) => {
2328
+ let n = ce();
2329
+ n && H(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
2330
+ n.style.transition = `width ${e / 1e3}s linear`, n.style.width = "0%";
2331
+ }, 10));
2332
+ }, Te = () => {
2333
+ let e = ce();
2334
+ if (!e) return;
2335
+ let t = parseInt(window.getComputedStyle(e).width);
2336
+ e.style.removeProperty("transition"), e.style.width = "100%";
2337
+ let n = t / parseInt(window.getComputedStyle(e).width) * 100;
2338
+ e.style.width = `${n}%`;
2339
+ }, Ee = () => typeof window > "u" || typeof document > "u", De = `
2340
+ <div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
2341
+ <button type="button" class="${l.close}"></button>
2342
+ <ul class="${l["progress-steps"]}"></ul>
2343
+ <div class="${l.icon}"></div>
2344
+ <img class="${l.image}" />
2345
+ <h2 class="${l.title}" id="${l.title}"></h2>
2346
+ <div class="${l["html-container"]}" id="${l["html-container"]}"></div>
2347
+ <input class="${l.input}" id="${l.input}" />
2348
+ <input type="file" class="${l.file}" />
2349
+ <div class="${l.range}">
2350
+ <input type="range" />
2351
+ <output></output>
2352
+ </div>
2353
+ <select class="${l.select}" id="${l.select}"></select>
2354
+ <div class="${l.radio}"></div>
2355
+ <label class="${l.checkbox}">
2356
+ <input type="checkbox" id="${l.checkbox}" />
2357
+ <span class="${l.label}"></span>
2358
+ </label>
2359
+ <textarea class="${l.textarea}" id="${l.textarea}"></textarea>
2360
+ <div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
2361
+ <div class="${l.actions}">
2362
+ <div class="${l.loader}"></div>
2363
+ <button type="button" class="${l.confirm}"></button>
2364
+ <button type="button" class="${l.deny}"></button>
2365
+ <button type="button" class="${l.cancel}"></button>
2366
+ </div>
2367
+ <div class="${l.footer}"></div>
2368
+ <div class="${l["timer-progress-bar-container"]}">
2369
+ <div class="${l["timer-progress-bar"]}"></div>
2370
+ </div>
2371
+ </div>
2372
+ `.replace(/(^|\n)\s*/g, ""), Oe = () => {
2373
+ let e = C();
2374
+ return e ? (e.remove(), L([document.documentElement, document.body], [
2375
+ l["no-backdrop"],
2376
+ l["toast-shown"],
2377
+ l["has-column"]
2378
+ ]), !0) : !1;
2379
+ }, W = () => {
2380
+ a.currentInstance && a.currentInstance.resetValidationMessage();
2381
+ }, G = () => {
2382
+ let e = E();
2383
+ if (!e) return;
2384
+ let t = R(e, l.input), n = R(e, l.file), r = e.querySelector(`.${l.range} input`), i = e.querySelector(`.${l.range} output`), a = R(e, l.select), o = e.querySelector(`.${l.checkbox} input`), s = R(e, l.textarea);
2385
+ t && (t.oninput = W), n && (n.onchange = W), a && (a.onchange = W), o && (o.onchange = W), s && (s.oninput = W), r && i && (r.oninput = () => {
2386
+ W(), i.value = r.value;
2387
+ }, r.onchange = () => {
2388
+ W(), i.value = r.value;
2389
+ });
2390
+ }, ke = (e) => {
2391
+ if (typeof e == "string") {
2392
+ let t = document.querySelector(e);
2393
+ if (!t) throw Error(`Target element "${e}" not found`);
2394
+ return t;
2395
+ }
2396
+ return e;
2397
+ }, K = (e) => {
2398
+ let t = E();
2399
+ t && (t.setAttribute("role", e.toast ? "alert" : "dialog"), t.setAttribute("aria-live", e.toast ? "polite" : "assertive"), e.toast || t.setAttribute("aria-modal", "true"));
2400
+ }, q = (e) => {
2401
+ window.getComputedStyle(e).direction === "rtl" && (I(C(), l.rtl), a.isRTL = !0);
2402
+ }, Ae = (e) => {
2403
+ let t = Oe();
2404
+ if (Ee()) {
2405
+ m("SweetAlert2 requires document to initialize");
2406
+ return;
2407
+ }
2408
+ let n = document.createElement("div");
2409
+ n.className = l.container, t && I(n, l["no-transition"]), N(n, De), n.dataset.swal2Theme = e.theme;
2410
+ let r = ke(e.target || "body");
2411
+ r.appendChild(n), e.topLayer && (n.setAttribute("popover", ""), n.showPopover()), K(e), q(r), G();
2412
+ }, je = (e, t) => {
2413
+ e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? Me(e, t) : e && N(t, e);
2414
+ }, Me = (e, t) => {
2415
+ "jquery" in e ? Ne(t, e) : N(t, e.toString());
2416
+ }, Ne = (e, t) => {
2417
+ if (e.textContent = "", 0 in t) for (let n = 0; n in t; n++) e.appendChild(t[n].cloneNode(!0));
2418
+ else e.appendChild(t.cloneNode(!0));
2419
+ }, Pe = (e, t) => {
2420
+ let n = oe(), r = M();
2421
+ !n || !r || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? B(n) : z(n), F(n, t, "actions"), Fe(n, r, t), N(r, t.loaderHtml || ""), F(r, t, "loader"));
2422
+ };
2423
+ function Fe(e, t, n) {
2424
+ let r = A(), i = j(), a = ie();
2425
+ !r || !i || !a || (Re(r, "confirm", n), Re(i, "deny", n), Re(a, "cancel", n), Ie(r, i, a, n), n.reverseButtons && (n.toast ? (e.insertBefore(a, r), e.insertBefore(i, r)) : (e.insertBefore(a, t), e.insertBefore(i, t), e.insertBefore(r, t))));
2426
+ }
2427
+ function Ie(e, t, n, r) {
2428
+ if (!r.buttonsStyling) {
2429
+ L([
2430
+ e,
2431
+ t,
2432
+ n
2433
+ ], l.styled);
2434
+ return;
2435
+ }
2436
+ I([
2437
+ e,
2438
+ t,
2439
+ n
2440
+ ], l.styled), [
2441
+ [
2442
+ e,
2443
+ "confirm",
2444
+ r.confirmButtonColor
2445
+ ],
2446
+ [
2447
+ t,
2448
+ "deny",
2449
+ r.denyButtonColor
2450
+ ],
2451
+ [
2452
+ n,
2453
+ "cancel",
2454
+ r.cancelButtonColor
2455
+ ]
2456
+ ].forEach(([e, t, n]) => {
2457
+ n && e.style.setProperty(`--swal2-${t}-button-background-color`, n), Le(e);
2458
+ });
2459
+ }
2460
+ function Le(e) {
2461
+ let t = window.getComputedStyle(e);
2462
+ if (t.getPropertyValue("--swal2-action-button-focus-box-shadow")) return;
2463
+ let n = t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/, "rgba($1, $2, $3, 0.5)");
2464
+ e.style.setProperty("--swal2-action-button-focus-box-shadow", t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/, ` ${n}`));
2465
+ }
2466
+ function Re(e, t, n) {
2467
+ let r = f(t);
2468
+ be(e, n[`show${r}Button`], "inline-block"), N(e, n[`${t}ButtonText`] || ""), e.setAttribute("aria-label", n[`${t}ButtonAriaLabel`] || ""), e.className = l[t], F(e, n, `${t}Button`);
2469
+ }
2470
+ let ze = (e, t) => {
2471
+ let n = le();
2472
+ n && (N(n, t.closeButtonHtml || ""), F(n, t, "closeButton"), be(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel || ""));
2473
+ }, Be = (e, t) => {
2474
+ let n = C();
2475
+ n && (Ve(n, t.backdrop), He(n, t.position), Ue(n, t.grow), F(n, t, "container"));
2476
+ };
2477
+ function Ve(e, t) {
2478
+ typeof t == "string" ? e.style.background = t : t || I([document.documentElement, document.body], l["no-backdrop"]);
2479
+ }
2480
+ function He(e, t) {
2481
+ t && (t in l ? I(e, l[t]) : (p("The \"position\" parameter is not valid, defaulting to \"center\""), I(e, l.center)));
2482
+ }
2483
+ function Ue(e, t) {
2484
+ t && I(e, l[`grow-${t}`]);
2485
+ }
2486
+ var J = {
2487
+ innerParams: /* @__PURE__ */ new WeakMap(),
2488
+ domCache: /* @__PURE__ */ new WeakMap(),
2489
+ focusedElement: /* @__PURE__ */ new WeakMap()
2490
+ };
2491
+ let We = [
2492
+ "input",
2493
+ "file",
2494
+ "range",
2495
+ "select",
2496
+ "radio",
2497
+ "checkbox",
2498
+ "textarea"
2499
+ ], Ge = (e, t) => {
2500
+ let n = E();
2501
+ if (!n) return;
2502
+ let r = J.innerParams.get(e), i = !r || t.input !== r.input;
2503
+ We.forEach((e) => {
2504
+ let r = R(n, l[e]);
2505
+ r && (Je(e, t.inputAttributes), r.className = l[e], i && B(r));
2506
+ }), t.input && (i && Ke(t), Ye(t));
2507
+ }, Ke = (e) => {
2508
+ if (!e.input) return;
2509
+ if (!Y[e.input]) {
2510
+ m(`Unexpected type of input! Expected ${Object.keys(Y).join(" | ")}, got "${e.input}"`);
2511
+ return;
2512
+ }
2513
+ let t = Qe(e.input);
2514
+ if (!t) return;
2515
+ let n = Y[e.input](t, e);
2516
+ z(t), e.inputAutoFocus && setTimeout(() => {
2517
+ ge(n);
2518
+ });
2519
+ }, qe = (e) => {
2520
+ for (let { name: t } of Array.from(e.attributes)) [
2521
+ "id",
2522
+ "type",
2523
+ "value",
2524
+ "style"
2525
+ ].includes(t) || e.removeAttribute(t);
2526
+ }, Je = (e, t) => {
2527
+ let n = E();
2528
+ if (!n) return;
2529
+ let r = he(n, e);
2530
+ if (r) {
2531
+ qe(r);
2532
+ for (let e in t) r.setAttribute(e, t[e]);
2533
+ }
2534
+ }, Ye = (e) => {
2535
+ if (!e.input) return;
2536
+ let t = Qe(e.input);
2537
+ t && F(t, e, "input");
2538
+ }, Xe = (e, t) => {
2539
+ !e.placeholder && t.inputPlaceholder && (e.placeholder = t.inputPlaceholder);
2540
+ }, Ze = (e, t, n) => {
2541
+ if (n.inputLabel) {
2542
+ let r = document.createElement("label"), i = l["input-label"];
2543
+ r.setAttribute("for", e.id), r.className = i, typeof n.customClass == "object" && I(r, n.customClass.inputLabel), r.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", r);
2544
+ }
2545
+ }, Qe = (e) => {
2546
+ let t = E();
2547
+ if (t) return R(t, l[e] || l.input);
2548
+ }, $e = (e, t) => {
2549
+ ["string", "number"].includes(typeof t) ? e.value = `${t}` : x(t) || p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`);
2550
+ }, Y = {};
2551
+ Y.text = Y.email = Y.password = Y.number = Y.tel = Y.url = Y.search = Y.date = Y["datetime-local"] = Y.time = Y.week = Y.month = (e, t) => {
2552
+ let n = e;
2553
+ return $e(n, t.inputValue), Ze(n, n, t), Xe(n, t), n.type = t.input, n;
2554
+ }, Y.file = (e, t) => {
2555
+ let n = e;
2556
+ return Ze(n, n, t), Xe(n, t), n;
2557
+ }, Y.range = (e, t) => {
2558
+ let n = e, r = n.querySelector("input"), i = n.querySelector("output");
2559
+ return r && ($e(r, t.inputValue), r.type = t.input, Ze(r, e, t)), i && $e(i, t.inputValue), e;
2560
+ }, Y.select = (e, t) => {
2561
+ let n = e;
2562
+ if (n.textContent = "", t.inputPlaceholder) {
2563
+ let e = document.createElement("option");
2564
+ N(e, t.inputPlaceholder), e.value = "", e.disabled = !0, e.selected = !0, n.appendChild(e);
2565
+ }
2566
+ return Ze(n, n, t), n;
2567
+ }, Y.radio = (e) => {
2568
+ let t = e;
2569
+ return t.textContent = "", e;
2570
+ }, Y.checkbox = (e, t) => {
2571
+ let n = E();
2572
+ if (!n) throw Error("Popup not found");
2573
+ let r = he(n, "checkbox");
2574
+ if (!r) throw Error("Checkbox input not found");
2575
+ r.value = "1", r.checked = !!t.inputValue;
2576
+ let i = e.querySelector("span");
2577
+ if (i) {
2578
+ let e = t.inputPlaceholder || t.inputLabel;
2579
+ e && N(i, e);
2580
+ }
2581
+ return r;
2582
+ }, Y.textarea = (e, t) => {
2583
+ let n = e;
2584
+ $e(n, t.inputValue), Xe(n, t), Ze(n, n, t);
2585
+ let r = (e) => parseInt(window.getComputedStyle(e).marginLeft) + parseInt(window.getComputedStyle(e).marginRight);
2586
+ return setTimeout(() => {
2587
+ if ("MutationObserver" in window) {
2588
+ let e = E();
2589
+ if (!e) return;
2590
+ let i = parseInt(window.getComputedStyle(e).width);
2591
+ new MutationObserver(() => {
2592
+ if (!document.body.contains(n)) return;
2593
+ let e = n.offsetWidth + r(n), a = E();
2594
+ a && (e > i ? a.style.width = `${e}px` : ve(a, "width", t.width));
2595
+ }).observe(n, {
2596
+ attributes: !0,
2597
+ attributeFilter: ["style"]
2598
+ });
2599
+ }
2600
+ }), n;
2601
+ };
2602
+ let et = (e, t) => {
2603
+ let n = te();
2604
+ n && (ye(n), F(n, t, "htmlContainer"), t.html ? (je(t.html, n), z(n, "block")) : t.text ? (n.textContent = t.text, z(n, "block")) : B(n), Ge(e, t));
2605
+ }, tt = (e, t) => {
2606
+ let n = se();
2607
+ n && (ye(n), be(n, !!t.footer, "block"), t.footer && je(t.footer, n), F(n, t, "footer"));
2608
+ }, nt = (e, t) => {
2609
+ let n = J.innerParams.get(e), r = D();
2610
+ if (r) {
2611
+ if (n && t.icon === n.icon) {
2612
+ ot(r, t), rt(r, t);
2613
+ return;
2614
+ }
2615
+ if (!t.icon && !t.iconHtml) {
2616
+ B(r);
2617
+ return;
2618
+ }
2619
+ if (t.icon && Object.keys(u).indexOf(t.icon) === -1) {
2620
+ m(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`), B(r);
2621
+ return;
2622
+ }
2623
+ z(r), ot(r, t), rt(r, t), I(r, t.showClass && t.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", it);
2624
+ }
2625
+ }, rt = (e, t) => {
2626
+ for (let [n, r] of Object.entries(u)) t.icon !== n && L(e, r);
2627
+ I(e, t.icon && u[t.icon]), st(e, t), it(), F(e, t, "icon");
2628
+ }, it = () => {
2629
+ let e = E();
2630
+ if (!e) return;
2631
+ let t = window.getComputedStyle(e).getPropertyValue("background-color");
2632
+ e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach((e) => {
2633
+ e.style.backgroundColor = t;
2634
+ });
2635
+ }, at = (e) => `
2636
+ ${e.animation ? "<div class=\"swal2-success-circular-line-left\"></div>" : ""}
2637
+ <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
2638
+ <div class="swal2-success-ring"></div>
2639
+ ${e.animation ? "<div class=\"swal2-success-fix\"></div>" : ""}
2640
+ ${e.animation ? "<div class=\"swal2-success-circular-line-right\"></div>" : ""}
2641
+ `, ot = (e, t) => {
2642
+ if (!t.icon && !t.iconHtml) return;
2643
+ let n = e.innerHTML, r = "";
2644
+ t.iconHtml ? r = ct(t.iconHtml) : t.icon === "success" ? (r = at(t), n = n.replace(/ style=".*?"/g, "")) : t.icon === "error" ? r = "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n" : t.icon && (r = ct({
2645
+ question: "?",
2646
+ warning: "!",
2647
+ info: "i"
2648
+ }[t.icon])), n.trim() !== r.trim() && N(e, r);
2649
+ }, st = (e, t) => {
2650
+ if (t.iconColor) {
2651
+ e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
2652
+ for (let n of [
2653
+ ".swal2-success-line-tip",
2654
+ ".swal2-success-line-long",
2655
+ ".swal2-x-mark-line-left",
2656
+ ".swal2-x-mark-line-right"
2657
+ ]) V(e, n, "background-color", t.iconColor);
2658
+ V(e, ".swal2-success-ring", "border-color", t.iconColor);
2659
+ }
2660
+ }, ct = (e) => `<div class="${l["icon-content"]}">${e}</div>`, lt = (e, t) => {
2661
+ let n = k();
2662
+ if (n) {
2663
+ if (!t.imageUrl) {
2664
+ B(n);
2665
+ return;
2666
+ }
2667
+ z(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), ve(n, "width", t.imageWidth), ve(n, "height", t.imageHeight), n.className = l.image, F(n, t, "image");
2668
+ }
2669
+ }, ut = !1, dt = 0, ft = 0, pt = 0, mt = 0, ht = (e) => {
2670
+ e.addEventListener("mousedown", _t), document.body.addEventListener("mousemove", vt), e.addEventListener("mouseup", yt), e.addEventListener("touchstart", _t), document.body.addEventListener("touchmove", vt), e.addEventListener("touchend", yt);
2671
+ }, gt = (e) => {
2672
+ e.removeEventListener("mousedown", _t), document.body.removeEventListener("mousemove", vt), e.removeEventListener("mouseup", yt), e.removeEventListener("touchstart", _t), document.body.removeEventListener("touchmove", vt), e.removeEventListener("touchend", yt);
2673
+ }, _t = (e) => {
2674
+ let t = E();
2675
+ if (!t) return;
2676
+ let n = D();
2677
+ if (e.target === t || n && n.contains(e.target)) {
2678
+ ut = !0;
2679
+ let n = bt(e);
2680
+ dt = n.clientX, ft = n.clientY, pt = parseInt(t.style.insetInlineStart) || 0, mt = parseInt(t.style.insetBlockStart) || 0, I(t, "swal2-dragging");
2681
+ }
2682
+ }, vt = (e) => {
2683
+ let t = E();
2684
+ if (t && ut) {
2685
+ let { clientX: n, clientY: r } = bt(e), i = n - dt;
2686
+ t.style.insetInlineStart = `${pt + (a.isRTL ? -i : i)}px`, t.style.insetBlockStart = `${mt + (r - ft)}px`;
2687
+ }
2688
+ }, yt = () => {
2689
+ let e = E();
2690
+ ut = !1, L(e, "swal2-dragging");
2691
+ }, bt = (e) => {
2692
+ let t = e.type.startsWith("touch") ? e.touches[0] : e;
2693
+ return {
2694
+ clientX: t.clientX,
2695
+ clientY: t.clientY
2696
+ };
2697
+ }, xt = (e, t) => {
2698
+ let n = C(), r = E();
2699
+ if (!(!n || !r)) {
2700
+ if (t.toast) {
2701
+ ve(n, "width", t.width), r.style.width = "100%";
2702
+ let e = M();
2703
+ e && r.insertBefore(e, D());
2704
+ } else ve(r, "width", t.width);
2705
+ ve(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), B(re()), St(r, t), t.draggable && !t.toast ? (I(r, l.draggable), ht(r)) : (L(r, l.draggable), gt(r));
2706
+ }
2707
+ }, St = (e, t) => {
2708
+ let n = t.showClass || {};
2709
+ e.className = `${l.popup} ${H(e) ? n.popup : ""}`, t.toast ? (I([document.documentElement, document.body], l["toast-shown"]), I(e, l.toast)) : I(e, l.modal), F(e, t, "popup"), typeof t.customClass == "string" && I(e, t.customClass), t.icon && I(e, l[`icon-${t.icon}`]);
2710
+ }, Ct = (e, t) => {
2711
+ let n = ne();
2712
+ if (!n) return;
2713
+ let { progressSteps: r, currentProgressStep: i } = t;
2714
+ if (!r || r.length === 0 || i === void 0) {
2715
+ B(n);
2716
+ return;
2717
+ }
2718
+ z(n), n.textContent = "", i >= r.length && p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), r.forEach((e, a) => {
2719
+ let o = wt(e);
2720
+ if (n.appendChild(o), a === i && I(o, l["active-progress-step"]), a !== r.length - 1) {
2721
+ let e = Tt(t);
2722
+ n.appendChild(e);
2723
+ }
2724
+ });
2725
+ }, wt = (e) => {
2726
+ let t = document.createElement("li");
2727
+ return I(t, l["progress-step"]), N(t, e), t;
2728
+ }, Tt = (e) => {
2729
+ let t = document.createElement("li");
2730
+ return I(t, l["progress-step-line"]), e.progressStepsDistance && ve(t, "width", e.progressStepsDistance), t;
2731
+ }, Et = (e, t) => {
2732
+ let n = ee();
2733
+ n && (ye(n), be(n, !!(t.title || t.titleText), "block"), t.title && je(t.title, n), t.titleText && (n.innerText = t.titleText), F(n, t, "title"));
2734
+ }, Dt = (e, t) => {
2735
+ var n;
2736
+ xt(e, t), Be(e, t), Ct(e, t), nt(e, t), lt(e, t), Et(e, t), ze(e, t), et(e, t), Pe(e, t), tt(e, t);
2737
+ let r = E();
2738
+ typeof t.didRender == "function" && r && t.didRender(r), (n = a.eventEmitter) == null || n.emit("didRender", r);
2739
+ }, Ot = () => H(E()), kt = () => A()?.click(), At = () => j()?.click(), jt = () => ie()?.click(), X = Object.freeze({
2740
+ cancel: "cancel",
2741
+ backdrop: "backdrop",
2742
+ close: "close",
2743
+ esc: "esc",
2744
+ timer: "timer"
2745
+ }), Mt = (e) => {
2746
+ if (e.keydownTarget && e.keydownHandlerAdded && e.keydownHandler) {
2747
+ let t = e.keydownHandler;
2748
+ e.keydownTarget.removeEventListener("keydown", t, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !1;
2749
+ }
2750
+ }, Nt = (e, t, n) => {
2751
+ if (Mt(e), !t.toast) {
2752
+ let r = (e) => Lt(t, e, n);
2753
+ e.keydownHandler = r;
2754
+ let i = t.keydownListenerCapture ? window : E();
2755
+ if (i) {
2756
+ e.keydownTarget = i, e.keydownListenerCapture = t.keydownListenerCapture;
2757
+ let n = r;
2758
+ e.keydownTarget.addEventListener("keydown", n, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !0;
2759
+ }
2760
+ }
2761
+ }, Pt = (e, t) => {
2762
+ var n;
2763
+ let r = ue();
2764
+ return r.length ? (e += t, e === -2 && (e = r.length - 1), e === r.length ? e = 0 : e === -1 && (e = r.length - 1), r[e].focus(), !(S() && r[e] instanceof HTMLIFrameElement)) : ((n = E()) == null || n.focus(), !0);
2765
+ }, Ft = ["ArrowRight", "ArrowDown"], It = ["ArrowLeft", "ArrowUp"], Lt = (e, t, n) => {
2766
+ e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Rt(t, e) : t.key === "Tab" ? zt(t) : [...Ft, ...It].includes(t.key) ? Bt(t.key) : t.key === "Escape" && Vt(t, e, n)));
2767
+ }, Rt = (e, t) => {
2768
+ if (!v(t.allowEnterKey)) return;
2769
+ let n = E();
2770
+ if (!n || !t.input) return;
2771
+ let r = he(n, t.input);
2772
+ if (e.target && r && e.target instanceof HTMLElement && e.target.outerHTML === r.outerHTML) {
2773
+ if (["textarea", "file"].includes(t.input)) return;
2774
+ kt(), e.preventDefault();
2775
+ }
2776
+ }, zt = (e) => {
2777
+ let t = e.target, n = ue().findIndex((e) => e === t), r = !0;
2778
+ r = e.shiftKey ? Pt(n, -1) : Pt(n, 1), e.stopPropagation(), r && e.preventDefault();
2779
+ }, Bt = (e) => {
2780
+ let t = oe(), n = A(), r = j(), i = ie();
2781
+ if (!t || !n || !r || !i) return;
2782
+ let a = [
2783
+ n,
2784
+ r,
2785
+ i
2786
+ ];
2787
+ if (document.activeElement instanceof HTMLElement && !a.includes(document.activeElement)) return;
2788
+ let o = Ft.includes(e) ? "nextElementSibling" : "previousElementSibling", s = document.activeElement;
2789
+ if (s) {
2790
+ for (let e = 0; e < t.children.length; e++) {
2791
+ if (s = s[o], !s) return;
2792
+ if (s instanceof HTMLButtonElement && H(s)) break;
2793
+ }
2794
+ s instanceof HTMLButtonElement && s.focus();
2795
+ }
2796
+ }, Vt = (e, t, n) => {
2797
+ e.preventDefault(), v(t.allowEscapeKey) && n(X.esc);
2798
+ };
2799
+ var Ht = {
2800
+ swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
2801
+ swalPromiseReject: /* @__PURE__ */ new WeakMap()
2802
+ };
2803
+ let Ut = () => {
2804
+ let e = C();
2805
+ Array.from(document.body.children).forEach((t) => {
2806
+ t.contains(e) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden") || ""), t.setAttribute("aria-hidden", "true"));
2807
+ });
2808
+ }, Wt = () => {
2809
+ Array.from(document.body.children).forEach((e) => {
2810
+ e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
2811
+ });
2812
+ }, Gt = typeof window < "u" && !!window.GestureEvent, Kt = Gt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, qt = () => {
2813
+ if (Gt && !P(document.body, l.iosfix)) {
2814
+ let e = document.body.scrollTop;
2815
+ document.body.style.top = `${e * -1}px`, I(document.body, l.iosfix), Jt();
2816
+ }
2817
+ }, Jt = () => {
2818
+ let e = C();
2819
+ if (!e) return;
2820
+ let t;
2821
+ e.ontouchstart = (e) => {
2822
+ t = Yt(e);
2823
+ }, e.ontouchmove = (e) => {
2824
+ t && (e.preventDefault(), e.stopPropagation());
2825
+ };
2826
+ }, Yt = (e) => {
2827
+ let t = e.target, n = C(), r = te();
2828
+ return !n || !r || Xt(e) || Zt(e) ? !1 : t === n || !Se(n) && t instanceof HTMLElement && !U(t, r) && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" && !(Se(r) && r.contains(t));
2829
+ }, Xt = (e) => !!(e.touches && e.touches.length && e.touches[0].touchType === "stylus"), Zt = (e) => e.touches && e.touches.length > 1, Qt = () => {
2830
+ if (P(document.body, l.iosfix)) {
2831
+ let e = parseInt(document.body.style.top, 10);
2832
+ L(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
2833
+ }
2834
+ }, $t = () => {
2835
+ let e = document.createElement("div");
2836
+ e.className = l["scrollbar-measure"], document.body.appendChild(e);
2837
+ let t = e.getBoundingClientRect().width - e.clientWidth;
2838
+ return document.body.removeChild(e), t;
2839
+ }, en = null, tn = (e) => {
2840
+ en === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && (en = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${en + $t()}px`);
2841
+ }, nn = () => {
2842
+ en !== null && (document.body.style.paddingRight = `${en}px`, en = null);
2843
+ };
2844
+ function rn(e, t, n, r) {
2845
+ fe() ? fn(e, r) : (s(n).then(() => fn(e, r)), Mt(a)), Gt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), de() && (nn(), Qt(), Wt()), an();
2846
+ }
2847
+ function an() {
2848
+ L([document.documentElement, document.body], [
2849
+ l.shown,
2850
+ l["height-auto"],
2851
+ l["no-backdrop"],
2852
+ l["toast-shown"]
2853
+ ]);
2854
+ }
2855
+ function Z(e) {
2856
+ e = ln(e);
2857
+ let t = Ht.swalPromiseResolve.get(this), n = on(this);
2858
+ this.isAwaitingPromise ? e.isDismissed || (cn(this), t(e)) : n && t(e);
2859
+ }
2860
+ let on = (e) => {
2861
+ let t = E();
2862
+ if (!t) return !1;
2863
+ let n = J.innerParams.get(e);
2864
+ if (!n || P(t, n.hideClass.popup)) return !1;
2865
+ L(t, n.showClass.popup), I(t, n.hideClass.popup);
2866
+ let r = C();
2867
+ return L(r, n.showClass.backdrop), I(r, n.hideClass.backdrop), un(e, t, n), !0;
2868
+ };
2869
+ function sn(e) {
2870
+ let t = Ht.swalPromiseReject.get(this);
2871
+ cn(this), t && t(e);
2872
+ }
2873
+ let cn = (e) => {
2874
+ e.isAwaitingPromise && (delete e.isAwaitingPromise, J.innerParams.get(e) || e._destroy());
2875
+ }, ln = (e) => e === void 0 ? {
2876
+ isConfirmed: !1,
2877
+ isDenied: !1,
2878
+ isDismissed: !0
2879
+ } : Object.assign({
2880
+ isConfirmed: !1,
2881
+ isDenied: !1,
2882
+ isDismissed: !1
2883
+ }, e), un = (e, t, n) => {
2884
+ var r;
2885
+ let i = C(), o = Ce(t);
2886
+ typeof n.willClose == "function" && n.willClose(t), (r = a.eventEmitter) == null || r.emit("willClose", t), o && i ? dn(e, t, i, !!n.returnFocus, n.didClose) : i && rn(e, i, !!n.returnFocus, n.didClose);
2887
+ }, dn = (e, t, n, r, i) => {
2888
+ a.swalCloseEventFinishedCallback = rn.bind(null, e, n, r, i);
2889
+ let o = function(e) {
2890
+ if (e.target === t) {
2891
+ var n;
2892
+ (n = a.swalCloseEventFinishedCallback) == null || n.call(a), delete a.swalCloseEventFinishedCallback, t.removeEventListener("animationend", o), t.removeEventListener("transitionend", o);
2893
+ }
2894
+ };
2895
+ t.addEventListener("animationend", o), t.addEventListener("transitionend", o);
2896
+ }, fn = (e, t) => {
2897
+ setTimeout(() => {
2898
+ var n;
2899
+ typeof t == "function" && t.bind(e.params)(), (n = a.eventEmitter) == null || n.emit("didClose"), e._destroy && e._destroy();
2900
+ });
2901
+ }, pn = (e) => {
2902
+ let t = E();
2903
+ if (t || new li(), t = E(), !t) return;
2904
+ let n = M();
2905
+ fe() ? B(D()) : mn(t, e), z(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus();
2906
+ }, mn = (e, t) => {
2907
+ let n = oe(), r = M();
2908
+ !n || !r || (!t && H(A()) && (t = A()), z(n), t && (B(t), r.setAttribute("data-button-to-replace", t.className), n.insertBefore(r, t)), I([e, n], l.loading));
2909
+ }, hn = (e, t) => {
2910
+ t.input === "select" || t.input === "radio" ? bn(e, t) : [
2911
+ "text",
2912
+ "email",
2913
+ "number",
2914
+ "tel",
2915
+ "textarea"
2916
+ ].some((e) => e === t.input) && (y(t.inputValue) || x(t.inputValue)) && (pn(A()), xn(e, t));
2917
+ }, gn = (e, t) => {
2918
+ let n = e.getInput();
2919
+ if (!n) return null;
2920
+ switch (t.input) {
2921
+ case "checkbox": return _n(n);
2922
+ case "radio": return vn(n);
2923
+ case "file": return yn(n);
2924
+ default: return t.inputAutoTrim ? n.value.trim() : n.value;
2925
+ }
2926
+ }, _n = (e) => +!!e.checked, vn = (e) => e.checked ? e.value : null, yn = (e) => e.files && e.files.length ? e.getAttribute("multiple") === null ? e.files[0] : e.files : null, bn = (e, t) => {
2927
+ let n = E();
2928
+ if (!n) return;
2929
+ let r = (e) => {
2930
+ t.input === "select" ? Sn(n, wn(e), t) : t.input === "radio" && Cn(n, wn(e), t);
2931
+ };
2932
+ y(t.inputOptions) || x(t.inputOptions) ? (pn(A()), b(t.inputOptions).then((t) => {
2933
+ e.hideLoading(), r(t);
2934
+ })) : typeof t.inputOptions == "object" ? r(t.inputOptions) : m(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`);
2935
+ }, xn = (e, t) => {
2936
+ let n = e.getInput();
2937
+ n && (B(n), b(t.inputValue).then((r) => {
2938
+ n.value = t.input === "number" ? `${parseFloat(r) || 0}` : `${r}`, z(n), n.focus(), e.hideLoading();
2939
+ }).catch((t) => {
2940
+ m(`Error in inputValue promise: ${t}`), n.value = "", z(n), n.focus(), e.hideLoading();
2941
+ }));
2942
+ };
2943
+ function Sn(e, t, n) {
2944
+ let r = R(e, l.select);
2945
+ if (!r) return;
2946
+ let i = (e, t, r) => {
2947
+ let i = document.createElement("option");
2948
+ i.value = r, N(i, t), i.selected = Tn(r, n.inputValue), e.appendChild(i);
2949
+ };
2950
+ t.forEach((e) => {
2951
+ let t = e[0], n = e[1];
2952
+ if (Array.isArray(n)) {
2953
+ let e = document.createElement("optgroup");
2954
+ e.label = t, e.disabled = !1, r.appendChild(e), n.forEach((t) => i(e, t[1], t[0]));
2955
+ } else i(r, n, t);
2956
+ }), r.focus();
2957
+ }
2958
+ function Cn(e, t, n) {
2959
+ let r = R(e, l.radio);
2960
+ if (!r) return;
2961
+ t.forEach((e) => {
2962
+ let t = e[0], i = e[1], a = document.createElement("input"), o = document.createElement("label");
2963
+ a.type = "radio", a.name = l.radio, a.value = t, Tn(t, n.inputValue) && (a.checked = !0);
2964
+ let s = document.createElement("span");
2965
+ N(s, i), s.className = l.label, o.appendChild(a), o.appendChild(s), r.appendChild(o);
2966
+ });
2967
+ let i = r.querySelectorAll("input");
2968
+ i.length && i[0].focus();
2969
+ }
2970
+ let wn = (e) => (e instanceof Map ? Array.from(e) : Object.entries(e)).map(([e, t]) => [e, typeof t == "object" ? wn(t) : t]), Tn = (e, t) => !!t && t != null && t.toString() === e.toString(), En = (e) => {
2971
+ let t = J.innerParams.get(e);
2972
+ e.disableButtons(), t.input ? kn(e, "confirm") : Pn(e, !0);
2973
+ }, Dn = (e) => {
2974
+ let t = J.innerParams.get(e);
2975
+ e.disableButtons(), t.returnInputValueOnDeny ? kn(e, "deny") : jn(e, !1);
2976
+ }, On = (e, t) => {
2977
+ e.disableButtons(), t(X.cancel);
2978
+ }, kn = (e, t) => {
2979
+ let n = J.innerParams.get(e);
2980
+ if (!n.input) {
2981
+ m(`The "input" parameter is needed to be set when using returnInputValueOn${f(t)}`);
2982
+ return;
2983
+ }
2984
+ let r = e.getInput(), i = gn(e, n);
2985
+ n.inputValidator ? An(e, i, t) : r && !r.checkValidity() ? (e.enableButtons(), e.showValidationMessage(n.validationMessage || r.validationMessage)) : t === "deny" ? jn(e, i) : Pn(e, i);
2986
+ }, An = (e, t, n) => {
2987
+ let r = J.innerParams.get(e);
2988
+ e.disableInput(), Promise.resolve().then(() => b(r.inputValidator(t, r.validationMessage))).then((r) => {
2989
+ e.enableButtons(), e.enableInput(), r ? e.showValidationMessage(r) : n === "deny" ? jn(e, t) : Pn(e, t);
2990
+ });
2991
+ }, jn = (e, t) => {
2992
+ let n = J.innerParams.get(e);
2993
+ n.showLoaderOnDeny && pn(j()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preDeny(t, n.validationMessage))).then((n) => {
2994
+ n === !1 ? (e.hideLoading(), cn(e)) : e.close({
2995
+ isDenied: !0,
2996
+ value: n === void 0 ? t : n
2997
+ });
2998
+ }).catch((t) => Nn(e, t))) : e.close({
2999
+ isDenied: !0,
3000
+ value: t
3001
+ });
3002
+ }, Mn = (e, t) => {
3003
+ e.close({
3004
+ isConfirmed: !0,
3005
+ value: t
3006
+ });
3007
+ }, Nn = (e, t) => {
3008
+ e.rejectPromise(t);
3009
+ }, Pn = (e, t) => {
3010
+ let n = J.innerParams.get(e);
3011
+ n.showLoaderOnConfirm && pn(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preConfirm(t, n.validationMessage))).then((n) => {
3012
+ H(re()) || n === !1 ? (e.hideLoading(), cn(e)) : Mn(e, n === void 0 ? t : n);
3013
+ }).catch((t) => Nn(e, t))) : Mn(e, t);
3014
+ };
3015
+ function Fn() {
3016
+ let e = J.innerParams.get(this);
3017
+ if (!e) return;
3018
+ let t = J.domCache.get(this);
3019
+ B(t.loader), fe() ? e.icon && z(D()) : In(t), L([t.popup, t.actions], l.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), this.enableButtons();
3020
+ }
3021
+ let In = (e) => {
3022
+ let t = e.loader.getAttribute("data-button-to-replace"), n = t ? e.popup.getElementsByClassName(t) : [];
3023
+ n.length ? z(n[0], "inline-block") : xe() && B(e.actions);
3024
+ };
3025
+ function Ln() {
3026
+ let e = J.innerParams.get(this), t = J.domCache.get(this);
3027
+ return t ? he(t.popup, e.input) : null;
3028
+ }
3029
+ function Rn(e, t, n) {
3030
+ let r = J.domCache.get(e);
3031
+ t.forEach((e) => {
3032
+ r[e].disabled = n;
3033
+ });
3034
+ }
3035
+ function zn(e, t) {
3036
+ let n = E();
3037
+ !n || !e || (e.type === "radio" ? n.querySelectorAll(`[name="${l.radio}"]`).forEach((e) => {
3038
+ e.disabled = t;
3039
+ }) : e.disabled = t);
3040
+ }
3041
+ function Bn() {
3042
+ Rn(this, [
3043
+ "confirmButton",
3044
+ "denyButton",
3045
+ "cancelButton"
3046
+ ], !1);
3047
+ let e = J.focusedElement.get(this);
3048
+ e instanceof HTMLElement && document.activeElement === document.body && e.focus(), J.focusedElement.delete(this);
3049
+ }
3050
+ function Vn() {
3051
+ J.focusedElement.set(this, document.activeElement), Rn(this, [
3052
+ "confirmButton",
3053
+ "denyButton",
3054
+ "cancelButton"
3055
+ ], !0);
3056
+ }
3057
+ function Hn() {
3058
+ zn(this.getInput(), !1);
3059
+ }
3060
+ function Un() {
3061
+ zn(this.getInput(), !0);
3062
+ }
3063
+ function Wn(e) {
3064
+ let t = J.domCache.get(this), n = J.innerParams.get(this);
3065
+ N(t.validationMessage, e), t.validationMessage.className = l["validation-message"], n.customClass && n.customClass.validationMessage && I(t.validationMessage, n.customClass.validationMessage), z(t.validationMessage);
3066
+ let r = this.getInput();
3067
+ r && (r.setAttribute("aria-invalid", "true"), r.setAttribute("aria-describedby", l["validation-message"]), ge(r), I(r, l.inputerror));
3068
+ }
3069
+ function Gn() {
3070
+ let e = J.domCache.get(this);
3071
+ e.validationMessage && B(e.validationMessage);
3072
+ let t = this.getInput();
3073
+ t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), L(t, l.inputerror));
3074
+ }
3075
+ let Kn = {
3076
+ title: "",
3077
+ titleText: "",
3078
+ text: "",
3079
+ html: "",
3080
+ footer: "",
3081
+ icon: void 0,
3082
+ iconColor: void 0,
3083
+ iconHtml: void 0,
3084
+ template: void 0,
3085
+ toast: !1,
3086
+ draggable: !1,
3087
+ animation: !0,
3088
+ theme: "light",
3089
+ showClass: {
3090
+ popup: "swal2-show",
3091
+ backdrop: "swal2-backdrop-show",
3092
+ icon: "swal2-icon-show"
3093
+ },
3094
+ hideClass: {
3095
+ popup: "swal2-hide",
3096
+ backdrop: "swal2-backdrop-hide",
3097
+ icon: "swal2-icon-hide"
3098
+ },
3099
+ customClass: {},
3100
+ target: "body",
3101
+ color: void 0,
3102
+ backdrop: !0,
3103
+ heightAuto: !0,
3104
+ allowOutsideClick: !0,
3105
+ allowEscapeKey: !0,
3106
+ allowEnterKey: !0,
3107
+ stopKeydownPropagation: !0,
3108
+ keydownListenerCapture: !1,
3109
+ showConfirmButton: !0,
3110
+ showDenyButton: !1,
3111
+ showCancelButton: !1,
3112
+ preConfirm: void 0,
3113
+ preDeny: void 0,
3114
+ confirmButtonText: "OK",
3115
+ confirmButtonAriaLabel: "",
3116
+ confirmButtonColor: void 0,
3117
+ denyButtonText: "No",
3118
+ denyButtonAriaLabel: "",
3119
+ denyButtonColor: void 0,
3120
+ cancelButtonText: "Cancel",
3121
+ cancelButtonAriaLabel: "",
3122
+ cancelButtonColor: void 0,
3123
+ buttonsStyling: !0,
3124
+ reverseButtons: !1,
3125
+ focusConfirm: !0,
3126
+ focusDeny: !1,
3127
+ focusCancel: !1,
3128
+ returnFocus: !0,
3129
+ showCloseButton: !1,
3130
+ closeButtonHtml: "&times;",
3131
+ closeButtonAriaLabel: "Close this dialog",
3132
+ loaderHtml: "",
3133
+ showLoaderOnConfirm: !1,
3134
+ showLoaderOnDeny: !1,
3135
+ imageUrl: void 0,
3136
+ imageWidth: void 0,
3137
+ imageHeight: void 0,
3138
+ imageAlt: "",
3139
+ timer: void 0,
3140
+ timerProgressBar: !1,
3141
+ width: void 0,
3142
+ padding: void 0,
3143
+ background: void 0,
3144
+ input: void 0,
3145
+ inputPlaceholder: "",
3146
+ inputLabel: "",
3147
+ inputValue: "",
3148
+ inputOptions: {},
3149
+ inputAutoFocus: !0,
3150
+ inputAutoTrim: !0,
3151
+ inputAttributes: {},
3152
+ inputValidator: void 0,
3153
+ returnInputValueOnDeny: !1,
3154
+ validationMessage: void 0,
3155
+ grow: !1,
3156
+ position: "center",
3157
+ progressSteps: [],
3158
+ currentProgressStep: void 0,
3159
+ progressStepsDistance: void 0,
3160
+ willOpen: void 0,
3161
+ didOpen: void 0,
3162
+ didRender: void 0,
3163
+ willClose: void 0,
3164
+ didClose: void 0,
3165
+ didDestroy: void 0,
3166
+ scrollbarPadding: !0,
3167
+ topLayer: !1
3168
+ }, qn = /* @__PURE__ */ "allowEscapeKey.allowOutsideClick.background.buttonsStyling.cancelButtonAriaLabel.cancelButtonColor.cancelButtonText.closeButtonAriaLabel.closeButtonHtml.color.confirmButtonAriaLabel.confirmButtonColor.confirmButtonText.currentProgressStep.customClass.denyButtonAriaLabel.denyButtonColor.denyButtonText.didClose.didDestroy.draggable.footer.hideClass.html.icon.iconColor.iconHtml.imageAlt.imageHeight.imageUrl.imageWidth.preConfirm.preDeny.progressSteps.returnFocus.reverseButtons.showCancelButton.showCloseButton.showConfirmButton.showDenyButton.text.title.titleText.theme.willClose".split("."), Jn = { allowEnterKey: void 0 }, Yn = [
3169
+ "allowOutsideClick",
3170
+ "allowEnterKey",
3171
+ "backdrop",
3172
+ "draggable",
3173
+ "focusConfirm",
3174
+ "focusDeny",
3175
+ "focusCancel",
3176
+ "returnFocus",
3177
+ "heightAuto",
3178
+ "keydownListenerCapture"
3179
+ ], Xn = (e) => Object.prototype.hasOwnProperty.call(Kn, e), Zn = (e) => qn.indexOf(e) !== -1, Qn = (e) => Jn[e], $n = (e) => {
3180
+ Xn(e) || p(`Unknown parameter "${e}"`);
3181
+ }, er = (e) => {
3182
+ Yn.includes(e) && p(`The parameter "${e}" is incompatible with toasts`);
3183
+ }, tr = (e) => {
3184
+ let t = Qn(e);
3185
+ t && _(e, t);
3186
+ }, nr = (e) => {
3187
+ e.backdrop === !1 && e.allowOutsideClick && p("\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`"), e.theme && ![
3188
+ "light",
3189
+ "dark",
3190
+ "auto",
3191
+ "minimal",
3192
+ "borderless",
3193
+ "bootstrap-4",
3194
+ "bootstrap-4-light",
3195
+ "bootstrap-4-dark",
3196
+ "bootstrap-5",
3197
+ "bootstrap-5-light",
3198
+ "bootstrap-5-dark",
3199
+ "material-ui",
3200
+ "material-ui-light",
3201
+ "material-ui-dark",
3202
+ "embed-iframe",
3203
+ "bulma",
3204
+ "bulma-light",
3205
+ "bulma-dark"
3206
+ ].includes(e.theme) && p(`Invalid theme "${e.theme}"`);
3207
+ for (let t in e) $n(t), e.toast && er(t), tr(t);
3208
+ };
3209
+ function rr(e) {
3210
+ let t = C(), n = E(), r = J.innerParams.get(this);
3211
+ if (!n || P(n, r.hideClass.popup)) {
3212
+ p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
3213
+ return;
3214
+ }
3215
+ let i = ir(e), a = Object.assign({}, r, i);
3216
+ nr(a), t && (t.dataset.swal2Theme = a.theme), Dt(this, a), J.innerParams.set(this, a), Object.defineProperties(this, { params: {
3217
+ value: Object.assign({}, this.params, e),
3218
+ writable: !1,
3219
+ enumerable: !0
3220
+ } });
3221
+ }
3222
+ let ir = (e) => {
3223
+ let t = {};
3224
+ return Object.keys(e).forEach((n) => {
3225
+ Zn(n) ? t[n] = e[n] : p(`Invalid parameter to update: ${n}`);
3226
+ }), t;
3227
+ };
3228
+ function ar() {
3229
+ var e;
3230
+ let t = J.domCache.get(this), n = J.innerParams.get(this);
3231
+ if (!n) {
3232
+ sr(this);
3233
+ return;
3234
+ }
3235
+ t.popup && a.swalCloseEventFinishedCallback && (a.swalCloseEventFinishedCallback(), delete a.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (e = a.eventEmitter) == null || e.emit("didDestroy"), or(this);
3236
+ }
3237
+ let or = (e) => {
3238
+ sr(e), delete e.params, delete a.keydownHandler, delete a.keydownTarget, delete a.currentInstance;
3239
+ }, sr = (e) => {
3240
+ e.isAwaitingPromise ? (cr(J, e), e.isAwaitingPromise = !0) : (cr(Ht, e), cr(J, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
3241
+ }, cr = (e, t) => {
3242
+ for (let n in e) e[n].delete(t);
3243
+ };
3244
+ var lr = /*#__PURE__*/ Object.freeze({
3245
+ __proto__: null,
3246
+ _destroy: ar,
3247
+ close: Z,
3248
+ closeModal: Z,
3249
+ closePopup: Z,
3250
+ closeToast: Z,
3251
+ disableButtons: Vn,
3252
+ disableInput: Un,
3253
+ disableLoading: Fn,
3254
+ enableButtons: Bn,
3255
+ enableInput: Hn,
3256
+ getInput: Ln,
3257
+ handleAwaitingPromise: cn,
3258
+ hideLoading: Fn,
3259
+ rejectPromise: sn,
3260
+ resetValidationMessage: Gn,
3261
+ showValidationMessage: Wn,
3262
+ update: rr
3263
+ });
3264
+ let ur = (e, t, n) => {
3265
+ e.toast ? dr(e, t, n) : (mr(t), hr(t), gr(e, t, n));
3266
+ }, dr = (e, t, n) => {
3267
+ t.popup.onclick = () => {
3268
+ e && (fr(e) || e.timer || e.input) || n(X.close);
3269
+ };
3270
+ }, fr = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton), pr = !1, mr = (e) => {
3271
+ e.popup.onmousedown = () => {
3272
+ e.container.onmouseup = function(t) {
3273
+ e.container.onmouseup = () => {}, t.target === e.container && (pr = !0);
3274
+ };
3275
+ };
3276
+ }, hr = (e) => {
3277
+ e.container.onmousedown = (t) => {
3278
+ t.target === e.container && t.preventDefault(), e.popup.onmouseup = function(t) {
3279
+ e.popup.onmouseup = () => {}, (t.target === e.popup || t.target instanceof HTMLElement && e.popup.contains(t.target)) && (pr = !0);
3280
+ };
3281
+ };
3282
+ }, gr = (e, t, n) => {
3283
+ t.container.onclick = (r) => {
3284
+ if (pr) {
3285
+ pr = !1;
3286
+ return;
3287
+ }
3288
+ r.target === t.container && v(e.allowOutsideClick) && n(X.backdrop);
3289
+ };
3290
+ }, _r = (e) => typeof e == "object" && !!e && "jquery" in e, vr = (e) => e instanceof Element || _r(e), yr = (e) => {
3291
+ let t = {};
3292
+ return typeof e[0] == "object" && !vr(e[0]) ? Object.assign(t, e[0]) : [
3293
+ "title",
3294
+ "html",
3295
+ "icon"
3296
+ ].forEach((n, r) => {
3297
+ let i = e[r];
3298
+ typeof i == "string" || vr(i) ? t[n] = i : i !== void 0 && m(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`);
3299
+ }), t;
3300
+ };
3301
+ function br(...e) {
3302
+ return new this(...e);
3303
+ }
3304
+ function xr(e) {
3305
+ class t extends this {
3306
+ _main(t, n) {
3307
+ return super._main(t, Object.assign({}, e, n));
3308
+ }
3309
+ }
3310
+ return t;
3311
+ }
3312
+ let Sr = () => a.timeout && a.timeout.getTimerLeft(), Cr = () => {
3313
+ if (a.timeout) return Te(), a.timeout.stop();
3314
+ }, wr = () => {
3315
+ if (a.timeout) {
3316
+ let e = a.timeout.start();
3317
+ return we(e), e;
3318
+ }
3319
+ }, Tr = () => {
3320
+ let e = a.timeout;
3321
+ return e && (e.running ? Cr() : wr());
3322
+ }, Er = (e) => {
3323
+ if (a.timeout) {
3324
+ let t = a.timeout.increase(e);
3325
+ return we(t, !0), t;
3326
+ }
3327
+ }, Dr = () => !!(a.timeout && a.timeout.isRunning()), Or = !1, kr = {};
3328
+ function Ar(e = "data-swal-template") {
3329
+ kr[e] = this, Or ||= (document.body.addEventListener("click", jr), !0);
3330
+ }
3331
+ let jr = (e) => {
3332
+ for (let t = e.target; t && t !== document; t = t.parentNode) for (let e in kr) {
3333
+ let n = t.getAttribute && t.getAttribute(e);
3334
+ if (n) {
3335
+ kr[e].fire({ template: n });
3336
+ return;
3337
+ }
3338
+ }
3339
+ };
3340
+ class Mr {
3341
+ constructor() {
3342
+ this.events = {};
3343
+ }
3344
+ _getHandlersByEventName(e) {
3345
+ return this.events[e] === void 0 && (this.events[e] = []), this.events[e];
3346
+ }
3347
+ on(e, t) {
3348
+ let n = this._getHandlersByEventName(e);
3349
+ n.includes(t) || n.push(t);
3350
+ }
3351
+ once(e, t) {
3352
+ let n = (...r) => {
3353
+ this.removeListener(e, n), t.apply(this, r);
3354
+ };
3355
+ this.on(e, n);
3356
+ }
3357
+ emit(e, ...t) {
3358
+ this._getHandlersByEventName(e).forEach((e) => {
3359
+ try {
3360
+ e.apply(this, t);
3361
+ } catch (e) {
3362
+ console.error(e);
3363
+ }
3364
+ });
3365
+ }
3366
+ removeListener(e, t) {
3367
+ let n = this._getHandlersByEventName(e), r = n.indexOf(t);
3368
+ r > -1 && n.splice(r, 1);
3369
+ }
3370
+ removeAllListeners(e) {
3371
+ this.events[e] !== void 0 && (this.events[e].length = 0);
3372
+ }
3373
+ reset() {
3374
+ this.events = {};
3375
+ }
3376
+ }
3377
+ a.eventEmitter = new Mr();
3378
+ var Nr = /*#__PURE__*/ Object.freeze({
3379
+ __proto__: null,
3380
+ argsToParams: yr,
3381
+ bindClickHandler: Ar,
3382
+ clickCancel: jt,
3383
+ clickConfirm: kt,
3384
+ clickDeny: At,
3385
+ enableLoading: pn,
3386
+ fire: br,
3387
+ getActions: oe,
3388
+ getCancelButton: ie,
3389
+ getCloseButton: le,
3390
+ getConfirmButton: A,
3391
+ getContainer: C,
3392
+ getDenyButton: j,
3393
+ getFocusableElements: ue,
3394
+ getFooter: se,
3395
+ getHtmlContainer: te,
3396
+ getIcon: D,
3397
+ getIconContent: O,
3398
+ getImage: k,
3399
+ getInputLabel: ae,
3400
+ getLoader: M,
3401
+ getPopup: E,
3402
+ getProgressSteps: ne,
3403
+ getTimerLeft: Sr,
3404
+ getTimerProgressBar: ce,
3405
+ getTitle: ee,
3406
+ getValidationMessage: re,
3407
+ increaseTimer: Er,
3408
+ isDeprecatedParameter: Qn,
3409
+ isLoading: pe,
3410
+ isTimerRunning: Dr,
3411
+ isUpdatableParameter: Zn,
3412
+ isValidParameter: Xn,
3413
+ isVisible: Ot,
3414
+ mixin: xr,
3415
+ off: (e, t) => {
3416
+ if (a.eventEmitter) {
3417
+ if (!e) {
3418
+ a.eventEmitter.reset();
3419
+ return;
3420
+ }
3421
+ t ? a.eventEmitter.removeListener(e, t) : a.eventEmitter.removeAllListeners(e);
3422
+ }
3423
+ },
3424
+ on: (e, t) => {
3425
+ a.eventEmitter && a.eventEmitter.on(e, t);
3426
+ },
3427
+ once: (e, t) => {
3428
+ a.eventEmitter && a.eventEmitter.once(e, t);
3429
+ },
3430
+ resumeTimer: wr,
3431
+ showLoading: pn,
3432
+ stopTimer: Cr,
3433
+ toggleTimer: Tr
3434
+ });
3435
+ class Pr {
3436
+ constructor(e, t) {
3437
+ this.callback = e, this.remaining = t, this.running = !1, this.start();
3438
+ }
3439
+ start() {
3440
+ return this.running || (this.running = !0, this.started = /* @__PURE__ */ new Date(), this.id = setTimeout(this.callback, this.remaining)), this.remaining;
3441
+ }
3442
+ stop() {
3443
+ return this.started && this.running && (this.running = !1, clearTimeout(this.id), this.remaining -= (/* @__PURE__ */ new Date()).getTime() - this.started.getTime()), this.remaining;
3444
+ }
3445
+ increase(e) {
3446
+ let t = this.running;
3447
+ return t && this.stop(), this.remaining += e, t && this.start(), this.remaining;
3448
+ }
3449
+ getTimerLeft() {
3450
+ return this.running && (this.stop(), this.start()), this.remaining;
3451
+ }
3452
+ isRunning() {
3453
+ return this.running;
3454
+ }
3455
+ }
3456
+ let Fr = [
3457
+ "swal-title",
3458
+ "swal-html",
3459
+ "swal-footer"
3460
+ ], Ir = (e) => {
3461
+ let t = typeof e.template == "string" ? document.querySelector(e.template) : e.template;
3462
+ if (!t) return {};
3463
+ let n = t.content;
3464
+ return Wr(n), Object.assign(Lr(n), Rr(n), zr(n), Br(n), Vr(n), Hr(n), Ur(n, Fr));
3465
+ }, Lr = (e) => {
3466
+ let t = {};
3467
+ return Array.from(e.querySelectorAll("swal-param")).forEach((e) => {
3468
+ Gr(e, ["name", "value"]);
3469
+ let n = e.getAttribute("name"), r = e.getAttribute("value");
3470
+ !n || !r || (n in Kn && typeof Kn[n] == "boolean" ? t[n] = r !== "false" : n in Kn && typeof Kn[n] == "object" ? t[n] = JSON.parse(r) : t[n] = r);
3471
+ }), t;
3472
+ }, Rr = (e) => {
3473
+ let t = {};
3474
+ return Array.from(e.querySelectorAll("swal-function-param")).forEach((e) => {
3475
+ let n = e.getAttribute("name"), r = e.getAttribute("value");
3476
+ !n || !r || (t[n] = Function(`return ${r}`)());
3477
+ }), t;
3478
+ }, zr = (e) => {
3479
+ let t = {};
3480
+ return Array.from(e.querySelectorAll("swal-button")).forEach((e) => {
3481
+ Gr(e, [
3482
+ "type",
3483
+ "color",
3484
+ "aria-label"
3485
+ ]);
3486
+ let n = e.getAttribute("type");
3487
+ if (!n || ![
3488
+ "confirm",
3489
+ "cancel",
3490
+ "deny"
3491
+ ].includes(n)) return;
3492
+ t[`${n}ButtonText`] = e.innerHTML, t[`show${f(n)}Button`] = !0;
3493
+ let r = e.getAttribute("color");
3494
+ r !== null && (t[`${n}ButtonColor`] = r);
3495
+ let i = e.getAttribute("aria-label");
3496
+ i !== null && (t[`${n}ButtonAriaLabel`] = i);
3497
+ }), t;
3498
+ }, Br = (e) => {
3499
+ let t = {}, n = e.querySelector("swal-image");
3500
+ if (n) {
3501
+ Gr(n, [
3502
+ "src",
3503
+ "width",
3504
+ "height",
3505
+ "alt"
3506
+ ]);
3507
+ let e = n.getAttribute("src");
3508
+ e !== null && (t.imageUrl = e || void 0);
3509
+ let r = n.getAttribute("width");
3510
+ r !== null && (t.imageWidth = r || void 0);
3511
+ let i = n.getAttribute("height");
3512
+ i !== null && (t.imageHeight = i || void 0);
3513
+ let a = n.getAttribute("alt");
3514
+ a !== null && (t.imageAlt = a || void 0);
3515
+ }
3516
+ return t;
3517
+ }, Vr = (e) => {
3518
+ let t = {}, n = e.querySelector("swal-icon");
3519
+ return n && (Gr(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
3520
+ }, Hr = (e) => {
3521
+ let t = {}, n = e.querySelector("swal-input");
3522
+ n && (Gr(n, [
3523
+ "type",
3524
+ "label",
3525
+ "placeholder",
3526
+ "value"
3527
+ ]), t.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (t.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (t.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (t.inputValue = n.getAttribute("value")));
3528
+ let r = Array.from(e.querySelectorAll("swal-input-option"));
3529
+ return r.length && (t.inputOptions = {}, r.forEach((e) => {
3530
+ Gr(e, ["value"]);
3531
+ let n = e.getAttribute("value");
3532
+ if (!n) return;
3533
+ let r = e.innerHTML;
3534
+ t.inputOptions[n] = r;
3535
+ })), t;
3536
+ }, Ur = (e, t) => {
3537
+ let n = {};
3538
+ for (let r in t) {
3539
+ let i = t[r], a = e.querySelector(i);
3540
+ a && (Gr(a, []), n[i.replace(/^swal-/, "")] = a.innerHTML.trim());
3541
+ }
3542
+ return n;
3543
+ }, Wr = (e) => {
3544
+ let t = Fr.concat([
3545
+ "swal-param",
3546
+ "swal-function-param",
3547
+ "swal-button",
3548
+ "swal-image",
3549
+ "swal-icon",
3550
+ "swal-input",
3551
+ "swal-input-option"
3552
+ ]);
3553
+ Array.from(e.children).forEach((e) => {
3554
+ let n = e.tagName.toLowerCase();
3555
+ t.includes(n) || p(`Unrecognized element <${n}>`);
3556
+ });
3557
+ }, Gr = (e, t) => {
3558
+ Array.from(e.attributes).forEach((n) => {
3559
+ t.indexOf(n.name) === -1 && p([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`, `${t.length ? `Allowed attributes are: ${t.join(", ")}` : "To set the value, use HTML within the element."}`]);
3560
+ });
3561
+ }, Kr = (e) => {
3562
+ var t, n;
3563
+ let r = C(), i = E();
3564
+ if (!r || !i) return;
3565
+ typeof e.willOpen == "function" && e.willOpen(i), (t = a.eventEmitter) == null || t.emit("willOpen", i);
3566
+ let o = window.getComputedStyle(document.body).overflowY;
3567
+ if (Xr(r, i, e), setTimeout(() => {
3568
+ Jr(r, i);
3569
+ }, 10), de() && (Yr(r, e.scrollbarPadding !== void 0 && e.scrollbarPadding, o), Ut()), Kt && e.backdrop === !1 && i.scrollHeight > r.clientHeight && (r.style.pointerEvents = "auto"), !fe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function") {
3570
+ let t = e.didOpen;
3571
+ setTimeout(() => t(i));
3572
+ }
3573
+ (n = a.eventEmitter) == null || n.emit("didOpen", i);
3574
+ }, qr = (e) => {
3575
+ let t = E();
3576
+ if (!t || e.target !== t) return;
3577
+ let n = C();
3578
+ n && (t.removeEventListener("animationend", qr), t.removeEventListener("transitionend", qr), n.style.overflowY = "auto", L(n, l["no-transition"]));
3579
+ }, Jr = (e, t) => {
3580
+ Ce(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", qr), t.addEventListener("transitionend", qr)) : e.style.overflowY = "auto";
3581
+ }, Yr = (e, t, n) => {
3582
+ qt(), t && n !== "hidden" && tn(n), setTimeout(() => {
3583
+ e.scrollTop = 0;
3584
+ });
3585
+ }, Xr = (e, t, n) => {
3586
+ var r;
3587
+ (r = n.showClass) != null && r.backdrop && I(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"), z(t, "grid"), setTimeout(() => {
3588
+ var e;
3589
+ (e = n.showClass) != null && e.popup && I(t, n.showClass.popup), t.style.removeProperty("opacity");
3590
+ }, 10)) : z(t, "grid"), I([document.documentElement, document.body], l.shown), n.heightAuto && n.backdrop && !n.toast && I([document.documentElement, document.body], l["height-auto"]);
3591
+ };
3592
+ var Zr = {
3593
+ email: (e, t) => /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid email address"),
3594
+ url: (e, t) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid URL")
3595
+ };
3596
+ function Qr(e) {
3597
+ e.inputValidator || (e.input === "email" && (e.inputValidator = Zr.email), e.input === "url" && (e.inputValidator = Zr.url));
3598
+ }
3599
+ function $r(e) {
3600
+ (!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (p("Target parameter is not valid, defaulting to \"body\""), e.target = "body");
3601
+ }
3602
+ function ei(e) {
3603
+ Qr(e), e.showLoaderOnConfirm && !e.preConfirm && p("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"), $r(e), typeof e.title == "string" && (e.title = e.title.split("\n").join("<br />")), Ae(e);
3604
+ }
3605
+ let Q;
3606
+ var ti = /*#__PURE__*/ new WeakMap();
3607
+ class $ {
3608
+ constructor(...e) {
3609
+ if (r(this, ti, Promise.resolve({
3610
+ isConfirmed: !1,
3611
+ isDenied: !1,
3612
+ isDismissed: !0
3613
+ })), typeof window > "u") return;
3614
+ Q = this;
3615
+ let t = Object.freeze(this.constructor.argsToParams(e));
3616
+ this.params = t, this.isAwaitingPromise = !1, i(ti, this, this._main(Q.params));
3617
+ }
3618
+ _main(e, t = {}) {
3619
+ if (nr(Object.assign({}, t, e)), a.currentInstance) {
3620
+ let e = Ht.swalPromiseResolve.get(a.currentInstance), { isAwaitingPromise: t } = a.currentInstance;
3621
+ a.currentInstance._destroy(), t || e({ isDismissed: !0 }), de() && Wt();
3622
+ }
3623
+ a.currentInstance = Q;
3624
+ let n = ri(e, t);
3625
+ ei(n), Object.freeze(n), a.timeout && (a.timeout.stop(), delete a.timeout), clearTimeout(a.restoreFocusTimeout);
3626
+ let r = ii(Q);
3627
+ return Dt(Q, n), J.innerParams.set(Q, n), ni(Q, r, n);
3628
+ }
3629
+ then(e) {
3630
+ return n(ti, this).then(e);
3631
+ }
3632
+ finally(e) {
3633
+ return n(ti, this).finally(e);
3634
+ }
3635
+ }
3636
+ let ni = (e, t, n) => new Promise((r, i) => {
3637
+ let o = (t) => {
3638
+ e.close({
3639
+ isDismissed: !0,
3640
+ dismiss: t,
3641
+ isConfirmed: !1,
3642
+ isDenied: !1
3643
+ });
3644
+ };
3645
+ Ht.swalPromiseResolve.set(e, r), Ht.swalPromiseReject.set(e, i), t.confirmButton.onclick = () => {
3646
+ En(e);
3647
+ }, t.denyButton.onclick = () => {
3648
+ Dn(e);
3649
+ }, t.cancelButton.onclick = () => {
3650
+ On(e, o);
3651
+ }, t.closeButton.onclick = () => {
3652
+ o(X.close);
3653
+ }, ur(n, t, o), Nt(a, n, o), hn(e, n), Kr(n), ai(a, n, o), oi(t, n), setTimeout(() => {
3654
+ t.container.scrollTop = 0;
3655
+ });
3656
+ }), ri = (e, t) => {
3657
+ let n = Ir(e), r = Object.assign({}, Kn, t, n, e);
3658
+ return r.showClass = Object.assign({}, Kn.showClass, r.showClass), r.hideClass = Object.assign({}, Kn.hideClass, r.hideClass), r.animation === !1 && (r.showClass = { backdrop: "swal2-noanimation" }, r.hideClass = {}), r;
3659
+ }, ii = (e) => {
3660
+ let t = {
3661
+ popup: E(),
3662
+ container: C(),
3663
+ actions: oe(),
3664
+ confirmButton: A(),
3665
+ denyButton: j(),
3666
+ cancelButton: ie(),
3667
+ loader: M(),
3668
+ closeButton: le(),
3669
+ validationMessage: re(),
3670
+ progressSteps: ne()
3671
+ };
3672
+ return J.domCache.set(e, t), t;
3673
+ }, ai = (e, t, n) => {
3674
+ let r = ce();
3675
+ B(r), t.timer && (e.timeout = new Pr(() => {
3676
+ n("timer"), delete e.timeout;
3677
+ }, t.timer), t.timerProgressBar && r && (z(r), F(r, t, "timerProgressBar"), setTimeout(() => {
3678
+ e.timeout && e.timeout.running && we(t.timer);
3679
+ })));
3680
+ }, oi = (e, t) => {
3681
+ if (!t.toast) {
3682
+ if (!v(t.allowEnterKey)) {
3683
+ _("allowEnterKey", "preConfirm: () => false"), e.popup.focus();
3684
+ return;
3685
+ }
3686
+ si(e) || ci(e, t) || Pt(-1, 1);
3687
+ }
3688
+ }, si = (e) => {
3689
+ let t = Array.from(e.popup.querySelectorAll("[autofocus]"));
3690
+ for (let e of t) if (e instanceof HTMLElement && H(e)) return e.focus(), !0;
3691
+ return !1;
3692
+ }, ci = (e, t) => t.focusDeny && H(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && H(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && H(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1;
3693
+ $.prototype.disableButtons = Vn, $.prototype.enableButtons = Bn, $.prototype.getInput = Ln, $.prototype.disableInput = Un, $.prototype.enableInput = Hn, $.prototype.hideLoading = Fn, $.prototype.disableLoading = Fn, $.prototype.showValidationMessage = Wn, $.prototype.resetValidationMessage = Gn, $.prototype.close = Z, $.prototype.closePopup = Z, $.prototype.closeModal = Z, $.prototype.closeToast = Z, $.prototype.rejectPromise = sn, $.prototype.update = rr, $.prototype._destroy = ar, Object.assign($, Nr), Object.keys(lr).forEach((e) => {
3694
+ $[e] = function(...t) {
3695
+ if (Q && Q[e]) return Q[e](...t);
3696
+ };
3697
+ }), $.DismissReason = X, $.version = "11.26.25";
3698
+ let li = $;
3699
+ return li.default = li, li;
3700
+ })), e !== void 0 && e.Sweetalert2 && (e.swal = e.sweetAlert = e.Swal = e.SweetAlert = e.Sweetalert2), typeof document < "u" && function(e, t) {
3701
+ var n = e.createElement("style");
3702
+ if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);
3703
+ else try {
3704
+ n.innerHTML = t;
3705
+ } catch {
3706
+ n.innerText = t;
3707
+ }
3708
+ }(document, ":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}");
3709
+ })))(), 1);
3710
+ function jt({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3711
+ let i = t.map((e, t) => `<input id="${`swal-input-${t}`}" class="swal2-input" placeholder="${e.placeholder || ""}" value="${e.value || ""}">`).join("");
3712
+ return At.default.fire({
3713
+ title: e,
3714
+ html: i,
3715
+ focusConfirm: !1,
3716
+ preConfirm: () => {
3717
+ let e = t.map((e, t) => {
3718
+ let n = `swal-input-${t}`, r = document.getElementById(n);
3719
+ if (!r) return null;
3720
+ let i = r.value;
3721
+ return e.required && !i ? (At.default.showValidationMessage(e.requiredMessage || "This field is required"), !1) : i;
3722
+ });
3723
+ return !e.includes(!1) && e;
3724
+ },
3725
+ showCancelButton: !0,
3726
+ confirmButtonText: n || "Confirm",
3727
+ cancelButtonText: r || "Cancel"
3728
+ });
3729
+ }
3730
+ //#endregion
3731
+ //#region src/components/shared/toolbar/Insert/Hooks/insertLogic.jsx
3732
+ function X() {
3733
+ let e = window.getSelection();
3734
+ return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
3735
+ }
3736
+ function Mt(e) {
3737
+ if (!e) return;
3738
+ let t = window.getSelection();
3739
+ t && (t.removeAllRanges(), t.addRange(e));
3740
+ }
3741
+ function Nt() {
3742
+ let e = document.querySelector(".forge-editor__content");
3743
+ if (e) {
3744
+ e.focus();
3745
+ let t = document.createRange(), n = window.getSelection();
3746
+ if (n) {
3747
+ let r = e.lastChild;
3748
+ r ? (t.setStartAfter(r), t.collapse(!0)) : (t.selectNodeContents(e), t.collapse(!1)), n.removeAllRanges(), n.addRange(t);
3749
+ }
3750
+ }
3751
+ }
3752
+ function Pt(e) {
3753
+ let t = window.getSelection();
3754
+ if (!t || !t.rangeCount) {
3755
+ Nt(), setTimeout(() => Pt(e), 50);
3756
+ return;
3757
+ }
3758
+ let n = t.getRangeAt(0);
3759
+ n.deleteContents();
3760
+ let r = n.createContextualFragment(e), i = r.lastChild;
3761
+ n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
3762
+ }
3763
+ function Ft() {
3764
+ return {
3765
+ insertLink: async () => {
3766
+ let e = X(), t = await jt({
3767
+ title: "Insert Link",
3768
+ inputs: [{
3769
+ placeholder: "URL",
3770
+ value: "https://",
3771
+ required: !0,
3772
+ requiredMessage: "URL is required"
3773
+ }, { placeholder: "Link text (optional)" }],
3774
+ confirmText: "Insert",
3775
+ cancelText: "Cancel"
3776
+ });
3777
+ if (t.isConfirmed && t.value) {
3778
+ Mt(e);
3779
+ let [n, r] = t.value;
3780
+ Pt(r ? `<a href="${n}" target="_blank" rel="noopener">${r}</a>` : `<a href="${n}" target="_blank" rel="noopener">${n}</a>`);
3781
+ }
3782
+ },
3783
+ insertImage: async () => {
3784
+ let e = X(), t = await jt({
3785
+ title: "Insert Image",
3786
+ inputs: [{
3787
+ placeholder: "Image URL",
3788
+ value: "https://",
3789
+ required: !0,
3790
+ requiredMessage: "Image URL is required"
3791
+ }, {
3792
+ placeholder: "Alt text",
3793
+ value: "Image"
3794
+ }],
3795
+ confirmText: "Insert",
3796
+ cancelText: "Cancel"
3797
+ });
3798
+ if (t.isConfirmed && t.value) {
3799
+ Mt(e);
3800
+ let [n, r] = t.value;
3801
+ Pt(`<img src="${n}" alt="${r}" style="max-width: 100%;">`);
3802
+ }
3803
+ },
3804
+ insertVideo: async () => {
3805
+ let e = X(), t = await jt({
3806
+ title: "Insert Video",
3807
+ inputs: [{
3808
+ placeholder: "Video URL (YouTube/Vimeo)",
3809
+ value: "https://",
3810
+ required: !0,
3811
+ requiredMessage: "Video URL is required"
3812
+ }],
3813
+ confirmText: "Insert",
3814
+ cancelText: "Cancel"
3815
+ });
3816
+ if (t.isConfirmed && t.value) {
3817
+ Mt(e);
3818
+ let [n] = t.value, r;
3819
+ r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`, Pt(r);
3820
+ }
3821
+ }
3822
+ };
3823
+ }
3824
+ //#endregion
3825
+ //#region src/components/shared/toolbar/Insert/Components/index.jsx
3826
+ function It() {
3827
+ return /* @__PURE__ */ R(kt, { logic: Ft() });
3828
+ }
3829
+ //#endregion
3830
+ //#region src/components/shared/toolbar/View/Components/ViewToolbar.jsx
3831
+ function Lt({ logic: e }) {
3832
+ let { toggleFullscreen: t, toggleCodeView: n, showHelp: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
3833
+ return /* @__PURE__ */ R("div", {
3834
+ className: "forge-toolbar-group forge-toolbar-view flex items-center gap-0.5",
3835
+ children: [/* @__PURE__ */ R("button", {
3836
+ type: "button",
3837
+ className: i,
3838
+ onClick: t,
3839
+ "aria-label": "Full Screen",
3840
+ children: [/* @__PURE__ */ R("span", {
3841
+ className: "forge-toolbar-icon",
3842
+ children: "⛶"
3843
+ }), /* @__PURE__ */ R("span", {
3844
+ className: a,
3845
+ "data-i18n": "fullscreen",
3846
+ children: "Full Screen"
3847
+ })]
3848
+ }), /* @__PURE__ */ R("button", {
3849
+ type: "button",
3850
+ className: i,
3851
+ onClick: n,
3852
+ "aria-label": "Code View",
3853
+ children: [/* @__PURE__ */ R("span", {
3854
+ className: "forge-toolbar-icon",
3855
+ children: "</>"
3856
+ }), /* @__PURE__ */ R("span", {
3857
+ className: a,
3858
+ "data-i18n": "codeview",
3859
+ children: "Code View"
3860
+ })]
3861
+ })]
3862
+ });
3863
+ }
3864
+ //#endregion
3865
+ //#region src/components/shared/toolbar/View/Hooks/viewLogic.jsx
3866
+ function Rt() {
3867
+ return {
3868
+ toggleFullscreen: () => {
3869
+ let e = document.querySelector(".forge-editor");
3870
+ e && (document.fullscreenElement ? document.exitFullscreen().catch(() => {}) : e.requestFullscreen().catch(() => {}));
3871
+ },
3872
+ toggleCodeView: () => {
3873
+ let e = document.querySelector(".forge-editor__content");
3874
+ e && (e.contentEditable === "true" ? (e.contentEditable = "false", e.textContent = e.innerHTML) : (e.contentEditable = "true", e.innerHTML = e.textContent), e.focus());
3875
+ },
3876
+ showHelp: () => {
3877
+ let e = [
3878
+ "Forge Editor - Keyboard Shortcuts:",
3879
+ "",
3880
+ "Bold: Ctrl+B",
3881
+ "Underline: Ctrl+U",
3882
+ "Link: Ctrl+K",
3883
+ "Undo: Ctrl+Z",
3884
+ "Redo: Ctrl+Y",
3885
+ "",
3886
+ "Visit: https://github.com/your-repo/forge-edit"
3887
+ ].join("\n");
3888
+ alert(e);
3889
+ }
3890
+ };
3891
+ }
3892
+ //#endregion
3893
+ //#region src/components/shared/toolbar/View/Components/index.jsx
3894
+ function zt() {
3895
+ return /* @__PURE__ */ R(Lt, { logic: Rt() });
3896
+ }
3897
+ //#endregion
3898
+ //#region src/components/shared/toolbar/Index/index.jsx
3899
+ function Bt({ editorRef: e }) {
3900
+ return /* @__PURE__ */ R("div", {
3901
+ className: "forge-editor__toolbar sticky top-0 z-10 m-0 flex flex-shrink-0 flex-wrap items-center gap-[4px] rounded-t-[3px] border-b border-[#ddd] bg-[#f5f5f5] p-[5px] text-[#333]",
3902
+ role: "toolbar",
3903
+ children: [
3904
+ /* @__PURE__ */ R(z, {}),
3905
+ /* @__PURE__ */ R(J, {}),
3906
+ /* @__PURE__ */ R(Ze, { editorRef: e }),
3907
+ /* @__PURE__ */ R(lt, {}),
3908
+ /* @__PURE__ */ R(St, {}),
3909
+ /* @__PURE__ */ R(Ot, {}),
3910
+ /* @__PURE__ */ R(It, {}),
3911
+ /* @__PURE__ */ R(zt, {})
3912
+ ]
3913
+ });
3914
+ }
3915
+ //#endregion
3916
+ //#region src/components/shared/statusbar/Components/index.jsx
3917
+ function Vt() {
3918
+ return /* @__PURE__ */ R("div", {
3919
+ className: "forge-statusbar box-border flex h-2.5 w-full flex-shrink-0 cursor-s-resize items-center justify-center rounded-b-[3px] border-t border-[#ccc] bg-[#f0f0f0]",
3920
+ role: "status",
3921
+ children: /* @__PURE__ */ R("div", {
3922
+ className: "flex flex-col items-center gap-px",
3923
+ "aria-label": "resize",
3924
+ children: [
3925
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
3926
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
3927
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" })
3928
+ ]
3929
+ })
3930
+ });
3931
+ }
3932
+ //#endregion
3933
+ //#region src/components/shared/statusbar/Hooks/resize.js
3934
+ var Ht = 100;
3935
+ function Ut(e, t, n = {}) {
3936
+ if (!e || !t) return () => {};
3937
+ let r = n.minHeight ?? Ht, i = n.maxHeight ?? Infinity, a = 0, o = 0;
3938
+ function s(e) {
3939
+ let n = e.clientY - a, s = o + n;
3940
+ s = Math.min(Math.max(s, r), i), t.style.height = `${s}px`;
3941
+ }
3942
+ function c() {
3943
+ document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c), document.body.style.removeProperty("user-select"), document.body.style.removeProperty("cursor");
3944
+ }
3945
+ function l(e) {
3946
+ e.preventDefault(), a = e.clientY, o = t.getBoundingClientRect().height, document.body.style.userSelect = "none", document.body.style.cursor = "s-resize", document.addEventListener("mousemove", s), document.addEventListener("mouseup", c);
3947
+ }
3948
+ return e.addEventListener("mousedown", l), function() {
3949
+ e.removeEventListener("mousedown", l), document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c);
3950
+ };
3951
+ }
3952
+ //#endregion
3953
+ //#region src/components/shared/toolbar/Style/Hooks/styleLogic.jsx
3954
+ function Wt(e) {
3955
+ let t = window.getSelection();
3956
+ if (!t || !t.rangeCount) return;
3957
+ let n = t.getRangeAt(0).commonAncestorContainer;
3958
+ n.nodeType === 3 && (n = n.parentElement);
3959
+ let r = n.closest("p, h1, h2, h3, h4, h5, h6, blockquote, pre");
3960
+ if (r) {
3961
+ let n = document.createElement(e);
3962
+ for (; r.firstChild;) n.appendChild(r.firstChild);
3963
+ r.replaceWith(n);
3964
+ let i = document.createRange();
3965
+ i.selectNodeContents(n), i.collapse(!1), t.removeAllRanges(), t.addRange(i);
3966
+ }
3967
+ }
3968
+ function Gt(e) {
3969
+ if (!e) return;
3970
+ let t = e.querySelector("[data-command='style']"), n = e.querySelector(".forge-dropdown-style");
3971
+ !t || !n || (qe(t, n), n.querySelectorAll(".forge-dropdown-item").forEach((e) => {
3972
+ e.addEventListener("mousedown", (r) => {
3973
+ r.preventDefault(), r.stopPropagation();
3974
+ let i = e.dataset.value || e.getAttribute("data-value");
3975
+ i && Wt(i), n.classList.remove("is-open"), t.classList.remove("is-active");
3976
+ });
3977
+ }));
3978
+ }
3979
+ //#endregion
3980
+ //#region src/components/shared/i18n/index.js
3981
+ var Kt = {
3982
+ en: {
3983
+ style: "Style",
3984
+ normal: "Normal",
3985
+ blockquote: "Blockquote",
3986
+ code: "Code",
3987
+ header1: "Header 1",
3988
+ header2: "Header 2",
3989
+ header3: "Header 3",
3990
+ header4: "Header 4",
3991
+ header5: "Header 5",
3992
+ header6: "Header 6",
3993
+ bold: "Bold",
3994
+ underline: "Underline",
3995
+ removeFormat: "Remove Font Style",
3996
+ fontName: "Font Family",
3997
+ recentColor: "Recent Color",
3998
+ moreColor: "More Color",
3999
+ recentBackColor: "Recent Background Color",
4000
+ moreBackColor: "More Background Colors",
4001
+ insertUnorderedList: "Unordered List",
4002
+ insertOrderedList: "Ordered List",
4003
+ paragraph: "Paragraph",
4004
+ justifyLeft: "Align Left",
4005
+ justifyCenter: "Align Center",
4006
+ justifyRight: "Align Right",
4007
+ justifyFull: "Justify",
4008
+ outdent: "Outdent",
4009
+ indent: "Indent",
4010
+ table: "Table",
4011
+ link: "Link",
4012
+ picture: "Picture",
4013
+ video: "Video",
4014
+ fullscreen: "Full Screen",
4015
+ codeview: "Code View",
4016
+ help: "Help"
4017
+ },
4018
+ ar: {
4019
+ style: "نمط",
4020
+ normal: "عادي",
4021
+ blockquote: "اقتباس",
4022
+ code: "كود",
4023
+ header1: "عنوان 1",
4024
+ header2: "عنوان 2",
4025
+ header3: "عنوان 3",
4026
+ header4: "عنوان 4",
4027
+ header5: "عنوان 5",
4028
+ header6: "عنوان 6",
4029
+ bold: "عريض",
4030
+ underline: "تسطير",
4031
+ removeFormat: "إزالة تنسيق الخط",
4032
+ fontName: "نوع الخط",
4033
+ recentColor: "آخر لون مستخدم",
4034
+ moreColor: "المزيد من الألوان",
4035
+ recentBackColor: "آخر لون خلفية",
4036
+ moreBackColor: "المزيد من ألوان الخلفية",
4037
+ insertUnorderedList: "قائمة نقطية",
4038
+ insertOrderedList: "قائمة مرقمة",
4039
+ paragraph: "فقرة",
4040
+ justifyLeft: "محاذاة لليسار",
4041
+ justifyCenter: "محاذاة للوسط",
4042
+ justifyRight: "محاذاة لليمين",
4043
+ justifyFull: "ضبط",
4044
+ outdent: "تقليل المسافة البادئة",
4045
+ indent: "زيادة المسافة البادئة",
4046
+ table: "جدول",
4047
+ link: "رابط",
4048
+ picture: "صورة",
4049
+ video: "فيديو",
4050
+ fullscreen: "ملء الشاشة",
4051
+ codeview: "عرض الكود",
4052
+ help: "مساعدة"
4053
+ }
4054
+ }, qt = "en";
4055
+ function Jt(e, t) {
4056
+ return (Kt[e] || Kt[qt])[t] || Kt[qt][t] || t;
4057
+ }
4058
+ //#endregion
4059
+ //#region src/components/shared/i18n/apply.js
4060
+ function Yt(e, t) {
4061
+ e.querySelectorAll("[data-i18n]").forEach((e) => {
4062
+ e.textContent = Jt(t, e.getAttribute("data-i18n"));
4063
+ });
4064
+ }
4065
+ //#endregion
4066
+ //#region src/components/shared/toolbar/Style/Utils/ensureParagraph.jsx
4067
+ function Xt(e) {
4068
+ if (e && !(e.children.length > 0 || e.textContent.trim().length > 0)) {
4069
+ let t = document.createElement("p");
4070
+ t.innerHTML = "<br>", e.appendChild(t);
4071
+ }
4072
+ }
4073
+ //#endregion
4074
+ //#region src/components/shared/toolbar/Hooks/contentClick.js
4075
+ function Zt(e) {
4076
+ e.addEventListener("click", (t) => {
4077
+ if (t.target === e) {
4078
+ let t = window.getSelection();
4079
+ if (!t) return;
4080
+ let n = e.lastElementChild;
4081
+ if (!n || n.tagName === "PRE" || n.tagName === "BLOCKQUOTE" || /^H[1-6]$/.test(n.tagName)) {
4082
+ let n = document.createElement("p");
4083
+ n.innerHTML = "<br>", e.appendChild(n);
4084
+ let r = document.createRange();
4085
+ r.setStart(n, 0), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
4086
+ }
4087
+ }
4088
+ });
4089
+ }
4090
+ //#endregion
4091
+ //#region src/components/shared/toolbar/ImagePopover/Components/ImagePopover.jsx
4092
+ function Qt({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
4093
+ let a = q(null);
4094
+ if (!e) return null;
4095
+ let o = e.getBoundingClientRect(), s = {
4096
+ left: o.left + o.width / 2 - 100 + "px",
4097
+ top: o.bottom + 10 + "px"
4098
+ }, c = "note-btn cursor-pointer rounded-[2px] border border-[#ccc] bg-[#f5f5f5] px-2 py-1 text-xs leading-[1.4] transition-all duration-100 ease-in-out hover:border-[#999] hover:bg-[#e6e6e6] active:translate-y-px active:bg-[#d0d0d0]", l = "note-btn-group flex gap-0.5 border-r border-[#ddd] pr-1 last:border-r-0 last:pr-0", u = "not-italic text-sm leading-none";
4099
+ return /* @__PURE__ */ R("div", {
4100
+ ref: a,
4101
+ className: "note-popover bottom note-image-popover fixed z-[9999] min-w-[200px] rounded-[4px] border border-[#ccc] bg-white p-1.5 shadow-[0_2px_8px_rgba(0,0,0,0.15)]",
4102
+ style: s,
4103
+ children: [/* @__PURE__ */ R("div", {
4104
+ className: "absolute -top-2 left-1/2 -translate-x-1/2",
4105
+ children: [/* @__PURE__ */ R("div", { className: "border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent border-b-[#ccc]" }), /* @__PURE__ */ R("div", { className: "absolute top-[1px] left-[-7px] border-l-7 border-r-7 border-b-7 border-l-transparent border-r-transparent border-b-white" })]
4106
+ }), /* @__PURE__ */ R("div", {
4107
+ className: "popover-content note-children-container flex flex-wrap items-center gap-1",
4108
+ children: [
4109
+ /* @__PURE__ */ R("div", {
4110
+ className: `${l} note-resize`,
4111
+ children: [
4112
+ /* @__PURE__ */ R("button", {
4113
+ type: "button",
4114
+ className: c,
4115
+ tabIndex: "-1",
4116
+ "aria-label": "Resize full",
4117
+ onClick: () => n(e, 1),
4118
+ children: /* @__PURE__ */ R("span", {
4119
+ className: "note-fontsize-10 text-[10px]",
4120
+ children: "100%"
4121
+ })
4122
+ }),
4123
+ /* @__PURE__ */ R("button", {
4124
+ type: "button",
4125
+ className: c,
4126
+ tabIndex: "-1",
4127
+ "aria-label": "Resize half",
4128
+ onClick: () => n(e, .5),
4129
+ children: /* @__PURE__ */ R("span", {
4130
+ className: "note-fontsize-10 text-[10px]",
4131
+ children: "50%"
4132
+ })
4133
+ }),
4134
+ /* @__PURE__ */ R("button", {
4135
+ type: "button",
4136
+ className: c,
4137
+ tabIndex: "-1",
4138
+ "aria-label": "Resize quarter",
4139
+ onClick: () => n(e, .25),
4140
+ children: /* @__PURE__ */ R("span", {
4141
+ className: "note-fontsize-10 text-[10px]",
4142
+ children: "25%"
4143
+ })
4144
+ }),
4145
+ /* @__PURE__ */ R("button", {
4146
+ type: "button",
4147
+ className: c,
4148
+ tabIndex: "-1",
4149
+ "aria-label": "Original size",
4150
+ onClick: () => n(e, "original"),
4151
+ children: /* @__PURE__ */ R("i", {
4152
+ className: `note-icon-rollback ${u}`,
4153
+ children: "↺"
4154
+ })
4155
+ })
4156
+ ]
4157
+ }),
4158
+ /* @__PURE__ */ R("div", {
4159
+ className: `${l} note-float`,
4160
+ children: [
4161
+ /* @__PURE__ */ R("button", {
4162
+ type: "button",
4163
+ className: c,
4164
+ tabIndex: "-1",
4165
+ "aria-label": "Float Left",
4166
+ onClick: () => r(e, "left"),
4167
+ children: /* @__PURE__ */ R("i", {
4168
+ className: `note-icon-float-left ${u}`,
4169
+ children: "◀"
4170
+ })
4171
+ }),
4172
+ /* @__PURE__ */ R("button", {
4173
+ type: "button",
4174
+ className: c,
4175
+ tabIndex: "-1",
4176
+ "aria-label": "Center",
4177
+ onClick: () => r(e, "center"),
4178
+ children: /* @__PURE__ */ R("i", {
4179
+ className: `note-icon-float-center ${u}`,
4180
+ children: "↔"
4181
+ })
4182
+ }),
4183
+ /* @__PURE__ */ R("button", {
4184
+ type: "button",
4185
+ className: c,
4186
+ tabIndex: "-1",
4187
+ "aria-label": "Float Right",
4188
+ onClick: () => r(e, "right"),
4189
+ children: /* @__PURE__ */ R("i", {
4190
+ className: `note-icon-float-right ${u}`,
4191
+ children: "▶"
4192
+ })
4193
+ }),
4194
+ /* @__PURE__ */ R("button", {
4195
+ type: "button",
4196
+ className: c,
4197
+ tabIndex: "-1",
4198
+ "aria-label": "Remove float",
4199
+ onClick: () => r(e, "none"),
4200
+ children: /* @__PURE__ */ R("i", {
4201
+ className: `note-icon-rollback ${u}`,
4202
+ children: "↺"
4203
+ })
4204
+ })
4205
+ ]
4206
+ }),
4207
+ /* @__PURE__ */ R("div", {
4208
+ className: `${l} note-remove`,
4209
+ children: /* @__PURE__ */ R("button", {
4210
+ type: "button",
4211
+ className: c,
4212
+ tabIndex: "-1",
4213
+ "aria-label": "Remove Image",
4214
+ onClick: () => i(e),
4215
+ children: /* @__PURE__ */ R("i", {
4216
+ className: `note-icon-trash ${u}`,
4217
+ children: "🗑"
4218
+ })
4219
+ })
4220
+ })
4221
+ ]
4222
+ })]
4223
+ });
4224
+ }
4225
+ //#endregion
4226
+ //#region src/components/shared/toolbar/ImagePopover/Hooks/useImagePopover.jsx
4227
+ function $t() {
4228
+ let [e, t] = G(null), [n, r] = G(!1);
4229
+ return K(() => {
4230
+ let e = (e) => {
4231
+ let i = e.target.closest("img");
4232
+ i ? (t(i), r(!0)) : n && (r(!1), t(null));
4233
+ }, i = (e) => {
4234
+ e.key === "Escape" && n && (r(!1), t(null));
4235
+ };
4236
+ return document.addEventListener("click", e), document.addEventListener("keydown", i), () => {
4237
+ document.removeEventListener("click", e), document.removeEventListener("keydown", i);
4238
+ };
4239
+ }, [n]), {
4240
+ target: n ? e : null,
4241
+ onClose: () => {
4242
+ r(!1), t(null);
4243
+ },
4244
+ onResize: (e, n) => {
4245
+ if (n === "original") e.style.width = "", e.style.height = "", e.removeAttribute("width"), e.removeAttribute("height");
4246
+ else {
4247
+ let t = e.naturalWidth || e.width, r = e.naturalHeight || e.height;
4248
+ e.style.width = t * n + "px", e.style.height = r * n + "px";
4249
+ }
4250
+ r(!1), t(null);
4251
+ },
4252
+ onFloat: (e, n) => {
4253
+ n === "none" ? (e.style.float = "", e.style.margin = "", e.style.display = "") : n === "center" ? (e.style.float = "none", e.style.display = "block", e.style.margin = "0 auto") : (e.style.float = n, e.style.display = "", e.style.margin = n === "left" ? "0 10px 5px 0" : "0 0 5px 10px"), r(!1), t(null);
4254
+ },
4255
+ onRemove: (e) => {
4256
+ e.parentElement.removeChild(e), r(!1), t(null);
4257
+ }
4258
+ };
4259
+ }
4260
+ //#endregion
4261
+ //#region src/components/shared/toolbar/ImagePopover/Components/index.jsx
4262
+ function en() {
4263
+ return /* @__PURE__ */ R(Qt, { ...$t() });
4264
+ }
4265
+ //#endregion
4266
+ //#region src/components/light/index.jsx
4267
+ function tn(e) {
4268
+ return {
4269
+ getHTML() {
4270
+ return e.innerHTML;
4271
+ },
4272
+ setHTML(t) {
4273
+ e.innerHTML = t;
4274
+ },
4275
+ getText() {
4276
+ return e.textContent;
4277
+ },
4278
+ getSelection() {
4279
+ let e = window.getSelection();
4280
+ return e ? e.toString() : "";
4281
+ }
4282
+ };
4283
+ }
4284
+ function nn(e) {
4285
+ let t = e.lang || "en", n = e.dir || "ltr", r = { current: null }, i = /* @__PURE__ */ R("div", {
4286
+ className: "forge-editor forge-editor--light flex flex-col w-full rounded-[3px] border border-[#ddd] bg-white box-border align-top min-h-[120px]",
4287
+ lang: t,
4288
+ dir: n,
4289
+ children: [
4290
+ /* @__PURE__ */ R(Bt, { editorRef: r }),
4291
+ /* @__PURE__ */ R("div", {
4292
+ className: "forge-editor__content flex-1 min-h-[60px] overflow-auto p-[10px] pb-12 outline-none box-border [&_blockquote]:my-2 [&_blockquote]:border-l-4 [&_blockquote]:border-[#ccc] [&_blockquote]:pl-4 [&_blockquote]:italic [&_pre]:bg-[#f4f4f4] [&_pre]:p-2 [&_pre]:rounded [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:text-xl [&_h2]:font-bold [&_h3]:text-lg [&_h3]:font-bold",
4293
+ contentEditable: "true",
4294
+ "data-placeholder": e.placeholder || ""
4295
+ }),
4296
+ /* @__PURE__ */ R(Vt, {}),
4297
+ /* @__PURE__ */ R(en, {})
4298
+ ]
4299
+ }), a = document.createElement("div");
4300
+ I(i, a);
4301
+ let o = a.firstElementChild, s = o.querySelector(".forge-editor__content");
4302
+ r.current = s, Xt(s), Zt(s);
4303
+ let c = o.querySelector(".forge-toolbar-style");
4304
+ c && Gt(c);
4305
+ let l = o.querySelector(".forge-editor__toolbar");
4306
+ l && Yt(l, t);
4307
+ let u = o.querySelector(".forge-statusbar");
4308
+ return u && Ut(u, o, { minHeight: 120 }), {
4309
+ element: o,
4310
+ ...tn(s)
4311
+ };
4312
+ }
4313
+ //#endregion
4314
+ //#region src/main/index.jsx
4315
+ function rn(e) {
4316
+ let t = l(e);
4317
+ if (t.type === "light") {
4318
+ let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } = nn(t);
4319
+ return e.innerHTML = "", e.appendChild(n), n.style.width = t.width, n.style.height = t.height, {
4320
+ element: n,
4321
+ getHTML: r,
4322
+ setHTML: i,
4323
+ getText: a,
4324
+ getSelection: o
4325
+ };
4326
+ }
4327
+ return null;
4328
+ }
4329
+ //#endregion
4330
+ //#region src/main/main.jsx
4331
+ var an = document.querySelectorAll("forge-editor"), Z = [];
4332
+ an.forEach((e) => {
4333
+ let t = rn(e);
4334
+ t && Z.push(t);
4335
+ }), window.forgeEditors = Z;
4336
+ var on = document.getElementById("get-html-btn"), sn = document.getElementById("html-output");
4337
+ on && sn && Z[0] && on.addEventListener("click", () => {
4338
+ sn.value = Z[0].getHTML();
4339
+ });
4340
+ //#endregion