From a4e9b000b0fc80473915bf63e6949f34bb1c1b98 Mon Sep 17 00:00:00 2001 From: Alexey Nikipelau Date: Tue, 28 Feb 2023 13:14:43 +0300 Subject: [PATCH] Updated build --- Changelog.md | 5 + dist/base/index.js | 10 +- dist/components/index.js | 12 +- dist/formio.base.min.js | 2 +- dist/formio.base.min.js.LICENSE.txt | 2 +- dist/formio.components.min.js | 2 +- dist/formio.components.min.js.LICENSE.txt | 2 +- dist/formio.core.min.js | 2 +- dist/formio.core.min.js.LICENSE.txt | 2 +- dist/formio.full.min.js | 2 +- dist/formio.full.min.js.LICENSE.txt | 2 +- dist/formio.min.js | 2 +- dist/formio.model.min.js | 2 +- dist/formio.modules.min.js | 2 +- dist/formio.modules.min.js.LICENSE.txt | 2 +- dist/formio.utils.min.js | 2 +- dist/formio.utils.min.js.LICENSE.txt | 2 +- dist/formio.validator.min.js | 2 +- dist/formio.validator.min.js.LICENSE.txt | 2 +- dist/index.js | 279 +++--- dist/model/index.js | 4 +- dist/modules/index.js | 52 +- dist/sdk/index.js | 23 +- dist/utils/index.js | 4 +- dist/validator/index.js | 50 +- docs/assets/highlight.css | 44 +- docs/assets/main.js | 110 +-- docs/assets/search.js | 2 +- docs/assets/style.css | 148 ++- docs/assets/widgets.png | Bin 480 -> 0 bytes docs/assets/widgets@2x.png | Bin 855 -> 0 bytes docs/classes/base_components.components.html | 73 +- docs/classes/base_template.template.html | 88 +- ...ponents_datatable_datatable.datatable.html | 61 +- ...atatable_datatable.datatablecomponent.html | 61 +- ...atavalue_datavalue.datavaluecomponent.html | 61 +- docs/classes/components_html_html.html.html | 61 +- .../components_html_html.htmlcomponent.html | 61 +- ...container_htmlcontainer.htmlcontainer.html | 61 +- ..._htmlcontainer.htmlcontainercomponent.html | 61 +- .../classes/components_input_input.input.html | 91 +- ...components_input_input.inputcomponent.html | 91 +- docs/classes/index.dayjs.dayjs.html | 398 ++++---- ...model_eventemitter.eventemitterbase-1.html | 148 +-- .../modules_jsonlogic.jsonlogicevaluator.html | 62 +- docs/classes/sdk_formio.formio.html | 860 +++++++++++------- docs/classes/sdk_plugins.default.html | 78 +- .../utils_evaluator.baseevaluator.html | 72 +- docs/classes/utils_evaluator.evaluator.html | 69 +- .../validator_rules_custom.customrule.html | 50 +- .../validator_rules_date.daterule.html | 50 +- docs/classes/validator_rules_day.dayrule.html | 50 +- .../validator_rules_email.emailrule.html | 50 +- .../validator_rules_mask.maskrule.html | 50 +- docs/classes/validator_rules_max.maxrule.html | 50 +- .../validator_rules_maxdate.maxdaterule.html | 50 +- ...lidator_rules_maxlength.maxlengthrule.html | 50 +- ...validator_rules_maxwords.maxwordsrule.html | 50 +- .../validator_rules_maxyear.maxyearrule.html | 50 +- docs/classes/validator_rules_min.minrule.html | 50 +- .../validator_rules_mindate.mindaterule.html | 50 +- ...lidator_rules_minlength.minlengthrule.html | 50 +- ...validator_rules_minwords.minwordsrule.html | 50 +- .../validator_rules_minyear.minyearrule.html | 50 +- ...rules_onlyavailable.onlyavailablerule.html | 50 +- .../validator_rules_pattern.patternrule.html | 50 +- ...validator_rules_required.requiredrule.html | 50 +- docs/classes/validator_rules_rule.rule.html | 48 +- .../validator_rules_select.selectrule.html | 50 +- .../validator_rules_time.timerule.html | 50 +- .../validator_rules_unique.uniquerule.html | 50 +- docs/classes/validator_rules_url.urlrule.html | 50 +- .../validator_validator.validator.html | 81 +- docs/enums/sdk_formio.formiopathtype.html | 26 +- docs/functions/base_Components.render.html | 25 +- ...e_array_ArrayComponent.ArrayComponent.html | 29 +- .../base_component_Component.Component.html | 25 +- ...base_data_DataComponent.DataComponent.html | 25 +- ...ested_NestedComponent.NestedComponent.html | 25 +- docs/functions/core.use.html | 25 +- docs/functions/core.useModule.html | 25 +- docs/functions/core.usePlugin.html | 25 +- docs/functions/index.dayjs-1.html | 37 +- docs/functions/index.dayjs.extend.html | 31 +- docs/functions/index.dayjs.isDayjs.html | 25 +- docs/functions/index.dayjs.locale.html | 25 +- docs/functions/index.dayjs.tz.html | 31 +- docs/functions/index.dayjs.unix.html | 25 +- docs/functions/index.dayjs.utc.html | 25 +- .../model_EventEmitter.EventEmitter.html | 25 +- docs/functions/model_Model.Model.html | 25 +- ...del_NestedArrayModel.NestedArrayModel.html | 25 +- ...model_NestedDataModel.NestedDataModel.html | 25 +- .../model_NestedModel.NestedModel.html | 25 +- .../utils_date.convertFormatToMoment.html | 25 +- .../functions/utils_date.currentTimezone.html | 25 +- docs/functions/utils_date.formatDate.html | 25 +- docs/functions/utils_date.getDateSetting.html | 25 +- docs/functions/utils_date.momentDate.html | 25 +- docs/functions/utils_dom.appendTo.html | 25 +- docs/functions/utils_dom.empty.html | 25 +- docs/functions/utils_dom.prependTo.html | 25 +- docs/functions/utils_dom.removeChildFrom.html | 25 +- .../utils_formUtil.eachComponent.html | 25 +- .../utils_formUtil.flattenComponents.html | 25 +- docs/functions/utils_formUtil.guid.html | 25 +- docs/functions/utils_formUtil.uniqueName.html | 25 +- docs/functions/utils_jwtDecode.jwtDecode.html | 142 +++ docs/functions/utils_mask.getInputMask.html | 25 +- docs/functions/utils_mask.matchInputMask.html | 25 +- docs/functions/utils_override.override.html | 25 +- docs/functions/utils_sanitize.sanitize.html | 25 +- docs/functions/utils_unwind.mergeArray.html | 25 +- docs/functions/utils_unwind.mergeObject.html | 25 +- docs/functions/utils_unwind.rewind.html | 27 +- docs/functions/utils_unwind.unwind.html | 25 +- docs/functions/utils_utils.boolValue.html | 25 +- .../utils_utils.escapeRegExCharacters.html | 25 +- docs/index.html | 35 +- ...omponent_component.componentinterface.html | 29 +- ..._component_component.componentoptions.html | 58 +- ...e_component_component.componentschema.html | 32 +- ...nestedcomponent.nestedcomponentschema.html | 34 +- .../interfaces/index.dayjs.ConfigTypeMap.html | 22 +- docs/interfaces/index.dayjs.FormatObject.html | 34 +- .../interfaces/index.dayjs.dayjstimezone.html | 47 +- ...r.eventemitterbase.eventemitterstatic.html | 35 +- ...ntemitter.eventemitterbase.listenerfn.html | 29 +- .../model_eventemitter.modelinterface.html | 47 +- .../model_model.modeldecoratorinterface.html | 25 +- docs/interfaces/sdk_formio.formiooptions.html | 41 +- docs/interfaces/sdk_plugins.plugin.html | 30 +- .../sdk_plugins.pluginderegisterfunction.html | 25 +- .../sdk_plugins.plugininitfunction.html | 25 +- docs/interfaces/types_Form.Form.html | 324 +++++++ .../types_Submission.Submission.html | 254 ++++++ docs/modules.html | 30 +- docs/modules/base.html | 24 +- docs/modules/base_array_arraycomponent.html | 24 +- docs/modules/base_component_component.html | 24 +- docs/modules/base_components.html | 24 +- docs/modules/base_data_datacomponent.html | 24 +- docs/modules/base_nested_nestedcomponent.html | 24 +- docs/modules/base_template.html | 24 +- docs/modules/components.html | 24 +- .../components_datatable_datatable.html | 24 +- .../components_datavalue_datavalue.html | 24 +- docs/modules/components_html_html.html | 24 +- ...omponents_htmlcontainer_htmlcontainer.html | 24 +- docs/modules/components_input_input.html | 24 +- docs/modules/components_templates.html | 24 +- docs/modules/components_test.html | 24 +- docs/modules/core.html | 24 +- docs/modules/ejs.html | 24 +- docs/modules/index.dayjs.html | 27 +- docs/modules/index.html | 24 +- docs/modules/model.html | 24 +- .../model_eventemitter.eventemitterbase.html | 23 +- docs/modules/model_eventemitter.html | 24 +- docs/modules/model_model.html | 24 +- docs/modules/model_nestedarraymodel.html | 24 +- docs/modules/model_nesteddatamodel.html | 24 +- docs/modules/model_nestedmodel.html | 24 +- docs/modules/modules.html | 24 +- docs/modules/modules_jsonlogic.html | 24 +- docs/modules/modules_jsonlogic_jsonlogic.html | 24 +- docs/modules/sdk.html | 24 +- docs/modules/sdk_formio.html | 24 +- docs/modules/sdk_plugins.html | 24 +- docs/modules/types.html | 233 +++++ docs/modules/types_Access.html | 137 +++ docs/modules/types_Action.html | 139 +++ docs/modules/types_Form.html | 146 +++ docs/modules/types_Role.html | 137 +++ docs/modules/types_Submission.html | 144 +++ docs/modules/types_project.html | 169 ++++ docs/modules/types_project_Project.html | 149 +++ docs/modules/utils.html | 24 +- docs/modules/utils_date.html | 24 +- docs/modules/utils_dom.html | 24 +- docs/modules/utils_evaluator.html | 24 +- docs/modules/utils_formutil.html | 24 +- docs/modules/utils_jwtDecode.html | 135 +++ docs/modules/utils_mask.html | 24 +- docs/modules/utils_override.html | 24 +- docs/modules/utils_sanitize.html | 24 +- docs/modules/utils_unwind.html | 24 +- docs/modules/utils_utils.html | 24 +- docs/modules/validator.html | 24 +- docs/modules/validator_rules.html | 24 +- docs/modules/validator_rules_custom.html | 24 +- docs/modules/validator_rules_date.html | 24 +- docs/modules/validator_rules_day.html | 24 +- docs/modules/validator_rules_email.html | 24 +- docs/modules/validator_rules_mask.html | 24 +- docs/modules/validator_rules_max.html | 24 +- docs/modules/validator_rules_maxdate.html | 24 +- docs/modules/validator_rules_maxlength.html | 24 +- docs/modules/validator_rules_maxwords.html | 24 +- docs/modules/validator_rules_maxyear.html | 24 +- docs/modules/validator_rules_min.html | 24 +- docs/modules/validator_rules_mindate.html | 24 +- docs/modules/validator_rules_minlength.html | 24 +- docs/modules/validator_rules_minwords.html | 24 +- docs/modules/validator_rules_minyear.html | 24 +- .../validator_rules_onlyavailable.html | 24 +- docs/modules/validator_rules_pattern.html | 24 +- docs/modules/validator_rules_required.html | 24 +- docs/modules/validator_rules_rule.html | 24 +- docs/modules/validator_rules_select.html | 24 +- docs/modules/validator_rules_time.html | 24 +- docs/modules/validator_rules_unique.html | 24 +- docs/modules/validator_rules_url.html | 24 +- docs/modules/validator_use.html | 122 +++ docs/modules/validator_validator.html | 24 +- docs/types/index.dayjs.ConfigType.html | 18 +- docs/types/index.dayjs.ManipulateType.html | 18 +- docs/types/index.dayjs.OpUnitType.html | 18 +- docs/types/index.dayjs.OptionType.html | 18 +- docs/types/index.dayjs.PluginFunc.html | 26 +- docs/types/index.dayjs.QUnitType.html | 18 +- docs/types/index.dayjs.UnitType.html | 18 +- docs/types/index.dayjs.UnitTypeLong.html | 18 +- .../types/index.dayjs.UnitTypeLongPlural.html | 18 +- docs/types/index.dayjs.UnitTypeShort.html | 18 +- ...tEmitter.EventEmitterBase.ArgumentMap.html | 23 +- ...entEmitter.EventEmitterBase.EventArgs.html | 23 +- ...mitter.EventEmitterBase.EventListener.html | 23 +- ...ntEmitter.EventEmitterBase.EventNames.html | 23 +- ...tter.EventEmitterBase.ValidEventTypes.html | 20 +- docs/types/types_Access.Access.html | 136 +++ docs/types/types_Access.AccessType.html | 129 +++ docs/types/types_Action.Action.html | 153 ++++ docs/types/types_Action.ActionId.html | 130 +++ docs/types/types_Action.ActionSettings.html | 139 +++ docs/types/types_Form.FormDisplay.html | 132 +++ docs/types/types_Form.FormId.html | 132 +++ docs/types/types_Form.FormSettings.html | 166 ++++ docs/types/types_Form.FormType.html | 132 +++ docs/types/types_Role.Role.html | 152 ++++ docs/types/types_Role.RoleId.html | 129 +++ docs/types/types_Submission.SubmissionId.html | 131 +++ .../types_Submission.SubmissionMetadata.html | 158 ++++ .../types_Submission.SubmissionState.html | 131 +++ docs/types/types_project_Project.Project.html | 209 +++++ ...types_project_Project.ProjectApiCalls.html | 144 +++ .../types_project_Project.ProjectBilling.html | 146 +++ ...ypes_project_Project.ProjectFramework.html | 135 +++ .../types_project_Project.ProjectId.html | 135 +++ .../types_project_Project.ProjectPlan.html | 135 +++ .../types_project_Project.ProjectType.html | 135 +++ .../types_project_Project.ProjectUsage.html | 183 ++++ docs/variables/components.default.html | 26 +- .../components_html_html.HTMLProperties.html | 29 +- .../components_templates.default.html | 22 +- docs/variables/ejs.default.html | 20 +- docs/variables/index.dayjs.Ls.html | 20 +- ...Emitter.EventEmitterBase.EventEmitter.html | 18 +- docs/variables/modules.default.html | 22 +- docs/variables/modules_jsonlogic.default.html | 24 +- ...modules_jsonlogic_jsonLogic.jsonLogic.html | 20 +- docs/variables/validator_rules.default.html | 22 +- lib/base/component/Component.js | 2 +- lib/base/nested/NestedComponent.js | 2 +- lib/components/input/input.js | 2 +- lib/model/Model.js | 2 +- lib/model/NestedModel.js | 2 +- lib/modules/jsonlogic/rules/JSON.js | 2 +- lib/sdk/Formio.d.ts | 19 +- lib/sdk/Formio.js | 148 ++- lib/types/Access.d.ts | 6 + lib/types/Access.js | 2 + lib/types/Action.d.ts | 19 + lib/types/Action.js | 2 + lib/types/Form.d.ts | 50 + lib/types/Form.js | 2 + lib/types/Role.d.ts | 14 + lib/types/Role.js | 2 + lib/types/Submission.d.ts | 35 + lib/types/Submission.js | 2 + lib/types/index.d.ts | 6 + lib/types/index.js | 22 + lib/types/project/Project.d.ts | 81 ++ lib/types/project/Project.js | 2 + lib/types/project/index.d.ts | 1 + lib/types/project/index.js | 17 + .../project/settings/ProjectSettings.d.ts | 31 + lib/types/project/settings/ProjectSettings.js | 2 + .../project/settings/authorization/index.d.ts | 3 + .../project/settings/authorization/index.js | 19 + .../project/settings/authorization/ldap.d.ts | 7 + .../project/settings/authorization/ldap.js | 2 + .../project/settings/authorization/oauth.d.ts | 31 + .../project/settings/authorization/oauth.js | 2 + .../project/settings/authorization/saml.d.ts | 18 + .../project/settings/authorization/saml.js | 2 + lib/types/project/settings/index.d.ts | 1 + lib/types/project/settings/index.js | 17 + .../integrations/dataConnections.d.ts | 14 + .../settings/integrations/dataConnections.js | 2 + .../project/settings/integrations/eSign.d.ts | 12 + .../project/settings/integrations/eSign.js | 2 + .../project/settings/integrations/email.d.ts | 29 + .../project/settings/integrations/email.js | 2 + .../settings/integrations/fileStorage.d.ts | 31 + .../settings/integrations/fileStorage.js | 2 + .../project/settings/integrations/index.d.ts | 5 + .../project/settings/integrations/index.js | 21 + .../settings/integrations/reCaptcha.d.ts | 4 + .../settings/integrations/reCaptcha.js | 2 + lib/utils/jwtDecode.d.ts | 3 + lib/utils/jwtDecode.js | 67 ++ lib/validator/Validator.js | 27 +- lib/validator/rules/Custom.js | 2 +- lib/validator/rules/Date.js | 2 +- lib/validator/rules/Day.js | 2 +- lib/validator/rules/Email.js | 2 +- lib/validator/rules/Mask.js | 2 +- lib/validator/rules/Max.js | 2 +- lib/validator/rules/MaxDate.js | 2 +- lib/validator/rules/MaxLength.js | 2 +- lib/validator/rules/MaxWords.js | 2 +- lib/validator/rules/MaxYear.js | 2 +- lib/validator/rules/Min.js | 2 +- lib/validator/rules/MinDate.js | 2 +- lib/validator/rules/MinLength.js | 2 +- lib/validator/rules/MinWords.js | 2 +- lib/validator/rules/MinYear.js | 2 +- lib/validator/rules/OnlyAvailable.js | 2 +- lib/validator/rules/Pattern.js | 2 +- lib/validator/rules/Required.js | 2 +- lib/validator/rules/Rule.js | 2 +- lib/validator/rules/Select.js | 2 +- lib/validator/rules/Time.js | 2 +- lib/validator/rules/Unique.js | 2 +- lib/validator/rules/Url.js | 2 +- package-lock.json | 24 +- package.json | 3 +- 338 files changed, 11977 insertions(+), 2626 deletions(-) delete mode 100644 docs/assets/widgets.png delete mode 100644 docs/assets/widgets@2x.png create mode 100644 docs/functions/utils_jwtDecode.jwtDecode.html create mode 100644 docs/interfaces/types_Form.Form.html create mode 100644 docs/interfaces/types_Submission.Submission.html create mode 100644 docs/modules/types.html create mode 100644 docs/modules/types_Access.html create mode 100644 docs/modules/types_Action.html create mode 100644 docs/modules/types_Form.html create mode 100644 docs/modules/types_Role.html create mode 100644 docs/modules/types_Submission.html create mode 100644 docs/modules/types_project.html create mode 100644 docs/modules/types_project_Project.html create mode 100644 docs/modules/utils_jwtDecode.html create mode 100644 docs/modules/validator_use.html create mode 100644 docs/types/types_Access.Access.html create mode 100644 docs/types/types_Access.AccessType.html create mode 100644 docs/types/types_Action.Action.html create mode 100644 docs/types/types_Action.ActionId.html create mode 100644 docs/types/types_Action.ActionSettings.html create mode 100644 docs/types/types_Form.FormDisplay.html create mode 100644 docs/types/types_Form.FormId.html create mode 100644 docs/types/types_Form.FormSettings.html create mode 100644 docs/types/types_Form.FormType.html create mode 100644 docs/types/types_Role.Role.html create mode 100644 docs/types/types_Role.RoleId.html create mode 100644 docs/types/types_Submission.SubmissionId.html create mode 100644 docs/types/types_Submission.SubmissionMetadata.html create mode 100644 docs/types/types_Submission.SubmissionState.html create mode 100644 docs/types/types_project_Project.Project.html create mode 100644 docs/types/types_project_Project.ProjectApiCalls.html create mode 100644 docs/types/types_project_Project.ProjectBilling.html create mode 100644 docs/types/types_project_Project.ProjectFramework.html create mode 100644 docs/types/types_project_Project.ProjectId.html create mode 100644 docs/types/types_project_Project.ProjectPlan.html create mode 100644 docs/types/types_project_Project.ProjectType.html create mode 100644 docs/types/types_project_Project.ProjectUsage.html create mode 100644 lib/types/Access.d.ts create mode 100644 lib/types/Access.js create mode 100644 lib/types/Action.d.ts create mode 100644 lib/types/Action.js create mode 100644 lib/types/Form.d.ts create mode 100644 lib/types/Form.js create mode 100644 lib/types/Role.d.ts create mode 100644 lib/types/Role.js create mode 100644 lib/types/Submission.d.ts create mode 100644 lib/types/Submission.js create mode 100644 lib/types/index.d.ts create mode 100644 lib/types/index.js create mode 100644 lib/types/project/Project.d.ts create mode 100644 lib/types/project/Project.js create mode 100644 lib/types/project/index.d.ts create mode 100644 lib/types/project/index.js create mode 100644 lib/types/project/settings/ProjectSettings.d.ts create mode 100644 lib/types/project/settings/ProjectSettings.js create mode 100644 lib/types/project/settings/authorization/index.d.ts create mode 100644 lib/types/project/settings/authorization/index.js create mode 100644 lib/types/project/settings/authorization/ldap.d.ts create mode 100644 lib/types/project/settings/authorization/ldap.js create mode 100644 lib/types/project/settings/authorization/oauth.d.ts create mode 100644 lib/types/project/settings/authorization/oauth.js create mode 100644 lib/types/project/settings/authorization/saml.d.ts create mode 100644 lib/types/project/settings/authorization/saml.js create mode 100644 lib/types/project/settings/index.d.ts create mode 100644 lib/types/project/settings/index.js create mode 100644 lib/types/project/settings/integrations/dataConnections.d.ts create mode 100644 lib/types/project/settings/integrations/dataConnections.js create mode 100644 lib/types/project/settings/integrations/eSign.d.ts create mode 100644 lib/types/project/settings/integrations/eSign.js create mode 100644 lib/types/project/settings/integrations/email.d.ts create mode 100644 lib/types/project/settings/integrations/email.js create mode 100644 lib/types/project/settings/integrations/fileStorage.d.ts create mode 100644 lib/types/project/settings/integrations/fileStorage.js create mode 100644 lib/types/project/settings/integrations/index.d.ts create mode 100644 lib/types/project/settings/integrations/index.js create mode 100644 lib/types/project/settings/integrations/reCaptcha.d.ts create mode 100644 lib/types/project/settings/integrations/reCaptcha.js create mode 100644 lib/utils/jwtDecode.d.ts create mode 100644 lib/utils/jwtDecode.js diff --git a/Changelog.md b/Changelog.md index b5e4f6fd..04d4283a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,8 @@ +## 1.3.0-rc.1 +### Changed + - Added types for core formio entities + - Missing commits from formio.js implemented + ## 1.2.0 ### Fixed - FIO-6123: Added an array cleanup to the removeAttachedListeners method and wrote test for it diff --git a/dist/base/index.js b/dist/base/index.js index 41bbba93..96b4cd1d 100644 --- a/dist/base/index.js +++ b/dist/base/index.js @@ -102,7 +102,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo \***********************************************/ /***/ (function(module) { -eval("/*! @license DOMPurify 2.3.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.8/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /* Add properties to a lookup table */\n\n function addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /* Shallow clone an object */\n\n function clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var 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']); // SVG\n\n var 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']);\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', '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.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', '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']);\n var 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']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n\n var 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', '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', 'xmlns', 'slot']);\n var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', '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', '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', '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', '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', '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']);\n var 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']);\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.3.8';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n var FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n var RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks? */\n\n var SANITIZE_DOM = true;\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n var 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']);\n /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n return x;\n } : stringToLowerCase;\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via\n // svg if parent is either or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n\n\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n var _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');\n };\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check if tagname contains Unicode */\n\n\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n var tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Mitigate a problem with templates inside select */\n\n\n if (tagName === 'select' && regExpTest(/