/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "../../node_modules/dompurify/dist/purify.es.mjs": /*!*******************************************************!*\ !*** ../../node_modules/dompurify/dist/purify.es.mjs ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ purify) /* harmony export */ }); /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ const { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object; let { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports let { apply, construct } = typeof Reflect !== 'undefined' && Reflect; if (!freeze) { freeze = function freeze(x) { return x; }; } if (!seal) { seal = function seal(x) { return x; }; } if (!apply) { apply = function apply(fun, thisValue, args) { return fun.apply(thisValue, args); }; } if (!construct) { construct = function construct(Func, args) { return new Func(...args); }; } const arrayForEach = unapply(Array.prototype.forEach); const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf); const arrayPop = unapply(Array.prototype.pop); const arrayPush = unapply(Array.prototype.push); const arraySplice = unapply(Array.prototype.splice); const stringToLowerCase = unapply(String.prototype.toLowerCase); const stringToString = unapply(String.prototype.toString); const stringMatch = unapply(String.prototype.match); const stringReplace = unapply(String.prototype.replace); const stringIndexOf = unapply(String.prototype.indexOf); const stringTrim = unapply(String.prototype.trim); const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty); const regExpTest = unapply(RegExp.prototype.test); const typeErrorCreate = unconstruct(TypeError); /** * Creates a new function that calls the given function with a specified thisArg and arguments. * * @param func - The function to be wrapped and called. * @returns A new function that calls the given function with a specified thisArg and arguments. */ function unapply(func) { return function (thisArg) { if (thisArg instanceof RegExp) { thisArg.lastIndex = 0; } for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return apply(func, thisArg, args); }; } /** * Creates a new function that constructs an instance of the given constructor function with the provided arguments. * * @param func - The constructor function to be wrapped and called. * @returns A new function that constructs an instance of the given constructor function with the provided arguments. */ function unconstruct(func) { return function () { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return construct(func, args); }; } /** * Add properties to a lookup table * * @param set - The set to which elements will be added. * @param array - The array containing elements to be added to the set. * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set. * @returns The modified set with added elements. */ function addToSet(set, array) { let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase; if (setPrototypeOf) { // Make 'in' and truthy checks like Boolean(set.constructor) // independent of any properties defined on Object.prototype. // Prevent prototype setters from intercepting set as a this value. setPrototypeOf(set, null); } let l = array.length; while (l--) { let element = array[l]; if (typeof element === 'string') { const lcElement = transformCaseFunc(element); if (lcElement !== element) { // Config presets (e.g. tags.js, attrs.js) are immutable. if (!isFrozen(array)) { array[l] = lcElement; } element = lcElement; } } set[element] = true; } return set; } /** * Clean up an array to harden against CSPP * * @param array - The array to be cleaned. * @returns The cleaned version of the array */ function cleanArray(array) { for (let index = 0; index < array.length; index++) { const isPropertyExist = objectHasOwnProperty(array, index); if (!isPropertyExist) { array[index] = null; } } return array; } /** * Shallow clone an object * * @param object - The object to be cloned. * @returns A new object that copies the original. */ function clone(object) { const newObject = create(null); for (const [property, value] of entries(object)) { const isPropertyExist = objectHasOwnProperty(object, property); if (isPropertyExist) { if (Array.isArray(value)) { newObject[property] = cleanArray(value); } else if (value && typeof value === 'object' && value.constructor === Object) { newObject[property] = clone(value); } else { newObject[property] = value; } } } return newObject; } /** * This method automatically checks if the prop is function or getter and behaves accordingly. * * @param object - The object to look up the getter function in its prototype chain. * @param prop - The property name for which to find the getter function. * @returns The getter function found in the prototype chain or a fallback function. */ function lookupGetter(object, prop) { while (object !== null) { const desc = getOwnPropertyDescriptor(object, prop); if (desc) { if (desc.get) { return unapply(desc.get); } if (typeof desc.value === 'function') { return unapply(desc.value); } } object = getPrototypeOf(object); } function fallbackValue() { return null; } return fallbackValue; } const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. // We still need to know them so that we can do namespace // checks properly in case one wants to add them to // allow-list. const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements, // even those that we disallow by default. const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); const text = freeze(['#text']); const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']); const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); // eslint-disable-next-line unicorn/better-regex const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape ); const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex ); const DOCTYPE_NAME = seal(/^html$/i); const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i); var EXPRESSIONS = /*#__PURE__*/Object.freeze({ __proto__: null, ARIA_ATTR: ARIA_ATTR, ATTR_WHITESPACE: ATTR_WHITESPACE, CUSTOM_ELEMENT: CUSTOM_ELEMENT, DATA_ATTR: DATA_ATTR, DOCTYPE_NAME: DOCTYPE_NAME, ERB_EXPR: ERB_EXPR, IS_ALLOWED_URI: IS_ALLOWED_URI, IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA, MUSTACHE_EXPR: MUSTACHE_EXPR, TMPLIT_EXPR: TMPLIT_EXPR }); /* eslint-disable @typescript-eslint/indent */ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType const NODE_TYPE = { element: 1, attribute: 2, text: 3, cdataSection: 4, entityReference: 5, // Deprecated entityNode: 6, // Deprecated progressingInstruction: 7, comment: 8, document: 9, documentType: 10, documentFragment: 11, notation: 12 // Deprecated }; const getGlobal = function getGlobal() { return typeof window === 'undefined' ? null : window; }; /** * Creates a no-op policy for internal use only. * Don't export this function outside this module! * @param trustedTypes The policy factory. * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix). * @return The policy created (or null, if Trusted Types * are not supported or creating the policy failed). */ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) { if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') { return null; } // Allow the callers to control the unique policy name // by adding a data-tt-policy-suffix to the script element with the DOMPurify. // Policy creation with duplicate names throws in Trusted Types. let suffix = null; const ATTR_NAME = 'data-tt-policy-suffix'; if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) { suffix = purifyHostElement.getAttribute(ATTR_NAME); } const policyName = 'dompurify' + (suffix ? '#' + suffix : ''); try { return trustedTypes.createPolicy(policyName, { createHTML(html) { return html; }, createScriptURL(scriptUrl) { return scriptUrl; } }); } catch (_) { // Policy creation failed (most likely another DOMPurify script has // already run). Skip creating the policy, as this will only cause errors // if TT are enforced. console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); return null; } }; const _createHooksMap = function _createHooksMap() { return { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] }; }; function createDOMPurify() { let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); const DOMPurify = root => createDOMPurify(root); DOMPurify.version = '3.2.6'; DOMPurify.removed = []; if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) { // Not running in a browser, provide a factory function // so that you can pass your own Window DOMPurify.isSupported = false; return DOMPurify; } let { document } = window; const originalDocument = document; const currentScript = originalDocument.currentScript; const { DocumentFragment, HTMLTemplateElement, Node, Element, NodeFilter, NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap, HTMLFormElement, DOMParser, trustedTypes } = window; const ElementPrototype = Element.prototype; const cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); const remove = lookupGetter(ElementPrototype, 'remove'); const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); const getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a // new document created via createHTMLDocument. As per the spec // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) // a new empty registry is used when creating a template contents owner // document, so we use that as our parent document to ensure nothing // is inherited. if (typeof HTMLTemplateElement === 'function') { const template = document.createElement('template'); if (template.content && template.content.ownerDocument) { document = template.content.ownerDocument; } } let trustedTypesPolicy; let emptyHTML = ''; const { implementation, createNodeIterator, createDocumentFragment, getElementsByTagName } = document; const { importNode } = originalDocument; let hooks = _createHooksMap(); /** * Expose whether this browser supports running the full DOMPurify. */ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined; const { MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR, DATA_ATTR, ARIA_ATTR, IS_SCRIPT_OR_DATA, ATTR_WHITESPACE, CUSTOM_ELEMENT } = EXPRESSIONS; let { IS_ALLOWED_URI: IS_ALLOWED_URI$1 } = EXPRESSIONS; /** * We consider the elements and attributes below to be safe. Ideally * don't add any new ones but feel free to remove unwanted ones. */ /* allowed element names */ let ALLOWED_TAGS = null; const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]); /* Allowed attribute names */ let ALLOWED_ATTR = null; const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]); /* * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements. * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements) * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list) * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`. */ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, { tagNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, attributeNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, allowCustomizedBuiltInElements: { writable: true, configurable: false, enumerable: true, value: false } })); /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ let FORBID_TAGS = null; /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ let FORBID_ATTR = null; /* Decide if ARIA attributes are okay */ let ALLOW_ARIA_ATTR = true; /* Decide if custom data attributes are okay */ let ALLOW_DATA_ATTR = true; /* Decide if unknown protocols are okay */ let ALLOW_UNKNOWN_PROTOCOLS = false; /* Decide if self-closing tags in attributes are allowed. * Usually removed due to a mXSS issue in jQuery 3.0 */ let ALLOW_SELF_CLOSE_IN_ATTR = true; /* Output should be safe for common template engines. * This means, DOMPurify removes data attributes, mustaches and ERB */ let SAFE_FOR_TEMPLATES = false; /* Output should be safe even for XML used within HTML and alike. * This means, DOMPurify removes comments when containing risky content. */ let SAFE_FOR_XML = true; /* Decide if document with ... should be returned */ let WHOLE_DOCUMENT = false; /* Track whether config is already set on this instance of DOMPurify. */ let SET_CONFIG = false; /* Decide if all elements (e.g. style, script) must be children of * document.body. By default, browsers might move them to document.head */ let FORCE_BODY = false; /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported). * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead */ let RETURN_DOM = false; /* Decide if a DOM `DocumentFragment` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported) */ let RETURN_DOM_FRAGMENT = false; /* Try to return a Trusted Type object instead of a string, return a string in * case Trusted Types are not supported */ let RETURN_TRUSTED_TYPE = false; /* Output should be free from DOM clobbering attacks? * This sanitizes markups named with colliding, clobberable built-in DOM APIs. */ let SANITIZE_DOM = true; /* Achieve full DOM Clobbering protection by isolating the namespace of named * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules. * * HTML/DOM spec rules that enable DOM Clobbering: * - Named Access on Window (§7.3.3) * - DOM Tree Accessors (§3.1.5) * - Form Element Parent-Child Relations (§4.10.3) * - Iframe srcdoc / Nested WindowProxies (§4.8.5) * - HTMLCollection (§4.2.10.2) * * Namespace isolation is implemented by prefixing `id` and `name` attributes * with a constant string, i.e., `user-content-` */ let SANITIZE_NAMED_PROPS = false; const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-'; /* Keep element content when removing element? */ let KEEP_CONTENT = true; /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead * of importing it into a new Document and returning a sanitized copy */ let IN_PLACE = false; /* Allow usage of profiles like html, svg and mathMl */ let USE_PROFILES = {}; /* Tags to ignore content of when KEEP_CONTENT is true */ let FORBID_CONTENTS = null; const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); /* Tags that are safe for data: URIs */ let DATA_URI_TAGS = null; const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); /* Attributes safe for values like "javascript:" */ let URI_SAFE_ATTRIBUTES = null; const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; /* Document namespace */ let NAMESPACE = HTML_NAMESPACE; let IS_EMPTY_INPUT = false; /* Allowed XHTML+XML namespaces */ let ALLOWED_NAMESPACES = null; const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString); let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']); // Certain elements are allowed in both SVG and HTML // namespace. We need to specify them explicitly // so that they don't get erroneously deleted from // HTML namespace. const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']); /* Parsing of strict XHTML documents */ let PARSER_MEDIA_TYPE = null; const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html']; const DEFAULT_PARSER_MEDIA_TYPE = 'text/html'; let transformCaseFunc = null; /* Keep a reference to config to pass to hooks */ let CONFIG = null; /* Ideally, do not touch anything below this line */ /* ______________________________________________ */ const formElement = document.createElement('form'); const isRegexOrFunction = function isRegexOrFunction(testValue) { return testValue instanceof RegExp || testValue instanceof Function; }; /** * _parseConfig * * @param cfg optional config literal */ // eslint-disable-next-line complexity const _parseConfig = function _parseConfig() { let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (CONFIG && CONFIG === cfg) { return; } /* Shield configuration object from tampering */ if (!cfg || typeof cfg !== 'object') { cfg = {}; } /* Shield configuration object from prototype pollution */ cfg = clone(cfg); PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is. transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase; /* Set configuration parameters */ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES; URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES; DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS; FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({}); FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({}); USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false; ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false RETURN_DOM = cfg.RETURN_DOM || false; // Default false RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false FORCE_BODY = cfg.FORCE_BODY || false; // Default false SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true IN_PLACE = cfg.IN_PLACE || false; // Default false IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI; NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS; HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS; CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {}; if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; } if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; } if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') { CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; } if (SAFE_FOR_TEMPLATES) { ALLOW_DATA_ATTR = false; } if (RETURN_DOM_FRAGMENT) { RETURN_DOM = true; } /* Parse profile info */ if (USE_PROFILES) { ALLOWED_TAGS = addToSet({}, text); ALLOWED_ATTR = []; if (USE_PROFILES.html === true) { addToSet(ALLOWED_TAGS, html$1); addToSet(ALLOWED_ATTR, html); } if (USE_PROFILES.svg === true) { addToSet(ALLOWED_TAGS, svg$1); addToSet(ALLOWED_ATTR, svg); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.svgFilters === true) { addToSet(ALLOWED_TAGS, svgFilters); addToSet(ALLOWED_ATTR, svg); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.mathMl === true) { addToSet(ALLOWED_TAGS, mathMl$1); addToSet(ALLOWED_ATTR, mathMl); addToSet(ALLOWED_ATTR, xml); } } /* Merge configuration parameters */ if (cfg.ADD_TAGS) { if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { ALLOWED_TAGS = clone(ALLOWED_TAGS); } addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); } if (cfg.ADD_ATTR) { if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { ALLOWED_ATTR = clone(ALLOWED_ATTR); } addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); } if (cfg.ADD_URI_SAFE_ATTR) { addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); } if (cfg.FORBID_CONTENTS) { if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { FORBID_CONTENTS = clone(FORBID_CONTENTS); } addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); } /* Add #text in case KEEP_CONTENT is set to true */ if (KEEP_CONTENT) { ALLOWED_TAGS['#text'] = true; } /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ if (WHOLE_DOCUMENT) { addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); } /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ if (ALLOWED_TAGS.table) { addToSet(ALLOWED_TAGS, ['tbody']); delete FORBID_TAGS.tbody; } if (cfg.TRUSTED_TYPES_POLICY) { if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') { throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); } if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') { throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); } // Overwrite existing TrustedTypes policy. trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`. emptyHTML = trustedTypesPolicy.createHTML(''); } else { // Uninitialized policy, attempt to initialize the internal dompurify policy. if (trustedTypesPolicy === undefined) { trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript); } // If creating the internal policy succeeded sign internal variables. if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') { emptyHTML = trustedTypesPolicy.createHTML(''); } } // Prevent further manipulation of configuration. // Not available in IE8, Safari 5, etc. if (freeze) { freeze(cfg); } CONFIG = cfg; }; /* Keep track of all possible SVG and MathML tags * so that we can perform the namespace checks * correctly. */ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]); const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]); /** * @param element a DOM element whose namespace is being checked * @returns Return false if the element has a * namespace that a spec-compliant parser would never * return. Return true otherwise. */ const _checkValidNamespace = function _checkValidNamespace(element) { let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode // can be null. We just simulate parent in this case. if (!parent || !parent.tagName) { parent = { namespaceURI: NAMESPACE, tagName: 'template' }; } const tagName = stringToLowerCase(element.tagName); const parentTagName = stringToLowerCase(parent.tagName); if (!ALLOWED_NAMESPACES[element.namespaceURI]) { return false; } if (element.namespaceURI === SVG_NAMESPACE) { // The only way to switch from HTML namespace to SVG // is via . If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'svg'; } // The only way to switch from MathML to SVG is via` // svg if parent is either or MathML // text integration points. if (parent.namespaceURI === MATHML_NAMESPACE) { return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); } // We only allow elements that are defined in SVG // spec. All others are disallowed in SVG namespace. return Boolean(ALL_SVG_TAGS[tagName]); } if (element.namespaceURI === MATHML_NAMESPACE) { // The only way to switch from HTML namespace to MathML // is via . If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'math'; } // The only way to switch from SVG to MathML is via // and HTML integration points if (parent.namespaceURI === SVG_NAMESPACE) { return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName]; } // We only allow elements that are defined in MathML // spec. All others are disallowed in MathML namespace. return Boolean(ALL_MATHML_TAGS[tagName]); } if (element.namespaceURI === HTML_NAMESPACE) { // The only way to switch from SVG to HTML is via // HTML integration points, and from MathML to HTML // is via MathML text integration points if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { return false; } if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { return false; } // We disallow tags that are specific for MathML // or SVG and should never appear in HTML namespace return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); } // For XHTML and XML documents that support custom namespaces if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) { return true; } // The code should never reach this place (this means // that the element somehow got namespace that is not // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES). // Return false just in case. return false; }; /** * _forceRemove * * @param node a DOM node */ const _forceRemove = function _forceRemove(node) { arrayPush(DOMPurify.removed, { element: node }); try { // eslint-disable-next-line unicorn/prefer-dom-node-remove getParentNode(node).removeChild(node); } catch (_) { remove(node); } }; /** * _removeAttribute * * @param name an Attribute name * @param element a DOM node */ const _removeAttribute = function _removeAttribute(name, element) { try { arrayPush(DOMPurify.removed, { attribute: element.getAttributeNode(name), from: element }); } catch (_) { arrayPush(DOMPurify.removed, { attribute: null, from: element }); } element.removeAttribute(name); // We void attribute values for unremovable "is" attributes if (name === 'is') { if (RETURN_DOM || RETURN_DOM_FRAGMENT) { try { _forceRemove(element); } catch (_) {} } else { try { element.setAttribute(name, ''); } catch (_) {} } } }; /** * _initDocument * * @param dirty - a string of dirty markup * @return a DOM, filled with the dirty markup */ const _initDocument = function _initDocument(dirty) { /* Create a HTML document */ let doc = null; let leadingWhitespace = null; if (FORCE_BODY) { dirty = '' + dirty; } else { /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ const matches = stringMatch(dirty, /^[\r\n\t ]+/); leadingWhitespace = matches && matches[0]; } if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) { // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict) dirty = '' + dirty + ''; } const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; /* * Use the DOMParser API by default, fallback later if needs be * DOMParser not work for svg when has multiple root element. */ if (NAMESPACE === HTML_NAMESPACE) { try { doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); } catch (_) {} } /* Use createHTMLDocument in case DOMParser is not available */ if (!doc || !doc.documentElement) { doc = implementation.createDocument(NAMESPACE, 'template', null); try { doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload; } catch (_) { // Syntax error if dirtyPayload is invalid xml } } const body = doc.body || doc.documentElement; if (dirty && leadingWhitespace) { body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null); } /* Work on whole document or just its body */ if (NAMESPACE === HTML_NAMESPACE) { return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; } return WHOLE_DOCUMENT ? doc.documentElement : body; }; /** * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. * * @param root The root element or node to start traversing on. * @return The created NodeIterator */ const _createNodeIterator = function _createNodeIterator(root) { return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null); }; /** * _isClobbered * * @param element element to check for clobbering attacks * @return true if clobbered, false if safe */ const _isClobbered = function _isClobbered(element) { return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function'); }; /** * Checks whether the given object is a DOM node. * * @param value object to check whether it's a DOM node * @return true is object is a DOM node */ const _isNode = function _isNode(value) { return typeof Node === 'function' && value instanceof Node; }; function _executeHooks(hooks, currentNode, data) { arrayForEach(hooks, hook => { hook.call(DOMPurify, currentNode, data, CONFIG); }); } /** * _sanitizeElements * * @protect nodeName * @protect textContent * @protect removeChild * @param currentNode to check for permission to exist * @return true if node was killed, false if left alive */ const _sanitizeElements = function _sanitizeElements(currentNode) { let content = null; /* Execute a hook if present */ _executeHooks(hooks.beforeSanitizeElements, currentNode, null); /* Check if element is clobbered or can clobber */ if (_isClobbered(currentNode)) { _forceRemove(currentNode); return true; } /* Now let's check the element's type and name */ const tagName = transformCaseFunc(currentNode.nodeName); /* Execute a hook if present */ _executeHooks(hooks.uponSanitizeElement, currentNode, { tagName, allowedTags: ALLOWED_TAGS }); /* Detect mXSS attempts abusing namespace confusion */ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) { _forceRemove(currentNode); return true; } /* Remove any occurrence of processing instructions */ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) { _forceRemove(currentNode); return true; } /* Remove any kind of possibly harmful comments */ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) { _forceRemove(currentNode); return true; } /* Remove element if anything forbids its presence */ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { /* Check if we have a custom element to handle */ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) { if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) { return false; } if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) { return false; } } /* Keep content except for bad-listed elements */ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) { const parentNode = getParentNode(currentNode) || currentNode.parentNode; const childNodes = getChildNodes(currentNode) || currentNode.childNodes; if (childNodes && parentNode) { const childCount = childNodes.length; for (let i = childCount - 1; i >= 0; --i) { const childClone = cloneNode(childNodes[i], true); childClone.__removalCount = (currentNode.__removalCount || 0) + 1; parentNode.insertBefore(childClone, getNextSibling(currentNode)); } } } _forceRemove(currentNode); return true; } /* Check whether element has a valid namespace */ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) { _forceRemove(currentNode); return true; } /* Make sure that older browsers don't get fallback-tag mXSS */ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) { _forceRemove(currentNode); return true; } /* Sanitize element content to be template-safe */ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) { /* Get the element's text content */ content = currentNode.textContent; arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { content = stringReplace(content, expr, ' '); }); if (currentNode.textContent !== content) { arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() }); currentNode.textContent = content; } } /* Execute a hook if present */ _executeHooks(hooks.afterSanitizeElements, currentNode, null); return false; }; /** * _isValidAttribute * * @param lcTag Lowercase tag name of containing element. * @param lcName Lowercase attribute name. * @param value Attribute value. * @return Returns true if `value` is valid, otherwise false. */ // eslint-disable-next-line complexity const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) { /* Make sure attribute cannot clobber */ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) { return false; } /* Allow valid data-* attributes: At least one character after "-" (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) We don't need to check the value; it's always URI safe. */ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else { return false; } /* Check value is safe. First, is attr inert? If so, is safe */ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) { return false; } else ; return true; }; /** * _isBasicCustomElement * checks if at least one dash is included in tagName, and it's not the first char * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name * * @param tagName name of the tag of the node to sanitize * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false. */ const _isBasicCustomElement = function _isBasicCustomElement(tagName) { return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT); }; /** * _sanitizeAttributes * * @protect attributes * @protect nodeName * @protect removeAttribute * @protect setAttribute * * @param currentNode to sanitize */ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) { /* Execute a hook if present */ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null); const { attributes } = currentNode; /* Check if we have attributes; if not we might have a text node */ if (!attributes || _isClobbered(currentNode)) { return; } const hookEvent = { attrName: '', attrValue: '', keepAttr: true, allowedAttributes: ALLOWED_ATTR, forceKeepAttr: undefined }; let l = attributes.length; /* Go backwards over all attributes; safely remove bad ones */ while (l--) { const attr = attributes[l]; const { name, namespaceURI, value: attrValue } = attr; const lcName = transformCaseFunc(name); const initValue = attrValue; let value = name === 'value' ? initValue : stringTrim(initValue); /* Execute a hook if present */ hookEvent.attrName = lcName; hookEvent.attrValue = value; hookEvent.keepAttr = true; hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent); value = hookEvent.attrValue; /* Full DOM Clobbering protection via namespace isolation, * Prefix id and name attributes with `user-content-` */ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) { // Remove the attribute with this value _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value value = SANITIZE_NAMED_PROPS_PREFIX + value; } /* Work around a security issue with comments inside attributes */ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) { _removeAttribute(name, currentNode); continue; } /* Did the hooks approve of the attribute? */ if (hookEvent.forceKeepAttr) { continue; } /* Did the hooks approve of the attribute? */ if (!hookEvent.keepAttr) { _removeAttribute(name, currentNode); continue; } /* Work around a security issue in jQuery 3.0 */ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) { _removeAttribute(name, currentNode); continue; } /* Sanitize attribute content to be template-safe */ if (SAFE_FOR_TEMPLATES) { arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { value = stringReplace(value, expr, ' '); }); } /* Is `value` valid for this attribute? */ const lcTag = transformCaseFunc(currentNode.nodeName); if (!_isValidAttribute(lcTag, lcName, value)) { _removeAttribute(name, currentNode); continue; } /* Handle attributes that require Trusted Types */ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') { if (namespaceURI) ; else { switch (trustedTypes.getAttributeType(lcTag, lcName)) { case 'TrustedHTML': { value = trustedTypesPolicy.createHTML(value); break; } case 'TrustedScriptURL': { value = trustedTypesPolicy.createScriptURL(value); break; } } } } /* Handle invalid data-* attribute set by try-catching it */ if (value !== initValue) { try { if (namespaceURI) { currentNode.setAttributeNS(namespaceURI, name, value); } else { /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */ currentNode.setAttribute(name, value); } if (_isClobbered(currentNode)) { _forceRemove(currentNode); } else { arrayPop(DOMPurify.removed); } } catch (_) { _removeAttribute(name, currentNode); } } } /* Execute a hook if present */ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null); }; /** * _sanitizeShadowDOM * * @param fragment to iterate over recursively */ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) { let shadowNode = null; const shadowIterator = _createNodeIterator(fragment); /* Execute a hook if present */ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null); while (shadowNode = shadowIterator.nextNode()) { /* Execute a hook if present */ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null); /* Sanitize tags and elements */ _sanitizeElements(shadowNode); /* Check attributes next */ _sanitizeAttributes(shadowNode); /* Deep shadow DOM detected */ if (shadowNode.content instanceof DocumentFragment) { _sanitizeShadowDOM(shadowNode.content); } } /* Execute a hook if present */ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null); }; // eslint-disable-next-line complexity DOMPurify.sanitize = function (dirty) { let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let body = null; let importedNode = null; let currentNode = null; let returnNode = null; /* Make sure we have a string to sanitize. DO NOT return early, as this will return the wrong type if the user has requested a DOM object rather than a string */ IS_EMPTY_INPUT = !dirty; if (IS_EMPTY_INPUT) { dirty = ''; } /* Stringify, in case dirty is an object */ if (typeof dirty !== 'string' && !_isNode(dirty)) { if (typeof dirty.toString === 'function') { dirty = dirty.toString(); if (typeof dirty !== 'string') { throw typeErrorCreate('dirty is not a string, aborting'); } } else { throw typeErrorCreate('toString is not a function'); } } /* Return dirty HTML if DOMPurify cannot run */ if (!DOMPurify.isSupported) { return dirty; } /* Assign config vars */ if (!SET_CONFIG) { _parseConfig(cfg); } /* Clean up removed elements */ DOMPurify.removed = []; /* Check if dirty is correctly typed for IN_PLACE */ if (typeof dirty === 'string') { IN_PLACE = false; } if (IN_PLACE) { /* Do some early pre-sanitization to avoid unsafe root nodes */ if (dirty.nodeName) { const tagName = transformCaseFunc(dirty.nodeName); if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place'); } } } else if (dirty instanceof Node) { /* If dirty is a DOM element, append to an empty document to avoid elements being stripped by the parser */ body = _initDocument(''); importedNode = body.ownerDocument.importNode(dirty, true); if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') { /* Node is already a body, use as is */ body = importedNode; } else if (importedNode.nodeName === 'HTML') { body = importedNode; } else { // eslint-disable-next-line unicorn/prefer-dom-node-append body.appendChild(importedNode); } } else { /* Exit directly if we have nothing to do */ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes dirty.indexOf('<') === -1) { return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty; } /* Initialize the document to work on */ body = _initDocument(dirty); /* Check we have a DOM node from the data */ if (!body) { return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : ''; } } /* Remove first element node (ours) if FORCE_BODY is set */ if (body && FORCE_BODY) { _forceRemove(body.firstChild); } /* Get node iterator */ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body); /* Now start iterating over the created document */ while (currentNode = nodeIterator.nextNode()) { /* Sanitize tags and elements */ _sanitizeElements(currentNode); /* Check attributes next */ _sanitizeAttributes(currentNode); /* Shadow DOM detected, sanitize it */ if (currentNode.content instanceof DocumentFragment) { _sanitizeShadowDOM(currentNode.content); } } /* If we sanitized `dirty` in-place, return it. */ if (IN_PLACE) { return dirty; } /* Return sanitized string or DOM */ if (RETURN_DOM) { if (RETURN_DOM_FRAGMENT) { returnNode = createDocumentFragment.call(body.ownerDocument); while (body.firstChild) { // eslint-disable-next-line unicorn/prefer-dom-node-append returnNode.appendChild(body.firstChild); } } else { returnNode = body; } if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) { /* AdoptNode() is not used because internal state is not reset (e.g. the past names map of a HTMLFormElement), this is safe in theory but we would rather not risk another attack vector. The state that is cloned by importNode() is explicitly defined by the specs. */ returnNode = importNode.call(originalDocument, returnNode, true); } return returnNode; } let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; /* Serialize doctype if allowed */ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) { serializedHTML = '\n' + serializedHTML; } /* Sanitize final string template-safe */ if (SAFE_FOR_TEMPLATES) { arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { serializedHTML = stringReplace(serializedHTML, expr, ' '); }); } return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML; }; DOMPurify.setConfig = function () { let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _parseConfig(cfg); SET_CONFIG = true; }; DOMPurify.clearConfig = function () { CONFIG = null; SET_CONFIG = false; }; DOMPurify.isValidAttribute = function (tag, attr, value) { /* Initialize shared config vars if necessary. */ if (!CONFIG) { _parseConfig({}); } const lcTag = transformCaseFunc(tag); const lcName = transformCaseFunc(attr); return _isValidAttribute(lcTag, lcName, value); }; DOMPurify.addHook = function (entryPoint, hookFunction) { if (typeof hookFunction !== 'function') { return; } arrayPush(hooks[entryPoint], hookFunction); }; DOMPurify.removeHook = function (entryPoint, hookFunction) { if (hookFunction !== undefined) { const index = arrayLastIndexOf(hooks[entryPoint], hookFunction); return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0]; } return arrayPop(hooks[entryPoint]); }; DOMPurify.removeHooks = function (entryPoint) { hooks[entryPoint] = []; }; DOMPurify.removeAllHooks = function () { hooks = _createHooksMap(); }; return DOMPurify; } var purify = createDOMPurify(); //# sourceMappingURL=purify.es.mjs.map /***/ }), /***/ "../utils/helpers.js": /*!***************************!*\ !*** ../utils/helpers.js ***! \***************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ classNames: () => (/* binding */ classNames), /* harmony export */ debounce: () => (/* binding */ debounce), /* harmony export */ getAstraProTitle: () => (/* binding */ getAstraProTitle), /* harmony export */ getAstraProTitleFreePage: () => (/* binding */ getAstraProTitleFreePage), /* harmony export */ getSpinner: () => (/* binding */ getSpinner), /* harmony export */ handleGetAstraPro: () => (/* binding */ handleGetAstraPro), /* harmony export */ saveSetting: () => (/* binding */ saveSetting) /* harmony export */ }); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dompurify */ "../../node_modules/dompurify/dist/purify.es.mjs"); /** * Returns the class names. * * @param {...string} classes The class names. * * @return {string} Returns the class names. */ const classNames = (...classes) => classes.filter(Boolean).join(' '); /** * Handles the Astra Pro CTA button click event, opening the upgrade URL in a new tab. * This function also handles the display of a spinner during the upgrade process. * * @param {Event} e - The event object. * @param {Object} options - Options for the upgrade process. * @param {string} options.url - The URL for the upgrade. * @param {string} options.campaign - The UTM campaign parameter. * @param {boolean} options.disableSpinner - Optional. Disables the spinner if true. * @param {string} options.spinnerPosition - Optional. The position of the spinner. */ const handleGetAstraPro = (e, { url = astra_admin.upgrade_url, campaign = '', disableSpinner = false, spinnerPosition = 'right' } = {}) => { e.preventDefault(); e.stopPropagation(); if (!astra_admin.pro_installed_status) { // If a custom campaign is provided, modify the URL if (campaign) { const urlObj = new URL(url); urlObj.searchParams.set('utm_campaign', campaign); url = urlObj.toString(); } window.open(url, '_blank'); return; } const spinnerHTML = disableSpinner ? '' : getSpinner(); const buttonHTML = spinnerPosition === 'right' ? `${astra_admin.plugin_activating_text}${spinnerHTML}` : `${spinnerHTML}${astra_admin.plugin_activating_text}`; e.target.innerHTML = dompurify__WEBPACK_IMPORTED_MODULE_2__["default"].sanitize(buttonHTML); e.target.disabled = true; const formData = new window.FormData(); formData.append('action', 'astra_recommended_plugin_activate'); formData.append('security', astra_admin.plugin_manager_nonce); formData.append('init', 'astra-addon/astra-addon.php'); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ url: astra_admin.ajax_url, method: 'POST', body: formData }).then(data => { if (data.success) { window.open(astra_admin.astra_base_url, '_self'); return; } }).catch(error => { e.target.innerText = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activation failed. Please try again.', 'astra'); e.target.disabled = false; console.error('Error during API request:', error); // Optionally, notify the user about the error or handle it appropriately. }); }; /** * Creates a debounced function that delays its execution until after the specified delay. * * The debounce() function can also be used from lodash.debounce package in future. * * @param {Function} func - The function to debounce. * @param {number} delay - The delay in milliseconds before the function is executed. * * @returns {Function} A debounced function. */ const debounce = (func, delay) => { let timer; function debounced(...args) { clearTimeout(timer); timer = setTimeout(() => func(...args), delay); } // Attach a `cancel` method to clear the timeout. debounced.cancel = () => { clearTimeout(timer); }; return debounced; }; /** * Returns the Astra Pro title. * * @return {string} Returns the Astra Pro title. */ const getAstraProTitle = () => { return astra_admin.pro_installed_status ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activate Now', 'astra') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Upgrade Now', 'astra'); }; /** * Returns the Astra Pro title. * * @return {string} Returns the Astra Pro title. */ const getAstraProTitleFreePage = () => { return astra_admin.pro_installed_status ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activate Now', 'astra') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('See all Astra Pro Features', 'astra'); }; /** * Returns the spinner SVG text. * * @return {string} Returns the spinner SVG text.. */ const getSpinner = () => { return ` `; }; /** * A function to save astra admin settings. * * @function * * @param {string} key - Settings key. * @param {string} value - The data to send. * @param {Function} dispatch - The dispatch function. * @param {Object} abortControllerRef - The ref object with to hold abort controller. * * @return {Promise} Returns a promise representing the processed request. */ const saveSetting = debounce(({ action = 'astra_update_admin_setting', security = astra_admin.update_nonce, key = '', value }, dispatch, abortControllerRef = { current: {} }) => { // Abort any previous request. if (abortControllerRef.current[key]) { abortControllerRef.current[key]?.abort(); } // Create a new AbortController. const abortController = new AbortController(); abortControllerRef.current[key] = abortController; const formData = new window.FormData(); formData.append('action', action); formData.append('security', security); formData.append('key', key); formData.append('value', value); return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ url: astra_admin.ajax_url, method: 'POST', body: formData, signal: abortControllerRef.current[key]?.signal // Pass the signal to the fetch request. }).then(() => { dispatch({ type: 'UPDATE_SETTINGS_SAVED_NOTIFICATION', payload: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Successfully saved!', 'astra') }); }).catch(error => { // Ignore if it is intentionally aborted. if (error.name === 'AbortError') { return; } console.error('Error during API request:', error); dispatch({ type: 'UPDATE_SETTINGS_SAVED_NOTIFICATION', payload: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('An error occurred while saving.', 'astra') }); }); }, 300); /***/ }), /***/ "./node_modules/@bsf/force-ui/dist/_commonjsHelpers-DaMA6jEr.js": /*!**********************************************************************!*\ !*** ./node_modules/@bsf/force-ui/dist/_commonjsHelpers-DaMA6jEr.js ***! \**********************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ c: () => (/* binding */ o), /* harmony export */ g: () => (/* binding */ l) /* harmony export */ }); var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function l(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } /***/ }), /***/ "./node_modules/@bsf/force-ui/dist/force-ui.js": /*!*****************************************************!*\ !*** ./node_modules/@bsf/force-ui/dist/force-ui.js ***! \*****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { var react__WEBPACK_IMPORTED_MODULE_1___namespace_cache; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Accordion: () => (/* binding */ ake), /* harmony export */ Alert: () => (/* binding */ nke), /* harmony export */ AreaChart: () => (/* binding */ uke), /* harmony export */ Avatar: () => (/* binding */ GEe), /* harmony export */ Badge: () => (/* binding */ mg), /* harmony export */ BarChart: () => (/* binding */ ske), /* harmony export */ Breadcrumb: () => (/* binding */ Xs), /* harmony export */ Button: () => (/* binding */ Hn), /* harmony export */ ButtonGroup: () => (/* binding */ XEe), /* harmony export */ Checkbox: () => (/* binding */ Jw), /* harmony export */ Container: () => (/* binding */ kR), /* harmony export */ DatePicker: () => (/* binding */ oke), /* harmony export */ Dialog: () => (/* binding */ Xo), /* harmony export */ Drawer: () => (/* binding */ Jo), /* harmony export */ DropdownMenu: () => (/* binding */ Js), /* harmony export */ Dropzone: () => (/* binding */ FEe), /* harmony export */ EditorInput: () => (/* binding */ UQ), /* harmony export */ HamburgerMenu: () => (/* binding */ zg), /* harmony export */ Input: () => (/* binding */ fY), /* harmony export */ Label: () => (/* binding */ to), /* harmony export */ LineChart: () => (/* binding */ lke), /* harmony export */ Loader: () => (/* binding */ d1), /* harmony export */ Menu: () => (/* binding */ Ha), /* harmony export */ Pagination: () => (/* binding */ Fc), /* harmony export */ PieChart: () => (/* binding */ cke), /* harmony export */ ProgressBar: () => (/* binding */ qEe), /* harmony export */ ProgressSteps: () => (/* binding */ qQ), /* harmony export */ RadioButton: () => (/* binding */ KEe), /* harmony export */ SearchBox: () => (/* binding */ Zo), /* harmony export */ Select: () => (/* binding */ QEe), /* harmony export */ Sidebar: () => (/* binding */ ike), /* harmony export */ Skeleton: () => (/* binding */ rke), /* harmony export */ Switch: () => (/* binding */ J$), /* harmony export */ Table: () => (/* binding */ ol), /* harmony export */ Tabs: () => (/* binding */ K1), /* harmony export */ TextArea: () => (/* binding */ cY), /* harmony export */ Title: () => (/* binding */ YEe), /* harmony export */ Toaster: () => (/* binding */ tke), /* harmony export */ Tooltip: () => (/* binding */ f1), /* harmony export */ Topbar: () => (/* binding */ _d), /* harmony export */ toast: () => (/* binding */ eke) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var _commonjsHelpers_DaMA6jEr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_commonjsHelpers-DaMA6jEr.js */ "./node_modules/@bsf/force-ui/dist/_commonjsHelpers-DaMA6jEr.js"); "use client"; var nH = Object.defineProperty; var pT = (e) => { throw TypeError(e); }; var rH = (e, t, n) => t in e ? nH(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var ha = (e, t, n) => rH(e, typeof t != "symbol" ? t + "" : t, n), mT = (e, t, n) => t.has(e) || pT("Cannot " + n); var Dr = (e, t, n) => (mT(e, t, "read from private field"), n ? n.call(e) : t.get(e)), zv = (e, t, n) => t.has(e) ? pT("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), as = (e, t, n, r) => (mT(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n); const qw = "-", sH = (e) => { const t = cH(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e; return { getClassGroupId: (a) => { const s = a.split(qw); return s[0] === "" && s.length !== 1 && s.shift(), K$(s, t) || lH(a); }, getConflictingClassGroupIds: (a, s) => { const l = n[a] || []; return s && r[a] ? [...l, ...r[a]] : l; } }; }, K$ = (e, t) => { var a; if (e.length === 0) return t.classGroupId; const n = e[0], r = t.nextPart.get(n), i = r ? K$(e.slice(1), r) : void 0; if (i) return i; if (t.validators.length === 0) return; const o = e.join(qw); return (a = t.validators.find(({ validator: s }) => s(o))) == null ? void 0 : a.classGroupId; }, gT = /^\[(.+)\]$/, lH = (e) => { if (gT.test(e)) { const t = gT.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (n) return "arbitrary.." + n; } }, cH = (e) => { const { theme: t, prefix: n } = e, r = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return fH(Object.entries(e.classGroups), n).forEach(([o, a]) => { u0(a, r, o, t); }), r; }, u0 = (e, t, n, r) => { e.forEach((i) => { if (typeof i == "string") { const o = i === "" ? t : yT(t, i); o.classGroupId = n; return; } if (typeof i == "function") { if (uH(i)) { u0(i(r), t, n, r); return; } t.validators.push({ validator: i, classGroupId: n }); return; } Object.entries(i).forEach(([o, a]) => { u0(a, yT(t, o), n, r); }); }); }, yT = (e, t) => { let n = e; return t.split(qw).forEach((r) => { n.nextPart.has(r) || n.nextPart.set(r, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), n = n.nextPart.get(r); }), n; }, uH = (e) => e.isThemeGetter, fH = (e, t) => t ? e.map(([n, r]) => { const i = r.map((o) => typeof o == "string" ? t + o : typeof o == "object" ? Object.fromEntries(Object.entries(o).map(([a, s]) => [t + a, s])) : o); return [n, i]; }) : e, dH = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); const i = (o, a) => { n.set(o, a), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); }; return { get(o) { let a = n.get(o); if (a !== void 0) return a; if ((a = r.get(o)) !== void 0) return i(o, a), a; }, set(o, a) { n.has(o) ? n.set(o, a) : i(o, a); } }; }, G$ = "!", hH = (e) => { const { separator: t, experimentalParseClassName: n } = e, r = t.length === 1, i = t[0], o = t.length, a = (s) => { const l = []; let c = 0, f = 0, d; for (let v = 0; v < s.length; v++) { let x = s[v]; if (c === 0) { if (x === i && (r || s.slice(v, v + o) === t)) { l.push(s.slice(f, v)), f = v + o; continue; } if (x === "/") { d = v; continue; } } x === "[" ? c++ : x === "]" && c--; } const p = l.length === 0 ? s : s.substring(f), m = p.startsWith(G$), y = m ? p.substring(1) : p, g = d && d > f ? d - f : void 0; return { modifiers: l, hasImportantModifier: m, baseClassName: y, maybePostfixModifierPosition: g }; }; return n ? (s) => n({ className: s, parseClassName: a }) : a; }, pH = (e) => { if (e.length <= 1) return e; const t = []; let n = []; return e.forEach((r) => { r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r); }), t.push(...n.sort()), t; }, mH = (e) => ({ cache: dH(e.cacheSize), parseClassName: hH(e), ...sH(e) }), gH = /\s+/, yH = (e, t) => { const { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i } = t, o = [], a = e.trim().split(gH); let s = ""; for (let l = a.length - 1; l >= 0; l -= 1) { const c = a[l], { modifiers: f, hasImportantModifier: d, baseClassName: p, maybePostfixModifierPosition: m } = n(c); let y = !!m, g = r(y ? p.substring(0, m) : p); if (!g) { if (!y) { s = c + (s.length > 0 ? " " + s : s); continue; } if (g = r(p), !g) { s = c + (s.length > 0 ? " " + s : s); continue; } y = !1; } const v = pH(f).join(":"), x = d ? v + G$ : v, w = x + g; if (o.includes(w)) continue; o.push(w); const S = i(g, y); for (let A = 0; A < S.length; ++A) { const _ = S[A]; o.push(x + _); } s = c + (s.length > 0 ? " " + s : s); } return s; }; function vH() { let e = 0, t, n, r = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (n = Y$(t)) && (r && (r += " "), r += n); return r; } const Y$ = (e) => { if (typeof e == "string") return e; let t, n = ""; for (let r = 0; r < e.length; r++) e[r] && (t = Y$(e[r])) && (n && (n += " "), n += t); return n; }; function bH(e, ...t) { let n, r, i, o = a; function a(l) { const c = t.reduce((f, d) => d(f), e()); return n = mH(c), r = n.cache.get, i = n.cache.set, o = s, s(l); } function s(l) { const c = r(l); if (c) return c; const f = yH(l, n); return i(l, f), f; } return function() { return o(vH.apply(null, arguments)); }; } const Wt = (e) => { const t = (n) => n[e] || []; return t.isThemeGetter = !0, t; }, q$ = /^\[(?:([a-z-]+):)?(.+)\]$/i, xH = /^\d+\/\d+$/, wH = /* @__PURE__ */ new Set(["px", "full", "screen"]), _H = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, SH = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, OH = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, AH = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, TH = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, bo = (e) => Vl(e) || wH.has(e) || xH.test(e), pa = (e) => Nc(e, "length", DH), Vl = (e) => !!e && !Number.isNaN(Number(e)), Vv = (e) => Nc(e, "number", Vl), bu = (e) => !!e && Number.isInteger(Number(e)), PH = (e) => e.endsWith("%") && Vl(e.slice(0, -1)), Je = (e) => q$.test(e), ma = (e) => _H.test(e), CH = /* @__PURE__ */ new Set(["length", "size", "percentage"]), EH = (e) => Nc(e, CH, X$), kH = (e) => Nc(e, "position", X$), MH = /* @__PURE__ */ new Set(["image", "url"]), NH = (e) => Nc(e, MH, RH), $H = (e) => Nc(e, "", IH), xu = () => !0, Nc = (e, t, n) => { const r = q$.exec(e); return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; }, DH = (e) => ( // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. SH.test(e) && !OH.test(e) ), X$ = () => !1, IH = (e) => AH.test(e), RH = (e) => TH.test(e), jH = () => { const e = Wt("colors"), t = Wt("spacing"), n = Wt("blur"), r = Wt("brightness"), i = Wt("borderColor"), o = Wt("borderRadius"), a = Wt("borderSpacing"), s = Wt("borderWidth"), l = Wt("contrast"), c = Wt("grayscale"), f = Wt("hueRotate"), d = Wt("invert"), p = Wt("gap"), m = Wt("gradientColorStops"), y = Wt("gradientColorStopPositions"), g = Wt("inset"), v = Wt("margin"), x = Wt("opacity"), w = Wt("padding"), S = Wt("saturate"), A = Wt("scale"), _ = Wt("sepia"), O = Wt("skew"), P = Wt("space"), C = Wt("translate"), k = () => ["auto", "contain", "none"], I = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", Je, t], N = () => [Je, t], D = () => ["", bo, pa], j = () => ["auto", Vl, Je], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], W = () => ["solid", "dashed", "dotted", "double", "none"], z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], H = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", Je], V = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [Vl, Je]; return { cacheSize: 500, separator: ":", theme: { colors: [xu], spacing: [bo, pa], blur: ["none", "", ma, Je], brightness: Y(), borderColor: [e], borderRadius: ["none", "", "full", ma, Je], borderSpacing: N(), borderWidth: D(), contrast: Y(), grayscale: U(), hueRotate: Y(), invert: U(), gap: N(), gradientColorStops: [e], gradientColorStopPositions: [PH, pa], inset: $(), margin: $(), opacity: Y(), padding: N(), saturate: Y(), scale: Y(), sepia: U(), skew: Y(), space: N(), translate: N() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", Je] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [ma] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": V() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": V() }], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ "break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ "box-decoration": [{ "box-decoration": ["slice", "clone"] }], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [{ box: ["border", "content"] }], /** * Display * @see https://tailwindcss.com/docs/display */ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [{ float: ["right", "left", "none", "start", "end"] }], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [{ clear: ["left", "right", "both", "none", "start", "end"] }], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: ["isolate", "isolation-auto"], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ "object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ "object-position": [{ object: [...F(), Je] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: I() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": I() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": I() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: k() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": k() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": k() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ["static", "fixed", "absolute", "relative", "sticky"], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: [g] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [g] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [g] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [g] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [g] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [g] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [g] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [g] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [g] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", bu, Je] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: $() }], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ "flex-wrap": [{ flex: ["wrap", "wrap-reverse", "nowrap"] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: ["1", "auto", "initial", "none", Je] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: U() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: U() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", bu, Je] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [xu] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", bu, Je] }, Je] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": j() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": j() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [xu] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [bu, Je] }, Je] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": j() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": j() }], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ "auto-cols": [{ "auto-cols": ["auto", "min", "max", "fr", Je] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", Je] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [p] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [p] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [p] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...H()] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ "justify-items": [{ "justify-items": ["start", "end", "center", "stretch"] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ "justify-self": [{ "justify-self": ["auto", "start", "end", "center", "stretch"] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ "align-content": [{ content: ["normal", ...H(), "baseline"] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ "align-items": [{ items: ["start", "end", "center", "baseline", "stretch"] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ "align-self": [{ self: ["auto", "start", "end", "center", "stretch", "baseline"] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ "place-content": [{ "place-content": [...H(), "baseline"] }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ "place-items": [{ "place-items": ["start", "end", "center", "baseline", "stretch"] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ "place-self": [{ "place-self": ["auto", "start", "end", "center", "stretch"] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: [w] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [w] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [w] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [w] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [w] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [w] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [w] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [w] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [w] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [v] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [v] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [v] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [v] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [v] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [v] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [v] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [v] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [v] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [P] }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/space */ "space-x-reverse": ["space-x-reverse"], /** * Space Between Y * @see https://tailwindcss.com/docs/space */ "space-y": [{ "space-y": [P] }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/space */ "space-y-reverse": ["space-y-reverse"], // Sizing /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", Je, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [Je, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [Je, t, "none", "full", "min", "max", "fit", "prose", { screen: [ma] }, ma] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [Je, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [Je, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [Je, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [Je, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", ma, pa] }], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ "font-smoothing": ["antialiased", "subpixel-antialiased"], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ "font-style": ["italic", "not-italic"], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ "font-weight": [{ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Vv] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [xu] }], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-normal": ["normal-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-ordinal": ["ordinal"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-slashed-zero": ["slashed-zero"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-figure": ["lining-nums", "oldstyle-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-spacing": ["proportional-nums", "tabular-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-fraction": ["diagonal-fractions", "stacked-fractons"], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [{ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", Je] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", Vl, Vv] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", bo, Je] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", Je] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", Je] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ "list-style-position": [{ list: ["inside", "outside"] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ "placeholder-color": [{ placeholder: [e] }], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ "placeholder-opacity": [{ "placeholder-opacity": [x] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ "text-color": [{ text: [e] }], /** * Text Opacity * @see https://tailwindcss.com/docs/text-opacity */ "text-opacity": [{ "text-opacity": [x] }], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ "text-decoration": ["underline", "overline", "line-through", "no-underline"], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ "text-decoration-style": [{ decoration: [...W(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: ["auto", "from-font", bo, pa] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": ["auto", bo, Je] }], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ "text-decoration-color": [{ decoration: [e] }], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ "text-overflow": ["truncate", "text-ellipsis", "text-clip"], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [{ indent: N() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", Je] }], /** * Whitespace * @see https://tailwindcss.com/docs/whitespace */ whitespace: [{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }], /** * Word Break * @see https://tailwindcss.com/docs/word-break */ break: [{ break: ["normal", "words", "all", "keep"] }], /** * Hyphens * @see https://tailwindcss.com/docs/hyphens */ hyphens: [{ hyphens: ["none", "manual", "auto"] }], /** * Content * @see https://tailwindcss.com/docs/content */ content: [{ content: ["none", Je] }], // Backgrounds /** * Background Attachment * @see https://tailwindcss.com/docs/background-attachment */ "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }], /** * Background Clip * @see https://tailwindcss.com/docs/background-clip */ "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }], /** * Background Opacity * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/background-opacity */ "bg-opacity": [{ "bg-opacity": [x] }], /** * Background Origin * @see https://tailwindcss.com/docs/background-origin */ "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }], /** * Background Position * @see https://tailwindcss.com/docs/background-position */ "bg-position": [{ bg: [...F(), kH] }], /** * Background Repeat * @see https://tailwindcss.com/docs/background-repeat */ "bg-repeat": [{ bg: ["no-repeat", { repeat: ["", "x", "y", "round", "space"] }] }], /** * Background Size * @see https://tailwindcss.com/docs/background-size */ "bg-size": [{ bg: ["auto", "cover", "contain", EH] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ "bg-image": [{ bg: ["none", { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, NH] }], /** * Background Color * @see https://tailwindcss.com/docs/background-color */ "bg-color": [{ bg: [e] }], /** * Gradient Color Stops From Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from-pos": [{ from: [y] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via-pos": [{ via: [y] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to-pos": [{ to: [y] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from": [{ from: [m] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via": [{ via: [m] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to": [{ to: [m] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [o] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-s": [{ "rounded-s": [o] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ "rounded-e": [{ "rounded-e": [o] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ "rounded-t": [{ "rounded-t": [o] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-r": [{ "rounded-r": [o] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ "rounded-b": [{ "rounded-b": [o] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-l": [{ "rounded-l": [o] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-ss": [{ "rounded-ss": [o] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ "rounded-se": [{ "rounded-se": [o] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ "rounded-ee": [{ "rounded-ee": [o] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-es": [{ "rounded-es": [o] }], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-tl": [{ "rounded-tl": [o] }], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-tr": [{ "rounded-tr": [o] }], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-br": [{ "rounded-br": [o] }], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-bl": [{ "rounded-bl": [o] }], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ "border-w": [{ border: [s] }], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ "border-w-x": [{ "border-x": [s] }], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ "border-w-y": [{ "border-y": [s] }], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ "border-w-s": [{ "border-s": [s] }], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ "border-w-e": [{ "border-e": [s] }], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ "border-w-t": [{ "border-t": [s] }], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ "border-w-r": [{ "border-r": [s] }], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ "border-w-b": [{ "border-b": [s] }], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ "border-w-l": [{ "border-l": [s] }], /** * Border Opacity * @see https://tailwindcss.com/docs/border-opacity */ "border-opacity": [{ "border-opacity": [x] }], /** * Border Style * @see https://tailwindcss.com/docs/border-style */ "border-style": [{ border: [...W(), "hidden"] }], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ "divide-x": [{ "divide-x": [s] }], /** * Divide Width X Reverse * @see https://tailwindcss.com/docs/divide-width */ "divide-x-reverse": ["divide-x-reverse"], /** * Divide Width Y * @see https://tailwindcss.com/docs/divide-width */ "divide-y": [{ "divide-y": [s] }], /** * Divide Width Y Reverse * @see https://tailwindcss.com/docs/divide-width */ "divide-y-reverse": ["divide-y-reverse"], /** * Divide Opacity * @see https://tailwindcss.com/docs/divide-opacity */ "divide-opacity": [{ "divide-opacity": [x] }], /** * Divide Style * @see https://tailwindcss.com/docs/divide-style */ "divide-style": [{ divide: W() }], /** * Border Color * @see https://tailwindcss.com/docs/border-color */ "border-color": [{ border: [i] }], /** * Border Color X * @see https://tailwindcss.com/docs/border-color */ "border-color-x": [{ "border-x": [i] }], /** * Border Color Y * @see https://tailwindcss.com/docs/border-color */ "border-color-y": [{ "border-y": [i] }], /** * Border Color S * @see https://tailwindcss.com/docs/border-color */ "border-color-s": [{ "border-s": [i] }], /** * Border Color E * @see https://tailwindcss.com/docs/border-color */ "border-color-e": [{ "border-e": [i] }], /** * Border Color Top * @see https://tailwindcss.com/docs/border-color */ "border-color-t": [{ "border-t": [i] }], /** * Border Color Right * @see https://tailwindcss.com/docs/border-color */ "border-color-r": [{ "border-r": [i] }], /** * Border Color Bottom * @see https://tailwindcss.com/docs/border-color */ "border-color-b": [{ "border-b": [i] }], /** * Border Color Left * @see https://tailwindcss.com/docs/border-color */ "border-color-l": [{ "border-l": [i] }], /** * Divide Color * @see https://tailwindcss.com/docs/divide-color */ "divide-color": [{ divide: [i] }], /** * Outline Style * @see https://tailwindcss.com/docs/outline-style */ "outline-style": [{ outline: ["", ...W()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ "outline-offset": [{ "outline-offset": [bo, Je] }], /** * Outline Width * @see https://tailwindcss.com/docs/outline-width */ "outline-w": [{ outline: [bo, pa] }], /** * Outline Color * @see https://tailwindcss.com/docs/outline-color */ "outline-color": [{ outline: [e] }], /** * Ring Width * @see https://tailwindcss.com/docs/ring-width */ "ring-w": [{ ring: D() }], /** * Ring Width Inset * @see https://tailwindcss.com/docs/ring-width */ "ring-w-inset": ["ring-inset"], /** * Ring Color * @see https://tailwindcss.com/docs/ring-color */ "ring-color": [{ ring: [e] }], /** * Ring Opacity * @see https://tailwindcss.com/docs/ring-opacity */ "ring-opacity": [{ "ring-opacity": [x] }], /** * Ring Offset Width * @see https://tailwindcss.com/docs/ring-offset-width */ "ring-offset-w": [{ "ring-offset": [bo, pa] }], /** * Ring Offset Color * @see https://tailwindcss.com/docs/ring-offset-color */ "ring-offset-color": [{ "ring-offset": [e] }], // Effects /** * Box Shadow * @see https://tailwindcss.com/docs/box-shadow */ shadow: [{ shadow: ["", "inner", "none", ma, $H] }], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow-color */ "shadow-color": [{ shadow: [xu] }], /** * Opacity * @see https://tailwindcss.com/docs/opacity */ opacity: [{ opacity: [x] }], /** * Mix Blend Mode * @see https://tailwindcss.com/docs/mix-blend-mode */ "mix-blend": [{ "mix-blend": [...z(), "plus-lighter", "plus-darker"] }], /** * Background Blend Mode * @see https://tailwindcss.com/docs/background-blend-mode */ "bg-blend": [{ "bg-blend": z() }], // Filters /** * Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/filter */ filter: [{ filter: ["", "none"] }], /** * Blur * @see https://tailwindcss.com/docs/blur */ blur: [{ blur: [n] }], /** * Brightness * @see https://tailwindcss.com/docs/brightness */ brightness: [{ brightness: [r] }], /** * Contrast * @see https://tailwindcss.com/docs/contrast */ contrast: [{ contrast: [l] }], /** * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ "drop-shadow": [{ "drop-shadow": ["", "none", ma, Je] }], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale */ grayscale: [{ grayscale: [c] }], /** * Hue Rotate * @see https://tailwindcss.com/docs/hue-rotate */ "hue-rotate": [{ "hue-rotate": [f] }], /** * Invert * @see https://tailwindcss.com/docs/invert */ invert: [{ invert: [d] }], /** * Saturate * @see https://tailwindcss.com/docs/saturate */ saturate: [{ saturate: [S] }], /** * Sepia * @see https://tailwindcss.com/docs/sepia */ sepia: [{ sepia: [_] }], /** * Backdrop Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/backdrop-filter */ "backdrop-filter": [{ "backdrop-filter": ["", "none"] }], /** * Backdrop Blur * @see https://tailwindcss.com/docs/backdrop-blur */ "backdrop-blur": [{ "backdrop-blur": [n] }], /** * Backdrop Brightness * @see https://tailwindcss.com/docs/backdrop-brightness */ "backdrop-brightness": [{ "backdrop-brightness": [r] }], /** * Backdrop Contrast * @see https://tailwindcss.com/docs/backdrop-contrast */ "backdrop-contrast": [{ "backdrop-contrast": [l] }], /** * Backdrop Grayscale * @see https://tailwindcss.com/docs/backdrop-grayscale */ "backdrop-grayscale": [{ "backdrop-grayscale": [c] }], /** * Backdrop Hue Rotate * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [f] }], /** * Backdrop Invert * @see https://tailwindcss.com/docs/backdrop-invert */ "backdrop-invert": [{ "backdrop-invert": [d] }], /** * Backdrop Opacity * @see https://tailwindcss.com/docs/backdrop-opacity */ "backdrop-opacity": [{ "backdrop-opacity": [x] }], /** * Backdrop Saturate * @see https://tailwindcss.com/docs/backdrop-saturate */ "backdrop-saturate": [{ "backdrop-saturate": [S] }], /** * Backdrop Sepia * @see https://tailwindcss.com/docs/backdrop-sepia */ "backdrop-sepia": [{ "backdrop-sepia": [_] }], // Tables /** * Border Collapse * @see https://tailwindcss.com/docs/border-collapse */ "border-collapse": [{ border: ["collapse", "separate"] }], /** * Border Spacing * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing": [{ "border-spacing": [a] }], /** * Border Spacing X * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-x": [{ "border-spacing-x": [a] }], /** * Border Spacing Y * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-y": [{ "border-spacing-y": [a] }], /** * Table Layout * @see https://tailwindcss.com/docs/table-layout */ "table-layout": [{ table: ["auto", "fixed"] }], /** * Caption Side * @see https://tailwindcss.com/docs/caption-side */ caption: [{ caption: ["top", "bottom"] }], // Transitions and Animation /** * Tranisition Property * @see https://tailwindcss.com/docs/transition-property */ transition: [{ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", Je] }], /** * Transition Duration * @see https://tailwindcss.com/docs/transition-duration */ duration: [{ duration: Y() }], /** * Transition Timing Function * @see https://tailwindcss.com/docs/transition-timing-function */ ease: [{ ease: ["linear", "in", "out", "in-out", Je] }], /** * Transition Delay * @see https://tailwindcss.com/docs/transition-delay */ delay: [{ delay: Y() }], /** * Animation * @see https://tailwindcss.com/docs/animation */ animate: [{ animate: ["none", "spin", "ping", "pulse", "bounce", Je] }], // Transforms /** * Transform * @see https://tailwindcss.com/docs/transform */ transform: [{ transform: ["", "gpu", "none"] }], /** * Scale * @see https://tailwindcss.com/docs/scale */ scale: [{ scale: [A] }], /** * Scale X * @see https://tailwindcss.com/docs/scale */ "scale-x": [{ "scale-x": [A] }], /** * Scale Y * @see https://tailwindcss.com/docs/scale */ "scale-y": [{ "scale-y": [A] }], /** * Rotate * @see https://tailwindcss.com/docs/rotate */ rotate: [{ rotate: [bu, Je] }], /** * Translate X * @see https://tailwindcss.com/docs/translate */ "translate-x": [{ "translate-x": [C] }], /** * Translate Y * @see https://tailwindcss.com/docs/translate */ "translate-y": [{ "translate-y": [C] }], /** * Skew X * @see https://tailwindcss.com/docs/skew */ "skew-x": [{ "skew-x": [O] }], /** * Skew Y * @see https://tailwindcss.com/docs/skew */ "skew-y": [{ "skew-y": [O] }], /** * Transform Origin * @see https://tailwindcss.com/docs/transform-origin */ "transform-origin": [{ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", Je] }], // Interactivity /** * Accent Color * @see https://tailwindcss.com/docs/accent-color */ accent: [{ accent: ["auto", e] }], /** * Appearance * @see https://tailwindcss.com/docs/appearance */ appearance: [{ appearance: ["none", "auto"] }], /** * Cursor * @see https://tailwindcss.com/docs/cursor */ cursor: [{ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", Je] }], /** * Caret Color * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities */ "caret-color": [{ caret: [e] }], /** * Pointer Events * @see https://tailwindcss.com/docs/pointer-events */ "pointer-events": [{ "pointer-events": ["none", "auto"] }], /** * Resize * @see https://tailwindcss.com/docs/resize */ resize: [{ resize: ["none", "y", "x", ""] }], /** * Scroll Behavior * @see https://tailwindcss.com/docs/scroll-behavior */ "scroll-behavior": [{ scroll: ["auto", "smooth"] }], /** * Scroll Margin * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-m": [{ "scroll-m": N() }], /** * Scroll Margin X * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-mx": [{ "scroll-mx": N() }], /** * Scroll Margin Y * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-my": [{ "scroll-my": N() }], /** * Scroll Margin Start * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-ms": [{ "scroll-ms": N() }], /** * Scroll Margin End * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-me": [{ "scroll-me": N() }], /** * Scroll Margin Top * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-mt": [{ "scroll-mt": N() }], /** * Scroll Margin Right * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-mr": [{ "scroll-mr": N() }], /** * Scroll Margin Bottom * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-mb": [{ "scroll-mb": N() }], /** * Scroll Margin Left * @see https://tailwindcss.com/docs/scroll-margin */ "scroll-ml": [{ "scroll-ml": N() }], /** * Scroll Padding * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-p": [{ "scroll-p": N() }], /** * Scroll Padding X * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-px": [{ "scroll-px": N() }], /** * Scroll Padding Y * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-py": [{ "scroll-py": N() }], /** * Scroll Padding Start * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-ps": [{ "scroll-ps": N() }], /** * Scroll Padding End * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-pe": [{ "scroll-pe": N() }], /** * Scroll Padding Top * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-pt": [{ "scroll-pt": N() }], /** * Scroll Padding Right * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-pr": [{ "scroll-pr": N() }], /** * Scroll Padding Bottom * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-pb": [{ "scroll-pb": N() }], /** * Scroll Padding Left * @see https://tailwindcss.com/docs/scroll-padding */ "scroll-pl": [{ "scroll-pl": N() }], /** * Scroll Snap Align * @see https://tailwindcss.com/docs/scroll-snap-align */ "snap-align": [{ snap: ["start", "end", "center", "align-none"] }], /** * Scroll Snap Stop * @see https://tailwindcss.com/docs/scroll-snap-stop */ "snap-stop": [{ snap: ["normal", "always"] }], /** * Scroll Snap Type * @see https://tailwindcss.com/docs/scroll-snap-type */ "snap-type": [{ snap: ["none", "x", "y", "both"] }], /** * Scroll Snap Type Strictness * @see https://tailwindcss.com/docs/scroll-snap-type */ "snap-strictness": [{ snap: ["mandatory", "proximity"] }], /** * Touch Action * @see https://tailwindcss.com/docs/touch-action */ touch: [{ touch: ["auto", "none", "manipulation"] }], /** * Touch Action X * @see https://tailwindcss.com/docs/touch-action */ "touch-x": [{ "touch-pan": ["x", "left", "right"] }], /** * Touch Action Y * @see https://tailwindcss.com/docs/touch-action */ "touch-y": [{ "touch-pan": ["y", "up", "down"] }], /** * Touch Action Pinch Zoom * @see https://tailwindcss.com/docs/touch-action */ "touch-pz": ["touch-pinch-zoom"], /** * User Select * @see https://tailwindcss.com/docs/user-select */ select: [{ select: ["none", "text", "all", "auto"] }], /** * Will Change * @see https://tailwindcss.com/docs/will-change */ "will-change": [{ "will-change": ["auto", "scroll", "contents", "transform", Je] }], // SVG /** * Fill * @see https://tailwindcss.com/docs/fill */ fill: [{ fill: [e, "none"] }], /** * Stroke Width * @see https://tailwindcss.com/docs/stroke-width */ "stroke-w": [{ stroke: [bo, pa, Vv] }], /** * Stroke * @see https://tailwindcss.com/docs/stroke */ stroke: [{ stroke: [e, "none"] }], // Accessibility /** * Screen Readers * @see https://tailwindcss.com/docs/screen-readers */ sr: ["sr-only", "not-sr-only"], /** * Forced Color Adjust * @see https://tailwindcss.com/docs/forced-color-adjust */ "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }] }, conflictingClassGroups: { overflow: ["overflow-x", "overflow-y"], overscroll: ["overscroll-x", "overscroll-y"], inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"], "inset-x": ["right", "left"], "inset-y": ["top", "bottom"], flex: ["basis", "grow", "shrink"], gap: ["gap-x", "gap-y"], p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"], px: ["pr", "pl"], py: ["pt", "pb"], m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"], mx: ["mr", "ml"], my: ["mt", "mb"], size: ["w", "h"], "font-size": ["leading"], "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"], "fvn-ordinal": ["fvn-normal"], "fvn-slashed-zero": ["fvn-normal"], "fvn-figure": ["fvn-normal"], "fvn-spacing": ["fvn-normal"], "fvn-fraction": ["fvn-normal"], "line-clamp": ["display", "overflow"], rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"], "rounded-s": ["rounded-ss", "rounded-es"], "rounded-e": ["rounded-se", "rounded-ee"], "rounded-t": ["rounded-tl", "rounded-tr"], "rounded-r": ["rounded-tr", "rounded-br"], "rounded-b": ["rounded-br", "rounded-bl"], "rounded-l": ["rounded-tl", "rounded-bl"], "border-spacing": ["border-spacing-x", "border-spacing-y"], "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"], "border-w-x": ["border-w-r", "border-w-l"], "border-w-y": ["border-w-t", "border-w-b"], "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"], "border-color-x": ["border-color-r", "border-color-l"], "border-color-y": ["border-color-t", "border-color-b"], "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"], "scroll-mx": ["scroll-mr", "scroll-ml"], "scroll-my": ["scroll-mt", "scroll-mb"], "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"], "scroll-px": ["scroll-pr", "scroll-pl"], "scroll-py": ["scroll-pt", "scroll-pb"], touch: ["touch-x", "touch-y", "touch-pz"], "touch-x": ["touch"], "touch-y": ["touch"], "touch-pz": ["touch"] }, conflictingClassGroupModifiers: { "font-size": ["leading"] } }; }, LH = /* @__PURE__ */ bH(jH); function Z$(e) { var t, n, r = ""; if (typeof e == "string" || typeof e == "number") r += e; else if (typeof e == "object") if (Array.isArray(e)) { var i = e.length; for (t = 0; t < i; t++) e[t] && (n = Z$(e[t])) && (r && (r += " "), r += n); } else for (n in e) e[n] && (r && (r += " "), r += n); return r; } function Xe() { for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Z$(e)) && (r && (r += " "), r += t); return r; } const K = (...e) => LH(Xe(...e)), cf = (...e) => (...t) => e.forEach((n) => n == null ? void 0 : n(...t)), Jm = (e) => { const t = { 0: "gap-0", xxs: "gap-1", xs: "gap-2", sm: "gap-3", md: "gap-4", lg: "gap-5", xl: "gap-6", "2xl": "gap-8" }; return t[e] || t.md; }, BH = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4", 5: "grid-cols-5", 6: "grid-cols-6", 7: "grid-cols-7", 8: "grid-cols-8", 9: "grid-cols-9", 10: "grid-cols-10", 11: "grid-cols-11", 12: "grid-cols-12" }, FH = () => { var i, o; const e = ((o = (i = window.navigator) == null ? void 0 : i.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, t = [ "macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K" ], n = ["Win32", "Win64", "Windows", "WinCE"]; let r = "null"; return t.includes(e) ? r = "Mac OS" : n.includes(e) && (r = "Windows"), r; }, WH = (e) => e < 1024 ? `${e} bytes` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`, ju = { set: (e, t) => { if (!(typeof window > "u")) try { localStorage.setItem(e, JSON.stringify(t)); } catch (n) { console.error(n); } }, get: (e) => { if (typeof window > "u") return null; try { const t = localStorage.getItem(e); return t ? JSON.parse(t) : null; } catch (t) { return console.error(t), null; } }, remove: (e) => { if (!(typeof window > "u")) try { localStorage.removeItem(e); } catch (t) { console.error(t); } } }, Hn = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)( (e, t) => { const { variant: n = "primary", // primary, secondary, outline, ghost, link size: r = "md", // xs, sm, md, lg type: i = "button", tag: o = "button", className: a, children: s, disabled: l = !1, destructive: c = !1, // true, false icon: f = null, // icon component iconPosition: d = "left", // left, right, loading: p = !1, ...m } = e, y = "outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled", g = p ? "opacity-50 disabled:cursor-not-allowed" : "", v = { primary: "text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled", secondary: "text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled", outline: "text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled", ghost: "text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover", link: "outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none" }[n], x = c && !l ? { primary: "bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover", secondary: "bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover", outline: "text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error", ghost: "text-button-danger hover:bg-field-background-error", link: "text-button-danger hover:text-button-danger-secondary" }[n] : "", w = { xs: "p-1 rounded [&>svg]:size-4", sm: "p-2 rounded [&>svg]:size-4 gap-0.5", md: "p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1", lg: "p-3 rounded-lg text-base [&>svg]:size-6 gap-1" }[r]; let S, A = null, _ = ""; return f && (_ = "flex items-center justify-center", d === "left" ? S = f : A = f), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)( o, { ref: t, type: i, className: K( _, y, w, v, x, g, { "cursor-default": l }, a ), disabled: l, ...m, children: [ /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children: S }, "left-icon"), s ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "px-1", children: s }) : null, /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children: A }, "right-icon") ] } ); } ); Hn.displayName = "Button"; const zH = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; let io = (e = 21) => { let t = "", n = crypto.getRandomValues(new Uint8Array(e)); for (; e--; ) t += zH[n[e] & 63]; return t; }; const to = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)( ({ children: e = null, tag: t = "label", size: n = "sm", // xs, sm, md className: r = "", variant: i = "neutral", // neutral, help, error, disabled required: o = !1, ...a }, s) => { const l = "font-medium text-field-label flex items-center gap-0.5", c = { xs: "text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3", sm: "text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4", md: "text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5" }, f = { neutral: "text-field-label [&>*]:text-field-label", help: "text-field-helper [&>*]:text-field-helper", error: "text-support-error [&>*]:text-support-error", disabled: "text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled" }, d = { neutral: "", help: "font-normal", error: "font-normal", disabled: "" }; if (!e) return null; let p = ""; return o && (p = "after:content-['*'] after:text-field-required after:ml-0.5"), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( t, { ref: s, className: K( l, c[n], f[i], p, d == null ? void 0 : d[i], r ), ...a, children: e } ); } ); to.displayName = "Label"; const VH = ({ label: e, switchId: t, disabled: n = !1, children: r, size: i }) => { const o = { sm: "text-sm leading-5 font-medium", md: "text-base leading-6 font-medium" }, a = { sm: "text-sm leading-5 font-normal", md: "text-sm leading-5 font-normal" }, s = { sm: "space-y-0.5", md: "space-y-1" }; if ((0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(e)) return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)( "div", { className: K("inline-flex items-center gap-3", "items-start"), children: [ r, e ] } ); const c = () => { const { heading: p = "", description: m = "" } = e || {}; return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: K("space-y-0.5", s[i]), children: [ p && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( to, { htmlFor: t, className: K("m-0", o[i]), ...n && { variant: "disabled" }, children: p } ), m && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( to, { tag: "p", variant: "help", className: K( "text-sm font-normal leading-5 m-0", a[i] ), ...n && { variant: "disabled" }, children: m } ) ] }); }, f = !(e != null && e.heading) && !(e != null && e.description), d = !(e != null && e.heading) || !(e != null && e.description) ? "items-center" : "items-start"; return f ? r : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: K("inline-flex", d, "gap-3"), children: [ r, c() ] }); }, UH = ({ id: e, onChange: t, value: n, defaultValue: r = !1, size: i = "sm", disabled: o = !1, label: a = { heading: "", description: "" }, name: s, className: l, ...c }, f) => { const d = i === "lg" ? "md" : i, p = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => typeof n < "u", [n]), m = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => e || `switch-${io()}`, []), [y, g] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(r), v = "primary", x = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)( () => p ? n : y, [p, n, y] ), w = (C) => { if (o) return; const k = C.target.checked; p || g(k), typeof t == "function" && t(k); }, S = { primary: { input: "bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border", toggleDial: "bg-toggle-dial-background shadow-toggleDial" } }, A = { primary: { input: "group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border" } }, _ = { md: { container: "w-11 h-6", toggleDial: "size-4 peer-checked:translate-x-5" }, sm: { container: "w-10 h-5", toggleDial: "size-3 peer-checked:translate-x-5" } }, O = { md: "group-hover/switch:size-5 group-focus-within/switch:size-5 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5", sm: "group-hover/switch:size-4 group-focus-within/switch:size-4 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5" }, P = { input: "bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled", toggleDial: "peer-disabled:cursor-not-allowed" }; return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( VH, { label: a, switchId: m, disabled: o, size: d, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)( "div", { className: K( "relative group/switch inline-block cursor-pointer rounded-full shrink-0", _[d].container, l ), children: [ /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( "input", { ref: f, id: m, type: "checkbox", className: K( "peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]", S[v].input, o && P.input, !o && A[v].input ), checked: x(), onChange: w, disabled: o, name: s, ...c } ), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( "label", { htmlFor: m, className: K( "peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4", _[d].toggleDial, S[v].toggleDial, o && P.toggleDial, !o && O[d] ) } ) ] } ) } ); }, J$ = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(UH); J$.displayName = "Switch"; /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const HH = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Q$ = (...e) => e.filter((t, n, r) => !!t && r.indexOf(t) === n).join(" "); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var KH = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const GH = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)( ({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: o, iconNode: a, ...s }, l) => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)( "svg", { ref: l, ...KH, width: t, height: t, stroke: e, strokeWidth: r ? Number(n) * 24 / Number(t) : n, className: Q$("lucide", i), ...s }, [ ...a.map(([c, f]) => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(c, f)), ...Array.isArray(o) ? o : [o] ] ) ); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const on = (e, t) => { const n = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)( ({ className: r, ...i }, o) => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(GH, { ref: o, iconNode: t, className: Q$(`lucide-${HH(e)}`, r), ...i }) ); return n.displayName = `${e}`, n; }; /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const sd = on("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Xw = on("ChevronDown", [ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const eD = on("ChevronLeft", [ ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Zw = on("ChevronRight", [ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const YH = on("ChevronsUpDown", [ ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }], ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const qH = on("CloudUpload", [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }], ["path", { d: "M12 12v9", key: "192myk" }], ["path", { d: "m16 16-4-4-4 4", key: "119tzi" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const XH = on("Ellipsis", [ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }], ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }], ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ZH = on("File", [ ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }], ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const JH = on("ImageOff", [ ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }], ["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }], ["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }], ["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }], [ "path", { d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59", key: "mmje98" } ], ["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const f0 = on("Info", [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["path", { d: "M12 16v-4", key: "1dtifu" }], ["path", { d: "M12 8h.01", key: "e9boi3" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const QH = on("LoaderCircle", [ ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const tD = on("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const eK = on("PanelLeftClose", [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], ["path", { d: "M9 3v18", key: "fh3hqa" }], ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const tK = on("PanelLeftOpen", [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], ["path", { d: "M9 3v18", key: "fh3hqa" }], ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const nD = on("Plus", [ ["path", { d: "M5 12h14", key: "1ays0h" }], ["path", { d: "M12 5v14", key: "s699le" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const rD = on("Search", [ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }], ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const nK = on("Trash2", [ ["path", { d: "M3 6h18", key: "d0wm0j" }], ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }], ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }], ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }], ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const rK = on("Trash", [ ["path", { d: "M3 6h18", key: "d0wm0j" }], ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }], ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const iK = on("TriangleAlert", [ [ "path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", key: "wmoenq" } ], ["path", { d: "M12 9v4", key: "juzpu7" }], ["path", { d: "M12 17h.01", key: "p32p05" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const vT = on("Upload", [ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }], ["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }], ["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const oK = on("User", [ ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }], ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }] ]); /** * @license lucide-react v0.417.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const $a = on("X", [ ["path", { d: "M18 6 6 18", key: "1bl5f8" }], ["path", { d: "m6 6 12 12", key: "d8bk6v" }] ]), aK = ({ id: e, label: t, defaultChecked: n = !1, checked: r, onChange: i, indeterminate: o, disabled: a, size: s = "md", className: l, ...c }, f) => { var O, P; const d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => e || `checkbox-${io()}`, [e]), p = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)( () => typeof r < "u", [r] ), [m, y] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(n || !1), g = "primary", v = { sm: { checkbox: "size-4 rounded gap-1", icon: "size-3", text: "text-sm", // text class for sm description: "text-sm", gap: "gap-0.5" }, md: { checkbox: "size-5 rounded gap-1", icon: "size-4", text: "text-base", // text class for md description: "text-sm", gap: "gap-1" } }, x = { primary: { checkbox: "border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus", icon: "text-white" } }, w = { checkbox: "cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled", icon: "cursor-not-allowed peer-disabled:text-border-disabled" }, S = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)( () => p ? r : m, [p, r, m] ), A = (C) => { if (a) return; const k = C.target.checked; p || y(k), typeof i == "function" && i(k); }, _ = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(t) ? t : !(t != null && t.heading) && !(t != null && t.description) ? null : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: v[s].gap, children: [ (t == null ? void 0 : t.heading) && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( to, { className: K( "text-text-primary font-medium leading-4 m-0", v[s].text, v[s].gap, a && "text-text-disabled" ), htmlFor: d, children: t == null ? void 0 : t.heading } ), (t == null ? void 0 : t.description) && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( to, { tag: "p", className: K( "font-normal leading-5 m-0", v[s].description, a && "text-text-disabled" ), variant: "help", children: t == null ? void 0 : t.description } ) ] }), [t, s, a]); return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)( "div", { className: K( "inline-flex items-center justify-center gap-2", !!t && "items-start", a && "cursor-not-allowed" ), children: [ /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)( "label", { className: K( "relative flex items-center justify-center rounded-full p-0.5", !a && "cursor-pointer" ), htmlFor: d, children: [ /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( "input", { ref: f, id: d, type: "checkbox", className: K( "peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid", x[g].checkbox, v[s].checkbox, a && w.checkbox, l ), checked: S(), onChange: A, disabled: a, ...c } ), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)( "span", { className: K( "pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100", x[g].icon, a && w.icon ), children: o ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tD, { className: K((O = v[s]) == null ? void 0 : O.icon) }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(sd, { className: K((P = v[s]) == null ? void 0 : P.icon) }) } ) ] } ), !!t && _() ] } ); }, Jw = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(aK); Jw.displayName = "Checkbox"; const bT = { primary: { checkbox: "border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus", icon: "text-white" } }, xT = { checkbox: "disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed", icon: "peer-disabled:text-border-disabled cursor-not-allowed" }, sK = { sm: "text-sm leading-5", md: "text-base leading-6" }, Uv = { sm: { checkbox: "size-4", icon: "size-1.5", info: "size-4" }, md: { checkbox: "size-5", icon: "size-2", info: "size-5" } }, wT = { sm: { switch: "mt-1", radio: "mt-0.5" }, md: { switch: "mt-0.5", radio: "mt-px" } }, lK = { xs: "py-1 px-1 text-sm gap-0.5 [&>svg]:size-4", sm: "py-1 px-1.5 text-base gap-1 [&>svg]:size-4", md: "py-2 px-2.5 text-base gap-1 [&>svg]:size-5", lg: "py-2.5 px-3 text-base gap-1 [&>svg]:size-6" }, cK = "border-0 border-r border-border-subtle border-solid", uK = "bg-background-primary text-primary cursor-pointer flex items-center justify-center", fK = "hover:bg-button-tertiary-hover", dK = "focus:outline-none"; function Qm() { return typeof window < "u"; } function za(e) { return iD(e) ? (e.nodeName || "").toLowerCase() : "#document"; } function Or(e) { var t; return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; } function oo(e) { var t; return (t = (iD(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement; } function iD(e) { return Qm() ? e instanceof Node || e instanceof Or(e).Node : !1; } function Ct(e) { return Qm() ? e instanceof Element || e instanceof Or(e).Element : !1; } function pn(e) { return Qm() ? e instanceof HTMLElement || e instanceof Or(e).HTMLElement : !1; } function d0(e) { return !Qm() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Or(e).ShadowRoot; } function ld(e) { const { overflow: t, overflowX: n, overflowY: r, display: i } = Hr(e); return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i); } function hK(e) { return ["table", "td", "th"].includes(za(e)); } function eg(e) { return [":popover-open", ":modal"].some((t) => { try { return e.matches(t); } catch { return !1; } }); } function Qw(e) { const t = tg(), n = Ct(e) ? Hr(e) : e; return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r)); } function pK(e) { let t = Fo(e); for (; pn(t) && !Da(t); ) { if (Qw(t)) return t; if (eg(t)) return null; t = Fo(t); } return null; } function tg() { return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); } function Da(e) { return ["html", "body", "#document"].includes(za(e)); } function Hr(e) { return Or(e).getComputedStyle(e); } function ng(e) { return Ct(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.scrollX, scrollTop: e.scrollY }; } function Fo(e) { if (za(e) === "html") return e; const t = ( // Step into the shadow DOM of the parent of a slotted node. e.assignedSlot || // DOM Element detected. e.parentNode || // ShadowRoot detected. d0(e) && e.host || // Fallback. oo(e) ); return d0(t) ? t.host : t; } function oD(e) { const t = Fo(e); return Da(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : pn(t) && ld(t) ? t : oD(t); } function Ca(e, t, n) { var r; t === void 0 && (t = []), n === void 0 && (n = !0); const i = oD(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Or(i); if (o) { const s = h0(a); return t.concat(a, a.visualViewport || [], ld(i) ? i : [], s && n ? Ca(s) : []); } return t.concat(i, Ca(i, [], n)); } function h0(e) { return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null; } function Pi(e) { let t = e.activeElement; for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) { var n; t = t.shadowRoot.activeElement; } return t; } function hn(e, t) { if (!e || !t) return !1; const n = t.getRootNode == null ? void 0 : t.getRootNode(); if (e.contains(t)) return !0; if (n && d0(n)) { let r = t; for (; r; ) { if (e === r) return !0; r = r.parentNode || r.host; } } return !1; } function aD() { const e = navigator.userAgentData; return e != null && e.platform ? e.platform : navigator.platform; } function sD() { const e = navigator.userAgentData; return e && Array.isArray(e.brands) ? e.brands.map((t) => { let { brand: n, version: r } = t; return n + "/" + r; }).join(" ") : navigator.userAgent; } function lD(e) { return e.mozInputSource === 0 && e.isTrusted ? !0 : p0() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType; } function e1(e) { return mK() ? !1 : !p0() && e.width === 0 && e.height === 0 || p0() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height. e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch"; } function t1() { return /apple/i.test(navigator.vendor); } function p0() { const e = /android/i; return e.test(aD()) || e.test(sD()); } function cD() { return aD().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints; } function mK() { return sD().includes("jsdom/"); } function uf(e, t) { const n = ["mouse", "pen"]; return t || n.push("", void 0), n.includes(e); } function gK(e) { return "nativeEvent" in e; } function yK(e) { return e.matches("html,body"); } function Kn(e) { return (e == null ? void 0 : e.ownerDocument) || document; } function Hv(e, t) { if (t == null) return !1; if ("composedPath" in e) return e.composedPath().includes(t); const n = e; return n.target != null && t.contains(n.target); } function Ao(e) { return "composedPath" in e ? e.composedPath()[0] : e.target; } const vK = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"; function n1(e) { return pn(e) && e.matches(vK); } function Un(e) { e.preventDefault(), e.stopPropagation(); } function m0(e) { return e ? e.getAttribute("role") === "combobox" && n1(e) : !1; } const Ia = Math.min, Br = Math.max, hp = Math.round, kl = Math.floor, Ki = (e) => ({ x: e, y: e }), bK = { left: "right", right: "left", bottom: "top", top: "bottom" }, xK = { start: "end", end: "start" }; function g0(e, t, n) { return Br(e, Ia(t, n)); } function $c(e, t) { return typeof e == "function" ? e(t) : e; } function Ra(e) { return e.split("-")[0]; } function Dc(e) { return e.split("-")[1]; } function uD(e) { return e === "x" ? "y" : "x"; } function r1(e) { return e === "y" ? "height" : "width"; } function Is(e) { return ["top", "bottom"].includes(Ra(e)) ? "y" : "x"; } function i1(e) { return uD(Is(e)); } function wK(e, t, n) { n === void 0 && (n = !1); const r = Dc(e), i = i1(e), o = r1(i); let a = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top"; return t.reference[o] > t.floating[o] && (a = pp(a)), [a, pp(a)]; } function _K(e) { const t = pp(e); return [y0(e), t, y0(t)]; } function y0(e) { return e.replace(/start|end/g, (t) => xK[t]); } function SK(e, t, n) { const r = ["left", "right"], i = ["right", "left"], o = ["top", "bottom"], a = ["bottom", "top"]; switch (e) { case "top": case "bottom": return n ? t ? i : r : t ? r : i; case "left": case "right": return t ? o : a; default: return []; } } function OK(e, t, n, r) { const i = Dc(e); let o = SK(Ra(e), n === "start", r); return i && (o = o.map((a) => a + "-" + i), t && (o = o.concat(o.map(y0)))), o; } function pp(e) { return e.replace(/left|right|bottom|top/g, (t) => bK[t]); } function AK(e) { return { top: 0, right: 0, bottom: 0, left: 0, ...e }; } function fD(e) { return typeof e != "number" ? AK(e) : { top: e, right: e, bottom: e, left: e }; } function mp(e) { const { x: t, y: n, width: r, height: i } = e; return { width: r, height: i, top: n, left: t, right: t + r, bottom: n + i, x: t, y: n }; } /*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ var TK = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], gp = /* @__PURE__ */ TK.join(","), dD = typeof Element > "u", Jl = dD ? function() { } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, yp = !dD && Element.prototype.getRootNode ? function(e) { var t; return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e); } : function(e) { return e == null ? void 0 : e.ownerDocument; }, vp = function e(t, n) { var r; n === void 0 && (n = !0); var i = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), o = i === "" || i === "true", a = o || n && t && e(t.parentNode); return a; }, PK = function(t) { var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable"); return r === "" || r === "true"; }, CK = function(t, n, r) { if (vp(t)) return []; var i = Array.prototype.slice.apply(t.querySelectorAll(gp)); return n && Jl.call(t, gp) && i.unshift(t), i = i.filter(r), i; }, EK = function e(t, n, r) { for (var i = [], o = Array.from(t); o.length; ) { var a = o.shift(); if (!vp(a, !1)) if (a.tagName === "SLOT") { var s = a.assignedElements(), l = s.length ? s : a.children, c = e(l, !0, r); r.flatten ? i.push.apply(i, c) : i.push({ scopeParent: a, candidates: c }); } else { var f = Jl.call(a, gp); f && r.filter(a) && (n || !t.includes(a)) && i.push(a); var d = a.shadowRoot || // check for an undisclosed shadow typeof r.getShadowRoot == "function" && r.getShadowRoot(a), p = !vp(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a)); if (d && p) { var m = e(d === !0 ? a.children : d.children, !0, r); r.flatten ? i.push.apply(i, m) : i.push({ scopeParent: a, candidates: m }); } else o.unshift.apply(o, a.children); } } return i; }, hD = function(t) { return !isNaN(parseInt(t.getAttribute("tabindex"), 10)); }, pD = function(t) { if (!t) throw new Error("No node provided"); return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || PK(t)) && !hD(t) ? 0 : t.tabIndex; }, kK = function(t, n) { var r = pD(t); return r < 0 && n && !hD(t) ? 0 : r; }, MK = function(t, n) { return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex; }, mD = function(t) { return t.tagName === "INPUT"; }, NK = function(t) { return mD(t) && t.type === "hidden"; }, $K = function(t) { var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) { return r.tagName === "SUMMARY"; }); return n; }, DK = function(t, n) { for (var r = 0; r < t.length; r++) if (t[r].checked && t[r].form === n) return t[r]; }, IK = function(t) { if (!t.name) return !0; var n = t.form || yp(t), r = function(s) { return n.querySelectorAll('input[type="radio"][name="' + s + '"]'); }, i; if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function") i = r(window.CSS.escape(t.name)); else try { i = r(t.name); } catch (a) { return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1; } var o = DK(i, t.form); return !o || o === t; }, RK = function(t) { return mD(t) && t.type === "radio"; }, jK = function(t) { return RK(t) && !IK(t); }, LK = function(t) { var n, r = t && yp(t), i = (n = r) === null || n === void 0 ? void 0 : n.host, o = !1; if (r && r !== t) { var a, s, l; for (o = !!((a = i) !== null && a !== void 0 && (s = a.ownerDocument) !== null && s !== void 0 && s.contains(i) || t != null && (l = t.ownerDocument) !== null && l !== void 0 && l.contains(t)); !o && i; ) { var c, f, d; r = yp(i), i = (c = r) === null || c === void 0 ? void 0 : c.host, o = !!((f = i) !== null && f !== void 0 && (d = f.ownerDocument) !== null && d !== void 0 && d.contains(i)); } } return o; }, _T = function(t) { var n = t.getBoundingClientRect(), r = n.width, i = n.height; return r === 0 && i === 0; }, BK = function(t, n) { var r = n.displayCheck, i = n.getShadowRoot; if (getComputedStyle(t).visibility === "hidden") return !0; var o = Jl.call(t, "details>summary:first-of-type"), a = o ? t.parentElement : t; if (Jl.call(a, "details:not([open]) *")) return !0; if (!r || r === "full" || r === "legacy-full") { if (typeof i == "function") { for (var s = t; t; ) { var l = t.parentElement, c = yp(t); if (l && !l.shadowRoot && i(l) === !0) return _T(t); t.assignedSlot ? t = t.assignedSlot : !l && c !== t.ownerDocument ? t = c.host : t = l; } t = s; } if (LK(t)) return !t.getClientRects().length; if (r !== "legacy-full") return !0; } else if (r === "non-zero-area") return _T(t); return !1; }, FK = function(t) { if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName)) for (var n = t.parentElement; n; ) { if (n.tagName === "FIELDSET" && n.disabled) { for (var r = 0; r < n.children.length; r++) { var i = n.children.item(r); if (i.tagName === "LEGEND") return Jl.call(n, "fieldset[disabled] *") ? !0 : !i.contains(t); } return !0; } n = n.parentElement; } return !1; }, WK = function(t, n) { return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor // because we're limited in the type of selectors we can use in JSDom (see related // note related to `candidateSelectors`) vp(n) || NK(n) || BK(n, t) || // For a details element with a summary, the summary element gets the focus $K(n) || FK(n)); }, v0 = function(t, n) { return !(jK(n) || pD(n) < 0 || !WK(t, n)); }, zK = function(t) { var n = parseInt(t.getAttribute("tabindex"), 10); return !!(isNaN(n) || n >= 0); }, VK = function e(t) { var n = [], r = []; return t.forEach(function(i, o) { var a = !!i.scopeParent, s = a ? i.scopeParent : i, l = kK(s, a), c = a ? e(i.candidates) : s; l === 0 ? a ? n.push.apply(n, c) : n.push(s) : r.push({ documentOrder: o, tabIndex: l, item: i, isScope: a, content: c }); }), r.sort(MK).reduce(function(i, o) { return o.isScope ? i.push.apply(i, o.content) : i.push(o.content), i; }, []).concat(n); }, rg = function(t, n) { n = n || {}; var r; return n.getShadowRoot ? r = EK([t], n.includeContainer, { filter: v0.bind(null, n), flatten: !1, getShadowRoot: n.getShadowRoot, shadowRootFilter: zK }) : r = CK(t, n.includeContainer, v0.bind(null, n)), VK(r); }, UK = function(t, n) { if (n = n || {}, !t) throw new Error("No node provided"); return Jl.call(t, gp) === !1 ? !1 : v0(n, t); }; function ST(e, t, n) { let { reference: r, floating: i } = e; const o = Is(t), a = i1(t), s = r1(a), l = Ra(t), c = o === "y", f = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, p = r[s] / 2 - i[s] / 2; let m; switch (l) { case "top": m = { x: f, y: r.y - i.height }; break; case "bottom": m = { x: f, y: r.y + r.height }; break; case "right": m = { x: r.x + r.width, y: d }; break; case "left": m = { x: r.x - i.width, y: d }; break; default: m = { x: r.x, y: r.y }; } switch (Dc(t)) { case "start": m[a] -= p * (n && c ? -1 : 1); break; case "end": m[a] += p * (n && c ? -1 : 1); break; } return m; } const HK = async (e, t, n) => { const { placement: r = "bottom", strategy: i = "absolute", middleware: o = [], platform: a } = n, s = o.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(t)); let c = await a.getElementRects({ reference: e, floating: t, strategy: i }), { x: f, y: d } = ST(c, r, l), p = r, m = {}, y = 0; for (let g = 0; g < s.length; g++) { const { name: v, fn: x } = s[g], { x: w, y: S, data: A, reset: _ } = await x({ x: f, y: d, initialPlacement: r, placement: p, strategy: i, middlewareData: m, rects: c, platform: a, elements: { reference: e, floating: t } }); f = w ?? f, d = S ?? d, m = { ...m, [v]: { ...m[v], ...A } }, _ && y <= 50 && (y++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (c = _.rects === !0 ? await a.getElementRects({ reference: e, floating: t, strategy: i }) : _.rects), { x: f, y: d } = ST(c, p, l)), g = -1); } return { x: f, y: d, placement: p, strategy: i, middlewareData: m }; }; async function o1(e, t) { var n; t === void 0 && (t = {}); const { x: r, y: i, platform: o, rects: a, elements: s, strategy: l } = e, { boundary: c = "clippingAncestors", rootBoundary: f = "viewport", elementContext: d = "floating", altBoundary: p = !1, padding: m = 0 } = $c(t, e), y = fD(m), v = s[p ? d === "floating" ? "reference" : "floating" : d], x = mp(await o.getClippingRect({ element: (n = await (o.isElement == null ? void 0 : o.isElement(v))) == null || n ? v : v.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)), boundary: c, rootBoundary: f, strategy: l })), w = d === "floating" ? { x: r, y: i, width: a.floating.width, height: a.floating.height } : a.reference, S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s.floating)), A = await (o.isElement == null ? void 0 : o.isElement(S)) ? await (o.getScale == null ? void 0 : o.getScale(S)) || { x: 1, y: 1 } : { x: 1, y: 1 }, _ = mp(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: s, rect: w, offsetParent: S, strategy: l }) : w); return { top: (x.top - _.top + y.top) / A.y, bottom: (_.bottom - x.bottom + y.bottom) / A.y, left: (x.left - _.left + y.left) / A.x, right: (_.right - x.right + y.right) / A.x }; } const KK = (e) => ({ name: "arrow", options: e, async fn(t) { const { x: n, y: r, placement: i, rects: o, platform: a, elements: s, middlewareData: l } = t, { element: c, padding: f = 0 } = $c(e, t) || {}; if (c == null) return {}; const d = fD(f), p = { x: n, y: r }, m = i1(i), y = r1(m), g = await a.getDimensions(c), v = m === "y", x = v ? "top" : "left", w = v ? "bottom" : "right", S = v ? "clientHeight" : "clientWidth", A = o.reference[y] + o.reference[m] - p[m] - o.floating[y], _ = p[m] - o.reference[m], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c)); let P = O ? O[S] : 0; (!P || !await (a.isElement == null ? void 0 : a.isElement(O))) && (P = s.floating[S] || o.floating[y]); const C = A / 2 - _ / 2, k = P / 2 - g[y] / 2 - 1, I = Ia(d[x], k), $ = Ia(d[w], k), N = I, D = P - g[y] - $, j = P / 2 - g[y] / 2 + C, F = g0(N, j, D), W = !l.arrow && Dc(i) != null && j !== F && o.reference[y] / 2 - (j < N ? I : $) - g[y] / 2 < 0, z = W ? j < N ? j - N : j - D : 0; return { [m]: p[m] + z, data: { [m]: F, centerOffset: j - F - z, ...W && { alignmentOffset: z } }, reset: W }; } }), GK = function(e) { return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) { var n, r; const { placement: i, middlewareData: o, rects: a, initialPlacement: s, platform: l, elements: c } = t, { mainAxis: f = !0, crossAxis: d = !0, fallbackPlacements: p, fallbackStrategy: m = "bestFit", fallbackAxisSideDirection: y = "none", flipAlignment: g = !0, ...v } = $c(e, t); if ((n = o.arrow) != null && n.alignmentOffset) return {}; const x = Ra(i), w = Is(s), S = Ra(s) === s, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), _ = p || (S || !g ? [pp(s)] : _K(s)), O = y !== "none"; !p && O && _.push(...OK(s, g, y, A)); const P = [s, ..._], C = await o1(t, v), k = []; let I = ((r = o.flip) == null ? void 0 : r.overflows) || []; if (f && k.push(C[x]), d) { const j = wK(i, a, A); k.push(C[j[0]], C[j[1]]); } if (I = [...I, { placement: i, overflows: k }], !k.every((j) => j <= 0)) { var $, N; const j = ((($ = o.flip) == null ? void 0 : $.index) || 0) + 1, F = P[j]; if (F) return { data: { index: j, overflows: I }, reset: { placement: F } }; let W = (N = I.filter((z) => z.overflows[0] <= 0).sort((z, H) => z.overflows[1] - H.overflows[1])[0]) == null ? void 0 : N.placement; if (!W) switch (m) { case "bestFit": { var D; const z = (D = I.filter((H) => { if (O) { const U = Is(H.placement); return U === w || // Create a bias to the `y` side axis due to horizontal // reading directions favoring greater width. U === "y"; } return !0; }).map((H) => [H.placement, H.overflows.filter((U) => U > 0).reduce((U, V) => U + V, 0)]).sort((H, U) => H[1] - U[1])[0]) == null ? void 0 : D[0]; z && (W = z); break; } case "initialPlacement": W = s; break; } if (i !== W) return { reset: { placement: W } }; } return {}; } }; }; async function YK(e, t) { const { placement: n, platform: r, elements: i } = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), a = Ra(n), s = Dc(n), l = Is(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, f = o && l ? -1 : 1, d = $c(t, e); let { mainAxis: p, crossAxis: m, alignmentAxis: y } = typeof d == "number" ? { mainAxis: d, crossAxis: 0, alignmentAxis: null } : { mainAxis: d.mainAxis || 0, crossAxis: d.crossAxis || 0, alignmentAxis: d.alignmentAxis }; return s && typeof y == "number" && (m = s === "end" ? y * -1 : y), l ? { x: m * f, y: p * c } : { x: p * c, y: m * f }; } const qK = function(e) { return e === void 0 && (e = 0), { name: "offset", options: e, async fn(t) { var n, r; const { x: i, y: o, placement: a, middlewareData: s } = t, l = await YK(t, e); return a === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : { x: i + l.x, y: o + l.y, data: { ...l, placement: a } }; } }; }, XK = function(e) { return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) { const { x: n, y: r, placement: i } = t, { mainAxis: o = !0, crossAxis: a = !1, limiter: s = { fn: (v) => { let { x, y: w } = v; return { x, y: w }; } }, ...l } = $c(e, t), c = { x: n, y: r }, f = await o1(t, l), d = Is(Ra(i)), p = uD(d); let m = c[p], y = c[d]; if (o) { const v = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", w = m + f[v], S = m - f[x]; m = g0(w, m, S); } if (a) { const v = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", w = y + f[v], S = y - f[x]; y = g0(w, y, S); } const g = s.fn({ ...t, [p]: m, [d]: y }); return { ...g, data: { x: g.x - n, y: g.y - r, enabled: { [p]: o, [d]: a } } }; } }; }, ZK = function(e) { return e === void 0 && (e = {}), { name: "size", options: e, async fn(t) { var n, r; const { placement: i, rects: o, platform: a, elements: s } = t, { apply: l = () => { }, ...c } = $c(e, t), f = await o1(t, c), d = Ra(i), p = Dc(i), m = Is(i) === "y", { width: y, height: g } = o.floating; let v, x; d === "top" || d === "bottom" ? (v = d, x = p === (await (a.isRTL == null ? void 0 : a.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (x = d, v = p === "end" ? "top" : "bottom"); const w = g - f.top - f.bottom, S = y - f.left - f.right, A = Ia(g - f[v], w), _ = Ia(y - f[x], S), O = !t.middlewareData.shift; let P = A, C = _; if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = S), (r = t.middlewareData.shift) != null && r.enabled.y && (P = w), O && !p) { const I = Br(f.left, 0), $ = Br(f.right, 0), N = Br(f.top, 0), D = Br(f.bottom, 0); m ? C = y - 2 * (I !== 0 || $ !== 0 ? I + $ : Br(f.left, f.right)) : P = g - 2 * (N !== 0 || D !== 0 ? N + D : Br(f.top, f.bottom)); } await l({ ...t, availableWidth: C, availableHeight: P }); const k = await a.getDimensions(s.floating); return y !== k.width || g !== k.height ? { reset: { rects: !0 } } : {}; } }; }; function gD(e) { const t = Hr(e); let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0; const i = pn(e), o = i ? e.offsetWidth : n, a = i ? e.offsetHeight : r, s = hp(n) !== o || hp(r) !== a; return s && (n = o, r = a), { width: n, height: r, $: s }; } function a1(e) { return Ct(e) ? e : e.contextElement; } function Ul(e) { const t = a1(e); if (!pn(t)) return Ki(1); const n = t.getBoundingClientRect(), { width: r, height: i, $: o } = gD(t); let a = (o ? hp(n.width) : n.width) / r, s = (o ? hp(n.height) : n.height) / i; return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), { x: a, y: s }; } const JK = /* @__PURE__ */ Ki(0); function yD(e) { const t = Or(e); return !tg() || !t.visualViewport ? JK : { x: t.visualViewport.offsetLeft, y: t.visualViewport.offsetTop }; } function QK(e, t, n) { return t === void 0 && (t = !1), !n || t && n !== Or(e) ? !1 : t; } function Rs(e, t, n, r) { t === void 0 && (t = !1), n === void 0 && (n = !1); const i = e.getBoundingClientRect(), o = a1(e); let a = Ki(1); t && (r ? Ct(r) && (a = Ul(r)) : a = Ul(e)); const s = QK(o, n, r) ? yD(o) : Ki(0); let l = (i.left + s.x) / a.x, c = (i.top + s.y) / a.y, f = i.width / a.x, d = i.height / a.y; if (o) { const p = Or(o), m = r && Ct(r) ? Or(r) : r; let y = p, g = h0(y); for (; g && r && m !== y; ) { const v = Ul(g), x = g.getBoundingClientRect(), w = Hr(g), S = x.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, A = x.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y; l *= v.x, c *= v.y, f *= v.x, d *= v.y, l += S, c += A, y = Or(g), g = h0(y); } } return mp({ width: f, height: d, x: l, y: c }); } function s1(e, t) { const n = ng(e).scrollLeft; return t ? t.left + n : Rs(oo(e)).left + n; } function vD(e, t, n) { n === void 0 && (n = !1); const r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : ( // RTL scrollbar. s1(e, r) )), o = r.top + t.scrollTop; return { x: i, y: o }; } function eG(e) { let { elements: t, rect: n, offsetParent: r, strategy: i } = e; const o = i === "fixed", a = oo(r), s = t ? eg(t.floating) : !1; if (r === a || s && o) return n; let l = { scrollLeft: 0, scrollTop: 0 }, c = Ki(1); const f = Ki(0), d = pn(r); if ((d || !d && !o) && ((za(r) !== "body" || ld(a)) && (l = ng(r)), pn(r))) { const m = Rs(r); c = Ul(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop; } const p = a && !d && !o ? vD(a, l, !0) : Ki(0); return { width: n.width * c.x, height: n.height * c.y, x: n.x * c.x - l.scrollLeft * c.x + f.x + p.x, y: n.y * c.y - l.scrollTop * c.y + f.y + p.y }; } function tG(e) { return Array.from(e.getClientRects()); } function nG(e) { const t = oo(e), n = ng(e), r = e.ownerDocument.body, i = Br(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = Br(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight); let a = -n.scrollLeft + s1(e); const s = -n.scrollTop; return Hr(r).direction === "rtl" && (a += Br(t.clientWidth, r.clientWidth) - i), { width: i, height: o, x: a, y: s }; } function rG(e, t) { const n = Or(e), r = oo(e), i = n.visualViewport; let o = r.clientWidth, a = r.clientHeight, s = 0, l = 0; if (i) { o = i.width, a = i.height; const c = tg(); (!c || c && t === "fixed") && (s = i.offsetLeft, l = i.offsetTop); } return { width: o, height: a, x: s, y: l }; } function iG(e, t) { const n = Rs(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = pn(e) ? Ul(e) : Ki(1), a = e.clientWidth * o.x, s = e.clientHeight * o.y, l = i * o.x, c = r * o.y; return { width: a, height: s, x: l, y: c }; } function OT(e, t, n) { let r; if (t === "viewport") r = rG(e, n); else if (t === "document") r = nG(oo(e)); else if (Ct(t)) r = iG(t, n); else { const i = yD(e); r = { x: t.x - i.x, y: t.y - i.y, width: t.width, height: t.height }; } return mp(r); } function bD(e, t) { const n = Fo(e); return n === t || !Ct(n) || Da(n) ? !1 : Hr(n).position === "fixed" || bD(n, t); } function oG(e, t) { const n = t.get(e); if (n) return n; let r = Ca(e, [], !1).filter((s) => Ct(s) && za(s) !== "body"), i = null; const o = Hr(e).position === "fixed"; let a = o ? Fo(e) : e; for (; Ct(a) && !Da(a); ) { const s = Hr(a), l = Qw(a); !l && s.position === "fixed" && (i = null), (o ? !l && !i : !l && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || ld(a) && !l && bD(e, a)) ? r = r.filter((f) => f !== a) : i = s, a = Fo(a); } return t.set(e, r), r; } function aG(e) { let { element: t, boundary: n, rootBoundary: r, strategy: i } = e; const a = [...n === "clippingAncestors" ? eg(t) ? [] : oG(t, this._c) : [].concat(n), r], s = a[0], l = a.reduce((c, f) => { const d = OT(t, f, i); return c.top = Br(d.top, c.top), c.right = Ia(d.right, c.right), c.bottom = Ia(d.bottom, c.bottom), c.left = Br(d.left, c.left), c; }, OT(t, s, i)); return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top }; } function sG(e) { const { width: t, height: n } = gD(e); return { width: t, height: n }; } function lG(e, t, n) { const r = pn(t), i = oo(t), o = n === "fixed", a = Rs(e, !0, o, t); let s = { scrollLeft: 0, scrollTop: 0 }; const l = Ki(0); if (r || !r && !o) if ((za(t) !== "body" || ld(i)) && (s = ng(t)), r) { const p = Rs(t, !0, o, t); l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop; } else i && (l.x = s1(i)); const c = i && !r && !o ? vD(i, s) : Ki(0), f = a.left + s.scrollLeft - l.x - c.x, d = a.top + s.scrollTop - l.y - c.y; return { x: f, y: d, width: a.width, height: a.height }; } function Kv(e) { return Hr(e).position === "static"; } function AT(e, t) { if (!pn(e) || Hr(e).position === "fixed") return null; if (t) return t(e); let n = e.offsetParent; return oo(e) === n && (n = n.ownerDocument.body), n; } function xD(e, t) { const n = Or(e); if (eg(e)) return n; if (!pn(e)) { let i = Fo(e); for (; i && !Da(i); ) { if (Ct(i) && !Kv(i)) return i; i = Fo(i); } return n; } let r = AT(e, t); for (; r && hK(r) && Kv(r); ) r = AT(r, t); return r && Da(r) && Kv(r) && !Qw(r) ? n : r || pK(e) || n; } const cG = async function(e) { const t = this.getOffsetParent || xD, n = this.getDimensions, r = await n(e.floating); return { reference: lG(e.reference, await t(e.floating), e.strategy), floating: { x: 0, y: 0, width: r.width, height: r.height } }; }; function uG(e) { return Hr(e).direction === "rtl"; } const fG = { convertOffsetParentRelativeRectToViewportRelativeRect: eG, getDocumentElement: oo, getClippingRect: aG, getOffsetParent: xD, getElementRects: cG, getClientRects: tG, getDimensions: sG, getScale: Ul, isElement: Ct, isRTL: uG }; function dG(e, t) { let n = null, r; const i = oo(e); function o() { var s; clearTimeout(r), (s = n) == null || s.disconnect(), n = null; } function a(s, l) { s === void 0 && (s = !1), l === void 0 && (l = 1), o(); const { left: c, top: f, width: d, height: p } = e.getBoundingClientRect(); if (s || t(), !d || !p) return; const m = kl(f), y = kl(i.clientWidth - (c + d)), g = kl(i.clientHeight - (f + p)), v = kl(c), w = { rootMargin: -m + "px " + -y + "px " + -g + "px " + -v + "px", threshold: Br(0, Ia(1, l)) || 1 }; let S = !0; function A(_) { const O = _[0].intersectionRatio; if (O !== l) { if (!S) return a(); O ? a(!1, O) : r = setTimeout(() => { a(!1, 1e-7); }, 1e3); } S = !1; } try { n = new IntersectionObserver(A, { ...w, // Handle