您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
手动打开 完美DOTA2维基官网页面(https://wiki.dota2.com.cn/) 即可食用
// ==UserScript== // @name dota2 倾天之战第三幕 冰川残骸 格罗德图书馆 代币筛选英雄 // @namespace https://github.com/Zirpon/douyu-helper.git // @version 1.3.4 // @description 手动打开 完美DOTA2维基官网页面(https://wiki.dota2.com.cn/) 即可食用 // @author zepung // @copyright zepung // @license MIT // @match https://wiki.dota2.com.cn/ // @run-at document-idle // @supportURL https://github.com/Zirpon/douyu-helper // @homepage https://github.com/Zirpon/douyu-helper // @grant GM_xmlhttpRequest // @grant GM_openInTab // @grant GM_notification // @grant GM_getValue // @grant GM_setValue // @grant GM_registerMenuCommand // @icon https://www.dota2.com.cn/favicon.ico // ==/UserScript== /* eslint-disable */ /* spell-checker: disable */ // @[ You can find all source codes in GitHub repo ] /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 5811: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ initScript) }); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js var es_regexp_exec = __webpack_require__(4043); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js var es_string_split = __webpack_require__(9873); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js var es_array_map = __webpack_require__(886); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.parse-float.js var es_parse_float = __webpack_require__(939); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js var es_array_index_of = __webpack_require__(7195); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js var es_array_for_each = __webpack_require__(9693); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js var es_object_to_string = __webpack_require__(228); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js var web_dom_collections_for_each = __webpack_require__(7522); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js var es_object_keys = __webpack_require__(9358); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js var es_array_concat = __webpack_require__(4338); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js var es_array_filter = __webpack_require__(8077); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js var es_array_includes = __webpack_require__(6801); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js var es_string_includes = __webpack_require__(3843); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js var es_array_from = __webpack_require__(7049); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js var es_string_iterator = __webpack_require__(1694); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js var es_array_iterator = __webpack_require__(752); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.js var es_set = __webpack_require__(9649); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js var web_dom_collections_iterator = __webpack_require__(6265); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js var web_url_search_params = __webpack_require__(9307); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js var es_string_search = __webpack_require__(7872); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.entries.js var es_object_entries = __webpack_require__(6585); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js var es_function_name = __webpack_require__(4284); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.date.to-string.js var es_date_to_string = __webpack_require__(24); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.is-array.js var es_array_is_array = __webpack_require__(3975); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js var es_symbol = __webpack_require__(9749); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js var es_symbol_description = __webpack_require__(6544); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js var es_symbol_iterator = __webpack_require__(4254); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js var es_array_slice = __webpack_require__(9730); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.define-property.js var es_object_define_property = __webpack_require__(739); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js var es_promise = __webpack_require__(3964); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.async-iterator.js var es_symbol_async_iterator = __webpack_require__(8373); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.to-string-tag.js var es_symbol_to_string_tag = __webpack_require__(6793); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.to-string-tag.js var es_json_to_string_tag = __webpack_require__(7629); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.to-string-tag.js var es_math_to_string_tag = __webpack_require__(7509); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.create.js var es_object_create = __webpack_require__(1013); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js var es_object_get_prototype_of = __webpack_require__(8052); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.set-prototype-of.js var es_object_set_prototype_of = __webpack_require__(5399); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reverse.js var es_array_reverse = __webpack_require__(3374); // EXTERNAL MODULE: ./node_modules/sweetalert2/dist/sweetalert2.all.js var sweetalert2_all = __webpack_require__(6455); var sweetalert2_all_default = /*#__PURE__*/__webpack_require__.n(sweetalert2_all); ;// CONCATENATED MODULE: ./src/dota2_act3/act3_token.js var act3 = { flame: { 3: ['phoenix'], 2: ['clinkz', 'lina'], 1: ['batrider', 'brewmaster', 'dawnbreaker', 'doom_bringer', 'ember_spirit', 'gyrocopter', 'huskar', 'jakiro', 'ogre_magi', 'nevermore', 'snapfire', 'abyssal_underlord'] }, frost: { 3: ['ancient_apparition'], 2: ['lich', 'tusk'], 1: ['crystal_maiden', 'drow_ranger', 'jakiro', 'winter_wyvern'] }, storm: { 3: [], 2: ['disruptor', 'razor', 'zuus'], 1: ['arc_warden', 'brewmaster', 'leshrac', 'storm_spirit', 'sven'] }, tide: { 3: [], 2: ['kunkka', 'morphling', 'tidehunter'], 1: ['naga_siren', 'slardar', 'slark'] }, nature: { 3: [], 2: ['earth_spirit', 'sand_king', 'tiny', 'treant'], 1: ['brewmaster', 'dark_willow', 'earthshaker', 'enchantress', 'hoodwink', 'leshrac', 'lone_druid', 'meepo', 'furion', 'night_stalker', 'nyx_assassin', 'obsidian_destroyer', 'puck', 'shredder', 'ursa', 'viper', 'windrunner'] }, "void": { 3: ['bane'], 2: ['faceless_void', 'obsidian_destroyer', 'nevermore', 'spectre', 'void_spirit'], 1: ['chaos_knight', 'dark_seer', 'elder_titan', 'enigma', 'life_stealer', 'muerta', 'night_stalker', 'slark', 'spirit_breaker', 'templar_assassin', 'abyssal_underlord', 'weaver'] }, blood: { 3: ['pudge'], 2: ['bloodseeker', 'life_stealer', 'necrolyte', 'queenofpain', 'troll_warlord', 'kez'], 1: ['axe', 'beastmaster', 'bounty_hunter', 'bristleback', 'broodmother', 'centaur', 'dazzle', 'huskar', 'juggernaut', 'marci', 'mars', 'phantom_assassin', 'primal_beast', 'riki', 'sand_king', 'shadow_demon', 'sniper', 'tiny', 'ursa', 'weaver', 'skeleton_king'] }, mystic: { 3: [], 2: ['alchemist', 'antimage', 'keeper_of_the_light', 'lion'], 1: ['abaddon', 'bounty_hunter', 'chen', 'dark_willow', 'dawnbreaker', 'dazzle', 'death_prophet', 'disruptor', 'invoker', 'wisp', 'magnataur', 'medusa', 'muerta', 'night_stalker', 'ogre_magi', 'oracle', 'puck', 'pugna', 'rubick', 'shadow_demon', 'silencer', 'skywrath_mage', 'vengefulspirit', 'winter_wyvern', 'witch_doctor'] }, armor: { 3: [], 2: ['axe', 'doom_bringer', 'omniknight'], 1: ['abaddon', 'bristleback', 'centaur', 'chaos_knight', 'chen', 'rattletrap', 'dawnbreaker', 'dragon_knight', 'drow_ranger', 'ember_spirit', 'faceless_void', 'gyrocopter', 'legion_commander', 'luna', 'lycan', 'mirana', 'nyx_assassin', 'phantom_lancer', 'queenofpain', 'skywrath_mage', 'spirit_breaker', 'storm_spirit', 'sven', 'shredder', 'treant', 'undying', 'visage', 'skeleton_king'] }, helmet: { 3: [], 2: [], 1: ['arc_warden', 'rattletrap', 'huskar', 'legion_commander', 'luna', 'mars', 'phantom_assassin', 'silencer', 'skywrath_mage', 'sven', 'techies', 'shredder', 'tinker', 'troll_warlord', 'undying'] }, shield: { 3: [], 2: ['pangolier', 'tinker'], 1: ['abaddon', 'dragon_knight', 'luna', 'mars', 'medusa', 'nyx_assassin', 'silencer'] }, robe: { 3: [], 2: ['oracle'], 1: ['antimage', 'crystal_maiden', 'dark_seer', 'dazzle', 'death_prophet', 'grimstroke', 'invoker', 'kunkka', 'lich', 'lina', 'necrolyte', 'riki', 'storm_spirit', 'templar_assassin', 'vengefulspirit', 'void_spirit', 'warlock', 'windrunner', 'zuus', 'kez'] }, cape: { 3: [], 2: [], 1: ['crystal_maiden', 'drow_ranger', 'invoker', 'legion_commander', 'lion', 'marci', 'furion', 'omniknight', 'phantom_assassin', 'pugna', 'rubick', 'shadow_demon', 'sniper', 'windrunner', 'skeleton_king'] }, mask: { 3: [], 2: [], 1: ['batrider', 'bloodseeker', 'bounty_hunter', 'bristleback', 'grimstroke', 'gyrocopter', 'juggernaut', 'razor', 'rubick', 'shadow_shaman', 'sniper', 'templar_assassin'] }, fur: { 3: [], 2: ['earthshaker', 'magnataur', 'monkey_king'], 1: ['beastmaster', 'centaur', 'enchantress', 'hoodwink', 'leshrac', 'lone_druid', 'lycan', 'mirana', 'riki', 'spirit_breaker', 'tusk', 'ursa'] }, scale: { 3: [], 2: ['primal_beast', 'slardar', 'viper'], 1: ['dragon_knight', 'jakiro', 'medusa', 'pangolier', 'puck', 'slark', 'snapfire', 'terrorblade', 'tidehunter', 'abyssal_underlord', 'venomancer', 'winter_wyvern'] }, minion: { 3: [], 2: ['broodmother', 'enigma', 'visage', 'warlock'], 1: ['beastmaster', 'chen', 'clinkz', 'death_prophet', 'enchantress', 'wisp', 'lycan', 'monkey_king', 'muerta', 'furion', 'undying', 'weaver'] }, illusion: { 3: [], 2: ['naga_siren', 'phantom_lancer', 'terrorblade'], 1: ['chaos_knight', 'dark_seer', 'elder_titan', 'ember_spirit', 'grimstroke', 'hoodwink', 'keeper_of_the_light', 'morphling', 'spectre', 'vengefulspirit'] }, ward: { 3: [], 2: ['shadow_shaman', 'venomancer', 'witch_doctor'], 1: ['rattletrap', 'earth_spirit', 'juggernaut', 'pugna', 'techies'] }, partner: { 3: [], 2: ['meepo'], 1: ['alchemist', 'arc_warden', 'batrider', 'dark_willow', 'elder_titan', 'wisp', 'lone_druid', 'marci', 'mirana', 'ogre_magi', 'snapfire', 'techies'] } }; /* harmony default export */ const act3_token = (act3); ;// CONCATENATED MODULE: ./src/dota2_act3/act3token_url.js var act3token_url = { flame: { name: '火焰', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/flame.png' }, frost: { name: '冰霜', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/frost.png' }, storm: { name: '风暴', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/storm.png' }, tide: { name: '潮汐', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/tide.png' }, nature: { name: '自然', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/nature.png' }, "void": { name: '虚空', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/void.png' }, blood: { name: '鲜血', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/blood.png' }, mystic: { name: '玄奥', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/mystic.png' }, armor: { name: '战甲', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/armor.png' }, helmet: { name: '战盔', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/helmet.png' }, shield: { name: '战盾', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/shield.png' }, robe: { name: '长袍', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/robe.png' }, cape: { name: '披风', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/cape.png' }, mask: { name: '面具', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/mask.png' }, fur: { name: '毛皮', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/fur.png' }, scale: { name: '鳞甲', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/scale.png' }, minion: { name: '爪牙', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/minion.png' }, illusion: { name: '幻象', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/illusion.png' }, ward: { name: '守卫', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/ward.png' }, partner: { name: '伙伴', url: 'https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/partner.png' } }; /* harmony default export */ const dota2_act3_act3token_url = (act3token_url); ;// CONCATENATED MODULE: ./src/dota2_act3/alertContent.html // Module var code = "<div> <div style=\"width:100%;height:50%;text-align:center;padding:0 0;justify-content:space-between;align-items:center;display:flex;flex-direction:row-reverse\"> <div> <div><input type=\"checkbox\" id=\"act3_flame\"/></div> <div>火焰</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_frost\"/></div> <div>冰霜</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_storm\"/></div> <div>风暴</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_tide\"/></div> <div>潮汐</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_nature\"/></div> <div>自然</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_void\"/></div> <div>虚空</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_blood\"/></div> <div>鲜血</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_mystic\"/></div> <div>玄奥</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_armor\"/></div> <div>战甲</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_helmet\"/></div> <div>战盔</div> </div> </div> <div style=\"width:100%;height:50%;text-align:center;padding:0 0;justify-content:space-between;align-items:center;display:flex;flex-direction:row-reverse\"> <div> <div><input type=\"checkbox\" id=\"act3_shield\"/></div> <div>战盾</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_robe\"/></div> <div>长袍</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_cape\"/></div> <div>披风</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_mask\"/></div> <div>面具</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_fur\"/></div> <div>毛皮</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_scale\"/></div> <div>鳞甲</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_minion\"/></div> <div>爪牙</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_illusion\"/></div> <div>幻象</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_ward\"/></div> <div>守卫</div> </div> <div> <div><input type=\"checkbox\" id=\"act3_partner\"/></div> <div>伙伴</div> </div> </div> </div> "; // Exports /* harmony default export */ const alertContent = (code); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js var injectStylesIntoStyleTag = __webpack_require__(3379); var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js var styleDomAPI = __webpack_require__(7795); var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertBySelector.js var insertBySelector = __webpack_require__(569); var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js var setAttributesWithoutAttributes = __webpack_require__(3565); var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js var insertStyleElement = __webpack_require__(9216); var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement); // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js var styleTagTransform = __webpack_require__(4589); var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform); // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./src/dota2_act3/assets/styles.css var styles = __webpack_require__(9839); ;// CONCATENATED MODULE: ./src/dota2_act3/assets/styles.css var options = {}; options.styleTagTransform = (styleTagTransform_default()); options.setAttributes = (setAttributesWithoutAttributes_default()); options.insert = insertBySelector_default().bind(null, "head"); options.domAPI = (styleDomAPI_default()); options.insertStyleElement = (insertStyleElement_default()); var update = injectStylesIntoStyleTag_default()(styles/* default */.Z, options); /* harmony default export */ const assets_styles = (styles/* default */.Z && styles/* default.locals */.Z.locals ? styles/* default.locals */.Z.locals : undefined); ;// CONCATENATED MODULE: ./src/dota2_act3/dota2_heros.js var dota2_heros = { antimage: { url: 'wiki.dota2.com.cn/hero/antimage', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_antimage.png', chi_name: '敌法师', name: 'antimage', act3_tag: ['mystic', 'mystic', 'robe'] }, axe: { url: 'wiki.dota2.com.cn/hero/axe', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_axe.png', chi_name: '斧王', name: 'axe', act3_tag: ['blood', 'armor', 'armor'] }, bane: { url: 'wiki.dota2.com.cn/hero/bane', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_bane.png', chi_name: '祸乱之源', name: 'bane', act3_tag: ['void', 'void', 'void'] }, bloodseeker: { url: 'wiki.dota2.com.cn/hero/bloodseeker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_bloodseeker.png', chi_name: '血魔', name: 'bloodseeker', act3_tag: ['blood', 'blood', 'mask'] }, crystal_maiden: { url: 'wiki.dota2.com.cn/hero/crystal_maiden', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_crystal_maiden.png', chi_name: '水晶室女', name: 'crystal_maiden', act3_tag: ['frost', 'robe', 'cape'] }, drow_ranger: { url: 'wiki.dota2.com.cn/hero/drow_ranger', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_drow_ranger.png', chi_name: '卓尔游侠', name: 'drow_ranger', act3_tag: ['frost', 'armor', 'cape'] }, earthshaker: { url: 'wiki.dota2.com.cn/hero/earthshaker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_earthshaker.png', chi_name: '撼地者', name: 'earthshaker', act3_tag: ['nature', 'fur', 'fur'] }, juggernaut: { url: 'wiki.dota2.com.cn/hero/juggernaut', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_juggernaut.png', chi_name: '主宰', name: 'juggernaut', act3_tag: ['blood', 'mask', 'ward'] }, mirana: { url: 'wiki.dota2.com.cn/hero/mirana', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_mirana.png', chi_name: '米拉娜', name: 'mirana', act3_tag: ['armor', 'fur', 'partner'] }, morphling: { url: 'wiki.dota2.com.cn/hero/morphling', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_morphling.png', chi_name: '变体精灵', name: 'morphling', act3_tag: ['tide', 'tide', 'illusion'] }, nevermore: { url: 'wiki.dota2.com.cn/hero/nevermore', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_nevermore.png', chi_name: '影魔', name: 'nevermore', act3_tag: ['flame', 'void', 'void'] }, phantom_lancer: { url: 'wiki.dota2.com.cn/hero/phantom_lancer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_phantom_lancer.png', chi_name: '幻影长矛手', name: 'phantom_lancer', act3_tag: ['armor', 'illusion', 'illusion'] }, puck: { url: 'wiki.dota2.com.cn/hero/puck', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_puck.png', chi_name: '帕克', name: 'puck', act3_tag: ['nature', 'mystic', 'scale'] }, pudge: { url: 'wiki.dota2.com.cn/hero/pudge', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_pudge.png', chi_name: '帕吉', name: 'pudge', act3_tag: ['blood', 'blood', 'blood'] }, razor: { url: 'wiki.dota2.com.cn/hero/razor', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_razor.png', chi_name: '雷泽', name: 'razor', act3_tag: ['storm', 'storm', 'mask'] }, sand_king: { url: 'wiki.dota2.com.cn/hero/sand_king', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_sand_king.png', chi_name: '沙王', name: 'sand_king', act3_tag: ['nature', 'nature', 'blood'] }, storm_spirit: { url: 'wiki.dota2.com.cn/hero/storm_spirit', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_storm_spirit.png', chi_name: '风暴之灵', name: 'storm_spirit', act3_tag: ['storm', 'armor', 'robe'] }, sven: { url: 'wiki.dota2.com.cn/hero/sven', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_sven.png', chi_name: '斯温', name: 'sven', act3_tag: ['storm', 'armor', 'helmet'] }, tiny: { url: 'wiki.dota2.com.cn/hero/tiny', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_tiny.png', chi_name: '小小', name: 'tiny', act3_tag: ['nature', 'nature', 'blood'] }, vengefulspirit: { url: 'wiki.dota2.com.cn/hero/vengefulspirit', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_vengefulspirit.png', chi_name: '复仇之魂', name: 'vengefulspirit', act3_tag: ['mystic', 'robe', 'illusion'] }, windrunner: { url: 'wiki.dota2.com.cn/hero/windrunner', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_windrunner.png', chi_name: '风行者', name: 'windrunner', act3_tag: ['nature', 'robe', 'cape'] }, zuus: { url: 'wiki.dota2.com.cn/hero/zuus', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_zuus.png', chi_name: '宙斯', name: 'zuus', act3_tag: ['storm', 'storm', 'robe'] }, kunkka: { url: 'wiki.dota2.com.cn/hero/kunkka', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_kunkka.png', chi_name: '昆卡', name: 'kunkka', act3_tag: ['tide', 'tide', 'robe'] }, lina: { url: 'wiki.dota2.com.cn/hero/lina', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_lina.png', chi_name: '莉娜', name: 'lina', act3_tag: ['flame', 'flame', 'robe'] }, lion: { url: 'wiki.dota2.com.cn/hero/lion', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_lion.png', chi_name: '莱恩', name: 'lion', act3_tag: ['mystic', 'mystic', 'cape'] }, shadow_shaman: { url: 'wiki.dota2.com.cn/hero/shadow_shaman', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_shadow_shaman.png', chi_name: '暗影萨满', name: 'shadow_shaman', act3_tag: ['mask', 'ward', 'ward'] }, slardar: { url: 'wiki.dota2.com.cn/hero/slardar', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_slardar.png', chi_name: '斯拉达', name: 'slardar', act3_tag: ['tide', 'scale', 'scale'] }, tidehunter: { url: 'wiki.dota2.com.cn/hero/tidehunter', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_tidehunter.png', chi_name: '潮汐猎人', name: 'tidehunter', act3_tag: ['tide', 'tide', 'scale'] }, witch_doctor: { url: 'wiki.dota2.com.cn/hero/witch_doctor', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_witch_doctor.png', chi_name: '巫医', name: 'witch_doctor', act3_tag: ['mystic', 'ward', 'ward'] }, lich: { url: 'wiki.dota2.com.cn/hero/lich', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_lich.png', chi_name: '巫妖', name: 'lich', act3_tag: ['frost', 'frost', 'robe'] }, riki: { url: 'wiki.dota2.com.cn/hero/riki', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_riki.png', chi_name: '力丸', name: 'riki', act3_tag: ['blood', 'fur', 'robe'] }, enigma: { url: 'wiki.dota2.com.cn/hero/enigma', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_enigma.png', chi_name: '谜团', name: 'enigma', act3_tag: ['void', 'minion', 'minion'] }, tinker: { url: 'wiki.dota2.com.cn/hero/tinker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_tinker.png', chi_name: '修补匠', name: 'tinker', act3_tag: ['helmet', 'shield', 'shield'] }, sniper: { url: 'wiki.dota2.com.cn/hero/sniper', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_sniper.png', chi_name: '狙击手', name: 'sniper', act3_tag: ['blood', 'cape', 'mask'] }, necrolyte: { url: 'wiki.dota2.com.cn/hero/necrolyte', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_necrolyte.png', chi_name: '瘟疫法师', name: 'necrolyte', act3_tag: ['blood', 'blood', 'robe'] }, warlock: { url: 'wiki.dota2.com.cn/hero/warlock', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_warlock.png', chi_name: '术士', name: 'warlock', act3_tag: ['robe', 'minion', 'minion'] }, beastmaster: { url: 'wiki.dota2.com.cn/hero/beastmaster', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_beastmaster.png', chi_name: '兽王', name: 'beastmaster', act3_tag: ['blood', 'fur', 'minion'] }, queenofpain: { url: 'wiki.dota2.com.cn/hero/queenofpain', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_queenofpain.png', chi_name: '痛苦女王', name: 'queenofpain', act3_tag: ['blood', 'blood', 'armor'] }, venomancer: { url: 'wiki.dota2.com.cn/hero/venomancer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_venomancer.png', chi_name: '剧毒术士', name: 'venomancer', act3_tag: ['scale', 'ward', 'ward'] }, faceless_void: { url: 'wiki.dota2.com.cn/hero/faceless_void', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_faceless_void.png', chi_name: '虚空假面', name: 'faceless_void', act3_tag: ['void', 'void', 'armor'] }, skeleton_king: { url: 'wiki.dota2.com.cn/hero/skeleton_king', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_skeleton_king.png', chi_name: '冥魂大帝', name: 'skeleton_king', act3_tag: ['blood', 'armor', 'cape'] }, death_prophet: { url: 'wiki.dota2.com.cn/hero/death_prophet', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_death_prophet.png', chi_name: '死亡先知', name: 'death_prophet', act3_tag: ['mystic', 'robe', 'minion'] }, phantom_assassin: { url: 'wiki.dota2.com.cn/hero/phantom_assassin', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_phantom_assassin.png', chi_name: '幻影刺客', name: 'phantom_assassin', act3_tag: ['blood', 'helmet', 'cape'] }, pugna: { url: 'wiki.dota2.com.cn/hero/pugna', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_pugna.png', chi_name: '帕格纳', name: 'pugna', act3_tag: ['mystic', 'cape', 'ward'] }, templar_assassin: { url: 'wiki.dota2.com.cn/hero/templar_assassin', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_templar_assassin.png', chi_name: '圣堂刺客', name: 'templar_assassin', act3_tag: ['void', 'robe', 'mask'] }, viper: { url: 'wiki.dota2.com.cn/hero/viper', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_viper.png', chi_name: '冥界亚龙', name: 'viper', act3_tag: ['nature', 'scale', 'scale'] }, luna: { url: 'wiki.dota2.com.cn/hero/luna', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_luna.png', chi_name: '露娜', name: 'luna', act3_tag: ['armor', 'helmet', 'shield'] }, dragon_knight: { url: 'wiki.dota2.com.cn/hero/dragon_knight', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_dragon_knight.png', chi_name: '龙骑士', name: 'dragon_knight', act3_tag: ['armor', 'shield', 'scale'] }, dazzle: { url: 'wiki.dota2.com.cn/hero/dazzle', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_dazzle.png', chi_name: '戴泽', name: 'dazzle', act3_tag: ['blood', 'mystic', 'robe'] }, rattletrap: { url: 'wiki.dota2.com.cn/hero/rattletrap', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_rattletrap.png', chi_name: '发条技师', name: 'rattletrap', act3_tag: ['armor', 'helmet', 'ward'] }, leshrac: { url: 'wiki.dota2.com.cn/hero/leshrac', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_leshrac.png', chi_name: '拉席克', name: 'leshrac', act3_tag: ['storm', 'nature', 'fur'] }, furion: { url: 'wiki.dota2.com.cn/hero/furion', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_furion.png', chi_name: '先知', name: 'furion', act3_tag: ['nature', 'cape', 'minion'] }, life_stealer: { url: 'wiki.dota2.com.cn/hero/life_stealer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_life_stealer.png', chi_name: '噬魂鬼', name: 'life_stealer', act3_tag: ['void', 'blood', 'blood'] }, dark_seer: { url: 'wiki.dota2.com.cn/hero/dark_seer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_dark_seer.png', chi_name: '黑暗贤者', name: 'dark_seer', act3_tag: ['void', 'robe', 'illusion'] }, clinkz: { url: 'wiki.dota2.com.cn/hero/clinkz', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_clinkz.png', chi_name: '克林克兹', name: 'clinkz', act3_tag: ['flame', 'flame', 'minion'] }, omniknight: { url: 'wiki.dota2.com.cn/hero/omniknight', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_omniknight.png', chi_name: '全能骑士', name: 'omniknight', act3_tag: ['armor', 'armor', 'cape'] }, enchantress: { url: 'wiki.dota2.com.cn/hero/enchantress', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_enchantress.png', chi_name: '魅惑魔女', name: 'enchantress', act3_tag: ['nature', 'fur', 'minion'] }, huskar: { url: 'wiki.dota2.com.cn/hero/huskar', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_huskar.png', chi_name: '哈斯卡', name: 'huskar', act3_tag: ['flame', 'blood', 'helmet'] }, night_stalker: { url: 'wiki.dota2.com.cn/hero/night_stalker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_night_stalker.png', chi_name: '暗夜魔王', name: 'night_stalker', act3_tag: ['nature', 'void', 'mystic'] }, broodmother: { url: 'wiki.dota2.com.cn/hero/broodmother', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_broodmother.png', chi_name: '育母蜘蛛', name: 'broodmother', act3_tag: ['blood', 'minion', 'minion'] }, bounty_hunter: { url: 'wiki.dota2.com.cn/hero/bounty_hunter', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_bounty_hunter.png', chi_name: '赏金猎人', name: 'bounty_hunter', act3_tag: ['blood', 'mystic', 'mask'] }, weaver: { url: 'wiki.dota2.com.cn/hero/weaver', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_weaver.png', chi_name: '编织者', name: 'weaver', act3_tag: ['void', 'blood', 'minion'] }, jakiro: { url: 'wiki.dota2.com.cn/hero/jakiro', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_jakiro.png', chi_name: '杰奇洛', name: 'jakiro', act3_tag: ['flame', 'frost', 'scale'] }, batrider: { url: 'wiki.dota2.com.cn/hero/batrider', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_batrider.png', chi_name: '蝙蝠骑士', name: 'batrider', act3_tag: ['flame', 'mask', 'partner'] }, chen: { url: 'wiki.dota2.com.cn/hero/chen', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_chen.png', chi_name: '陈', name: 'chen', act3_tag: ['mystic', 'armor', 'minion'] }, spectre: { url: 'wiki.dota2.com.cn/hero/spectre', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_spectre.png', chi_name: '幽鬼', name: 'spectre', act3_tag: ['void', 'void', 'illusion'] }, ancient_apparition: { url: 'wiki.dota2.com.cn/hero/ancient_apparition', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_ancient_apparition.png', chi_name: '远古冰魄', name: 'ancient_apparition', act3_tag: ['frost', 'frost', 'frost'] }, doom_bringer: { url: 'wiki.dota2.com.cn/hero/doom_bringer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_doom_bringer.png', chi_name: '末日使者', name: 'doom_bringer', act3_tag: ['flame', 'armor', 'armor'] }, ursa: { url: 'wiki.dota2.com.cn/hero/ursa', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_ursa.png', chi_name: '熊战士', name: 'ursa', act3_tag: ['nature', 'blood', 'fur'] }, spirit_breaker: { url: 'wiki.dota2.com.cn/hero/spirit_breaker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_spirit_breaker.png', chi_name: '裂魂人', name: 'spirit_breaker', act3_tag: ['void', 'armor', 'fur'] }, gyrocopter: { url: 'wiki.dota2.com.cn/hero/gyrocopter', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_gyrocopter.png', chi_name: '矮人直升机', name: 'gyrocopter', act3_tag: ['flame', 'armor', 'mask'] }, alchemist: { url: 'wiki.dota2.com.cn/hero/alchemist', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_alchemist.png', chi_name: '炼金术士', name: 'alchemist', act3_tag: ['mystic', 'mystic', 'partner'] }, invoker: { url: 'wiki.dota2.com.cn/hero/invoker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_invoker.png', chi_name: '祈求者', name: 'invoker', act3_tag: ['mystic', 'robe', 'cape'] }, silencer: { url: 'wiki.dota2.com.cn/hero/silencer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_silencer.png', chi_name: '沉默术士', name: 'silencer', act3_tag: ['mystic', 'helmet', 'shield'] }, obsidian_destroyer: { url: 'wiki.dota2.com.cn/hero/obsidian_destroyer', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_obsidian_destroyer.png', chi_name: '殁境神蚀者', name: 'obsidian_destroyer', act3_tag: ['nature', 'void', 'void'] }, lycan: { url: 'wiki.dota2.com.cn/hero/lycan', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_lycan.png', chi_name: '狼人', name: 'lycan', act3_tag: ['armor', 'fur', 'minion'] }, brewmaster: { url: 'wiki.dota2.com.cn/hero/brewmaster', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_brewmaster.png', chi_name: '酒仙', name: 'brewmaster', act3_tag: ['flame', 'storm', 'nature'] }, shadow_demon: { url: 'wiki.dota2.com.cn/hero/shadow_demon', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_shadow_demon.png', chi_name: '暗影恶魔', name: 'shadow_demon', act3_tag: ['blood', 'mystic', 'cape'] }, lone_druid: { url: 'wiki.dota2.com.cn/hero/lone_druid', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_lone_druid.png', chi_name: '德鲁伊', name: 'lone_druid', act3_tag: ['nature', 'fur', 'partner'] }, chaos_knight: { url: 'wiki.dota2.com.cn/hero/chaos_knight', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_chaos_knight.png', chi_name: '混沌骑士', name: 'chaos_knight', act3_tag: ['void', 'armor', 'illusion'] }, meepo: { url: 'wiki.dota2.com.cn/hero/meepo', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_meepo.png', chi_name: '米波', name: 'meepo', act3_tag: ['nature', 'partner', 'partner'] }, treant: { url: 'wiki.dota2.com.cn/hero/treant', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_treant.png', chi_name: '树精卫士', name: 'treant', act3_tag: ['nature', 'nature', 'armor'] }, ogre_magi: { url: 'wiki.dota2.com.cn/hero/ogre_magi', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_ogre_magi.png', chi_name: '食人魔魔法师', name: 'ogre_magi', act3_tag: ['flame', 'mystic', 'partner'] }, undying: { url: 'wiki.dota2.com.cn/hero/undying', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_undying.png', chi_name: '不朽尸王', name: 'undying', act3_tag: ['armor', 'helmet', 'minion'] }, rubick: { url: 'wiki.dota2.com.cn/hero/rubick', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_rubick.png', chi_name: '拉比克', name: 'rubick', act3_tag: ['mystic', 'cape', 'mask'] }, disruptor: { url: 'wiki.dota2.com.cn/hero/disruptor', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_disruptor.png', chi_name: '干扰者', name: 'disruptor', act3_tag: ['storm', 'storm', 'mystic'] }, nyx_assassin: { url: 'wiki.dota2.com.cn/hero/nyx_assassin', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_nyx_assassin.png', chi_name: '司夜刺客', name: 'nyx_assassin', act3_tag: ['nature', 'armor', 'shield'] }, naga_siren: { url: 'wiki.dota2.com.cn/hero/naga_siren', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_naga_siren.png', chi_name: '娜迦海妖', name: 'naga_siren', act3_tag: ['tide', 'illusion', 'illusion'] }, keeper_of_the_light: { url: 'wiki.dota2.com.cn/hero/keeper_of_the_light', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_keeper_of_the_light.png', chi_name: '光之守卫', name: 'keeper_of_the_light', act3_tag: ['mystic', 'mystic', 'illusion'] }, wisp: { url: 'wiki.dota2.com.cn/hero/wisp', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_wisp.png', chi_name: '艾欧', name: 'wisp', act3_tag: ['mystic', 'minion', 'partner'] }, visage: { url: 'wiki.dota2.com.cn/hero/visage', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_visage.png', chi_name: '维萨吉', name: 'visage', act3_tag: ['armor', 'minion', 'minion'] }, slark: { url: 'wiki.dota2.com.cn/hero/slark', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_slark.png', chi_name: '斯拉克', name: 'slark', act3_tag: ['tide', 'void', 'scale'] }, medusa: { url: 'wiki.dota2.com.cn/hero/medusa', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_medusa.png', chi_name: '美杜莎', name: 'medusa', act3_tag: ['mystic', 'shield', 'scale'] }, troll_warlord: { url: 'wiki.dota2.com.cn/hero/troll_warlord', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_troll_warlord.png', chi_name: '巨魔战将', name: 'troll_warlord', act3_tag: ['blood', 'blood', 'helmet'] }, centaur: { url: 'wiki.dota2.com.cn/hero/centaur', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_centaur.png', chi_name: '半人马战行者', name: 'centaur', act3_tag: ['blood', 'armor', 'fur'] }, magnataur: { url: 'wiki.dota2.com.cn/hero/magnataur', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_magnataur.png', chi_name: '马格纳斯', name: 'magnataur', act3_tag: ['mystic', 'fur', 'fur'] }, shredder: { url: 'wiki.dota2.com.cn/hero/shredder', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_shredder.png', chi_name: '伐木机', name: 'shredder', act3_tag: ['nature', 'armor', 'helmet'] }, bristleback: { url: 'wiki.dota2.com.cn/hero/bristleback', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_bristleback.png', chi_name: '钢背兽', name: 'bristleback', act3_tag: ['blood', 'armor', 'mask'] }, tusk: { url: 'wiki.dota2.com.cn/hero/tusk', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_tusk.png', chi_name: '巨牙海民', name: 'tusk', act3_tag: ['frost', 'frost', 'fur'] }, skywrath_mage: { url: 'wiki.dota2.com.cn/hero/skywrath_mage', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_skywrath_mage.png', chi_name: '天怒法师', name: 'skywrath_mage', act3_tag: ['mystic', 'armor', 'helmet'] }, abaddon: { url: 'wiki.dota2.com.cn/hero/abaddon', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_abaddon.png', chi_name: '亚巴顿', name: 'abaddon', act3_tag: ['mystic', 'armor', 'shield'] }, elder_titan: { url: 'wiki.dota2.com.cn/hero/elder_titan', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_elder_titan.png', chi_name: '上古巨神', name: 'elder_titan', act3_tag: ['void', 'illusion', 'partner'] }, legion_commander: { url: 'wiki.dota2.com.cn/hero/legion_commander', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_legion_commander.png', chi_name: '军团指挥官', name: 'legion_commander', act3_tag: ['armor', 'helmet', 'cape'] }, techies: { url: 'wiki.dota2.com.cn/hero/techies', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_techies.png', chi_name: '工程师', name: 'techies', act3_tag: ['helmet', 'ward', 'partner'] }, ember_spirit: { url: 'wiki.dota2.com.cn/hero/ember_spirit', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_ember_spirit.png', chi_name: '灰烬之灵', name: 'ember_spirit', act3_tag: ['flame', 'armor', 'illusion'] }, earth_spirit: { url: 'wiki.dota2.com.cn/hero/earth_spirit', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_earth_spirit.png', chi_name: '大地之灵', name: 'earth_spirit', act3_tag: ['nature', 'nature', 'ward'] }, abyssal_underlord: { url: 'wiki.dota2.com.cn/hero/abyssal_underlord', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_abyssal_underlord.png', chi_name: '孽主', name: 'abyssal_underlord', act3_tag: ['flame', 'void', 'scale'] }, terrorblade: { url: 'wiki.dota2.com.cn/hero/terrorblade', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_terrorblade.png', chi_name: '恐怖利刃', name: 'terrorblade', act3_tag: ['scale', 'illusion', 'illusion'] }, phoenix: { url: 'wiki.dota2.com.cn/hero/phoenix', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_phoenix.png', chi_name: '凤凰', name: 'phoenix', act3_tag: ['flame', 'flame', 'flame'] }, oracle: { url: 'wiki.dota2.com.cn/hero/oracle', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_oracle.png', chi_name: '神谕者', name: 'oracle', act3_tag: ['mystic', 'robe', 'robe'] }, winter_wyvern: { url: 'wiki.dota2.com.cn/hero/winter_wyvern', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_winter_wyvern.png', chi_name: '寒冬飞龙', name: 'winter_wyvern', act3_tag: ['frost', 'mystic', 'scale'] }, arc_warden: { url: 'wiki.dota2.com.cn/hero/arc_warden', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_arc_warden.png', chi_name: '天穹守望者', name: 'arc_warden', act3_tag: ['storm', 'helmet', 'partner'] }, monkey_king: { url: 'wiki.dota2.com.cn/hero/monkey_king', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_monkey_king.png', chi_name: '齐天大圣', name: 'monkey_king', act3_tag: ['fur', 'fur', 'minion'] }, dark_willow: { url: 'wiki.dota2.com.cn/hero/dark_willow', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_dark_willow.png', chi_name: '邪影芳灵', name: 'dark_willow', act3_tag: ['nature', 'mystic', 'partner'] }, pangolier: { url: 'wiki.dota2.com.cn/hero/pangolier', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_pangolier.png', chi_name: '石鳞剑士', name: 'pangolier', act3_tag: ['shield', 'shield', 'scale'] }, grimstroke: { url: 'wiki.dota2.com.cn/hero/grimstroke', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_grimstroke.png', chi_name: '天涯墨客', name: 'grimstroke', act3_tag: ['robe', 'mask', 'illusion'] }, hoodwink: { url: 'wiki.dota2.com.cn/hero/hoodwink', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_hoodwink.png', chi_name: '森海飞霞', name: 'hoodwink', act3_tag: ['nature', 'fur', 'illusion'] }, void_spirit: { url: 'wiki.dota2.com.cn/hero/void_spirit', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_void_spirit.png', chi_name: '虚无之灵', name: 'void_spirit', act3_tag: ['void', 'void', 'robe'] }, target_dummy: { url: 'wiki.dota2.com.cn/hero/target_dummy', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_target_dummy.png', chi_name: '傀儡目标', name: 'target_dummy', act3_tag: [] }, snapfire: { url: 'wiki.dota2.com.cn/hero/snapfire', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_snapfire.png', chi_name: '电炎绝手', name: 'snapfire', act3_tag: ['flame', 'scale', 'partner'] }, mars: { url: 'wiki.dota2.com.cn/hero/mars', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_mars.png', chi_name: '玛尔斯', name: 'mars', act3_tag: ['blood', 'helmet', 'shield'] }, dawnbreaker: { url: 'wiki.dota2.com.cn/hero/dawnbreaker', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_dawnbreaker.png', chi_name: '破晓辰星', name: 'dawnbreaker', act3_tag: ['flame', 'mystic', 'armor'] }, marci: { url: 'wiki.dota2.com.cn/hero/marci', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_marci.png', chi_name: '玛西', name: 'marci', act3_tag: ['blood', 'cape', 'partner'] }, primal_beast: { url: 'wiki.dota2.com.cn/hero/primal_beast', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_primal_beast.png', chi_name: '獸', name: 'primal_beast', act3_tag: ['blood', 'scale', 'scale'] }, muerta: { url: 'wiki.dota2.com.cn/hero/muerta', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_muerta.png', chi_name: '琼英碧灵', name: 'muerta', act3_tag: ['void', 'mystic', 'minion'] }, kez: { url: 'wiki.dota2.com.cn/hero/kez', img: 'https://img.dota2.com.cn/dota2static/herostatic/index/npc_dota_hero_kez.png', chi_name: '凯', name: 'kez', act3_tag: ['blood', 'blood', 'robe'] } }; /* harmony default export */ const dota2_act3_dota2_heros = (dota2_heros); ;// CONCATENATED MODULE: ./src/dota2_act3/main.js function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /////////////主逻辑////////////////////////////////////// function initScript() { //console.log(act3_token); //console.log(dota2_heros); //console.log(act3token_url); new BaseClass(); } // 等待网页完成加载 window.addEventListener('load', function () { resourceLoaded(function () { renderTokenButtonList(); initHeroToken(); }); }, false); /////////////接口函数///////////////////////////////////////////// // 展示英雄接口 function showHeroByToken(herolist) { var heroElements2 = document.evaluate('//*[@class="hl-wrapper"]/a[@class="HeroIcon"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //let grayimg = ''; for (var i = 0; i < heroElements2.snapshotLength; i++) { var node = heroElements2.snapshotItem(i); var href = node.getAttribute('href'); var name = href.split('/')[2].split('.')[0]; var svg = node.getElementsByClassName('svg-box'); //console.log(svg); var viewBox = svg[0].getAttribute('viewBox'); var dddviewbox = viewBox.split(/\s+/).map(parseFloat); //console.log(dddviewbox); var ibox = node.getElementsByClassName('i-box'); //console.log(ibox[0]); var height = ibox[0].clientHeight; var width = ibox[0].clientWidth; //console.log(height, width); /* if (grayimg == '') { grayimg = this.gray(url, height, width); } */ if (herolist == undefined) { // 展示全部英雄 ibox[0].style.opacity = 1; // 透明度を50%に指定 var tokendiv = document.getElementById('tokendiv_' + name); if (tokendiv) { tokendiv.style.opacity = 1; // 透明度を50%に指定 } else { console.log(name, ibox[0]); } } else if (herolist.indexOf(name) >= 0) { // 展示匹配代币的英雄 //console.log(name); ibox[0].style.opacity = 1; // 透明度を50%に指定 var tokendiv = document.getElementById('tokendiv_' + name); if (tokendiv) { tokendiv.style.opacity = 1; // 透明度を50%に指定 } else { console.log(name, ibox[0]); } } else { // 置灰不匹配英雄 ibox[0].style.opacity = 0.1; // 透明度を50%に指定 var tokendiv = document.getElementById('tokendiv_' + name); if (tokendiv) { tokendiv.style.opacity = 0.1; // 透明度を50%に指定 } else { console.log(name, ibox[0]); } } } } // 代币筛选英雄接口 function hitSearchKey(searchKeys) { // searchKeys null 就是menu点击了关闭窗口 就不做任何改变 // 选择了代币 展示筛选英雄 if (searchKeys && searchKeys.length > 0) { console.log(searchKeys); var intersection = []; var terminate = false; Object.keys(act3_token).forEach(function (key) { if (terminate) { return; } if (searchKeys.indexOf(key) >= 0) { //console.log(key); var tmp = []; Object.keys(act3_token[key]).forEach(function (key2) { tmp = tmp.concat(act3_token[key][key2]); }); //console.log(tmp); if (intersection.length == 0) { intersection = tmp; } else { intersection = intersection.filter(function (item) { return tmp.includes(item); }); //console.log(tmp, intersection); } if (intersection.length == 0) { terminate = true; return; } } }); console.log(intersection); var target_heros = Array.from(new Set(intersection)); if (true) { showHeroByToken(target_heros); } else { var heroslist_chi, rid; } } else if (searchKeys && searchKeys.length == 0) { // 没选择代币 展示全部英雄 showHeroByToken(); } } /////////////初始化函数/////////////////////////////////////////// // 等所有图片都加载完成后再执行 var flagResLoaded = false; function resourceLoaded(todoFunc) { if (flagResLoaded) { todoFunc(); return; } //let imgList = []; var loadCount = 0; // 因为英雄div渲染是由 JavaScript 完成 所以不能只能在load完以后再修改 Object.keys(dota2_act3_act3token_url).forEach(function (key) { // 触发网络请求 让浏览器缓存图片 // https://juejin.cn/post/7340167256267391012 var img = new Image(); img.alt = key; img.title = dota2_act3_act3token_url[key].name; img.onerror = function () { // 图片加载失败则重试 img.src = dota2_act3_act3token_url[key].url; //alert('图片加载失败:' + img.title + '/' + img.src + ',请按F5重新刷新页面'); }; img.onload = function () { loadCount++; console.log(loadCount, img.alt, img.title, img.src); if (loadCount >= Object.keys(dota2_act3_act3token_url).length) { flagResLoaded = true; todoFunc(); } }; img.src = dota2_act3_act3token_url[key].url; //imgList.push(img); }); } // 初始化 为网页 增加 代币按钮列表 function renderTokenButtonList() { function insertBefore(node, newElement) { node.insertBefore(newElement, node.firstChild); } // 代币按钮列表 样式 设置 var tokenlistdiv = document.createElement('div'); tokenlistdiv.id = 'tokenlistdiv'; // 横向 居中 紧凑排列 tokenlistdiv.style = 'width: 100%;height: 100%;text-align: center;justify-content:safe center;align-items: center;display: flex;flex-direction: row-reverse;'; // 按钮 样式 设置 Object.keys(dota2_act3_act3token_url).forEach(function (key) { var tokennode = document.createElement('div'); //tokennode.style.padding = '100px 2px'; tokennode.style.marginRight = '10px'; var tokennode_inputdiv = document.createElement('div'); var tokennode_input = document.createElement('input'); tokennode_input.type = 'checkbox'; tokennode_input.id = 'input_' + key; tokennode_input.style.backgroundImage = "url('" + dota2_act3_act3token_url[key].url + "')"; tokennode_input.style.backgroundRepeat = 'no-repeat'; tokennode_input.style.backgroundPosition = 'center'; tokennode_input.style.marginBottom = '10px'; tokennode_inputdiv.appendChild(tokennode_input); var tokennode_text = document.createElement('div'); tokennode_text.style = 'font-size: 20px;color: #fefefe;text-shadow: 0 0 0.5em #0ae642, 0 0 0.2em #5c5c5c;'; tokennode_text.innerHTML = dota2_act3_act3token_url[key].name; tokennode.appendChild(tokennode_inputdiv); tokennode.appendChild(tokennode_text); //console.log('img', act3token_url[key].url, act3token_url[key].name); tokenlistdiv.appendChild(tokennode); //console.log(key, act3token_url[key]); }); // 添加为 hero-wrap 的第一个子节点 var container = document.getElementsByClassName('hero-wrap')[0]; insertBefore(container, tokenlistdiv); // 为每个代币按钮 注册按键回调函数 var inputTag = document.getElementsByTagName('input'); var tokenTag = []; for (var i = 0; i < inputTag.length; i++) { if (inputTag[i].id.indexOf('input_') >= 0) { tokenTag.push(inputTag[i]); } } for (var i = 0; i < tokenTag.length; i++) { tokenTag[i].addEventListener('change', function () { var tmpoutput = []; for (var i = 0; i < tokenTag.length; i++) { if (tokenTag[i].checked) { tmpoutput.push(tokenTag[i].id.split('_')[1]); } } hitSearchKey(tmpoutput); }); //console.log(tokenTag[i].id, tokenTag[i].checked); } } // 给页面的每个英雄添加 3个代币属性 function initHeroToken() { var heroElements2 = document.evaluate('//*[@class="hl-wrapper"]/a[@class="HeroIcon"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //console.log(heroElements2); //console.log(heroElements2); //console.log(heroElements2.snapshotLength); for (var i = 0; i < heroElements2.snapshotLength; i++) { var node = heroElements2.snapshotItem(i); //console.log(node); var href = node.getAttribute('href'); var name = href.split('/')[2].split('.')[0]; node.setAttribute('style', 'position:relative;z-index:1;'); //console.log(node.getAttribute('style')); if (dota2_act3_dota2_heros[name] == undefined) { continue; } var tokendiv = document.createElement('div'); tokendiv.id = 'tokendiv_' + name; tokendiv.setAttribute('style', 'right:0px;position:absolute;top:10px; z-index:2;opacity:1;'); var tokenList = dota2_act3_dota2_heros[name].act3_tag; for (var index = 0; index < tokenList.length; index++) { var tokenstr = tokenList[index]; var token_img = document.createElement('img'); token_img.src = dota2_act3_act3token_url[tokenstr].url; token_img.setAttribute('style', 'width:35px;height:35px;'); tokendiv.appendChild(token_img); } node.appendChild(tokendiv); } } var mainPage = 'https://greasyfork.org/zh-CN/scripts/501114-dota2-%E5%80%BE%E5%A4%A9%E4%B9%8B%E6%88%98%E7%AC%AC%E4%B8%89%E5%B9%95-%E5%86%B0%E5%B7%9D%E6%AE%8B%E9%AA%B8-%E6%A0%BC%E7%BD%97%E5%BE%B7%E5%9B%BE%E4%B9%A6%E9%A6%86-%E4%BB%A3%E5%B8%81%E7%AD%9B%E9%80%89%E8%8B%B1%E9%9B%84'; var updateURL = 'https://update.greasyfork.org/scripts/501114/dota2%20%E5%80%BE%E5%A4%A9%E4%B9%8B%E6%88%98%E7%AC%AC%E4%B8%89%E5%B9%95%20%E5%86%B0%E5%B7%9D%E6%AE%8B%E9%AA%B8%20%E6%A0%BC%E7%BD%97%E5%BE%B7%E5%9B%BE%E4%B9%A6%E9%A6%86%20%E4%BB%A3%E5%B8%81%E7%AD%9B%E9%80%89%E8%8B%B1%E9%9B%84.user.js'; // 按钮类 var BaseClass = /*#__PURE__*/function () { function BaseClass() { var _this = this; _classCallCheck(this, BaseClass); this.firstRendor = true; this.alert = sweetalert2_all_default().mixin({ // alert 模板 可自定义 html: alertContent, /* 因为 css里有图片 直接import 让他预加载 而不是打开menu 再加载 customClass: { htmlContainer: styles, }, */ showCloseButton: true, // 改为true 后 鼠标 点 非confirm button 的地方 会关闭alert 触发 dps()函数 执行 allowOutsideClick: false, // optional classes to avoid backdrop blinking between steps showClass: { backdrop: 'swal2-noanimation' }, hideClass: { backdrop: 'swal2-noanimation' } }); GM_registerMenuCommand('主页', function () { return window.open(mainPage); }); GM_registerMenuCommand('更新', function () { return window.open(updateURL); }); GM_registerMenuCommand('格罗德图书馆', function () { return _this.menu(); }); GM_registerMenuCommand('reset', function () { return showHeroByToken(); }); } // 置灰图片函数 _createClass(BaseClass, [{ key: "gray", value: function gray(imgObj, height, width) { var canvas = document.createElement('canvas'); var canvasContext = canvas.getContext('2d'); var imgW = width; var imgH = height; var newImage = new Image(); newImage.src = imgObj + '?' + new Date().getTime(); newImage.setAttribute('crossOrigin', ''); canvas.width = imgW; canvas.height = imgH; //console.log(imgW, imgH); canvasContext.drawImage(newImage, 0, 0); var imgPixels = canvasContext.getImageData(0, 0, imgW, imgH); for (var y = 0; y < imgPixels.height; y++) { for (var x = 0; x < imgPixels.width; x++) { var i = y * 4 * imgPixels.width + x * 4; var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3; imgPixels.data[i] = avg; imgPixels.data[i + 1] = avg; imgPixels.data[i + 2] = avg; } } canvasContext.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height); return canvas.toDataURL(); } }, { key: "menu", value: function menu() { var _this2 = this; resourceLoaded( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { var _yield$_this2$alert$f, searchKeys; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return _this2.alert.fire({ title: 'dota2 倾天之战第三幕冰川残骸 格罗德图书馆', text: '请选择代币', imageUrl: '', imageWidth: 100, imageAlt: '直播间头像', preConfirm: function preConfirm() { var tmpoutput = []; var tag = document.getElementsByTagName('input'); for (var i = 0; i < tag.length; i++) { //console.log(tag[i].id, tag[i].checked, tag[i].id.indexOf('act3_')); if (tag[i].id.indexOf('act3_') >= 0) { if (tag[i].checked) { tmpoutput.push(tag[i].id.split('_')[1]); } //console.log(tag[i].id, tag[i].checked); } } return tmpoutput; } }); case 2: _yield$_this2$alert$f = _context.sent; searchKeys = _yield$_this2$alert$f.value; hitSearchKey(searchKeys); case 5: case "end": return _context.stop(); } } }, _callee); }))); } }]); return BaseClass; }(); /***/ }), /***/ 9839: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8081); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3645); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* 创建一个开关按钮的样式 */\r\n.switch {\r\n position: relative;\r\n display: inline-block;\r\n width: 60px;\r\n height: 34px;\r\n}\r\n\r\n/* 隐藏开关按钮的输入框 */\r\n.switch input {\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n/* 创建滑块的样式 */\r\n.slider {\r\n position: absolute;\r\n cursor: pointer;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: #ccc;\r\n transition: 0.4s;\r\n}\r\n\r\n/* 创建滑块的初始状态 */\r\n.slider:before {\r\n position: absolute;\r\n content: '';\r\n height: 26px;\r\n width: 26px;\r\n left: 4px;\r\n bottom: 4px;\r\n background-color: white;\r\n transition: 0.4s;\r\n}\r\n/* 当输入框被选中时,改变滑块的背景颜色 */\r\ninput:checked + .slider {\r\n background-color: #2196f3;\r\n}\r\n\r\n/* 当输入框被聚焦时,给滑块添加阴影 */\r\ninput:focus + .slider {\r\n box-shadow: 0 0 1px #2196f3;\r\n}\r\n\r\n/* 当输入框被选中时,移动滑块 */\r\ninput:checked + .slider:before {\r\n transform: translateX(26px);\r\n}\r\n\r\n/* 创建滑块的圆角样式 */\r\n.slider.round {\r\n border-radius: 34px;\r\n}\r\n\r\n/* 创建滑块的圆形样式 */\r\n.slider.round:before {\r\n border-radius: 50%;\r\n}\r\n\r\ninput {\r\n /*取消默认样式*/\r\n appearance: none;\r\n\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n\r\n border: 6px solid #999;\r\n transition: 0.2s all linear;\r\n margin-right: 5px;\r\n\r\n position: relative;\r\n top: 10px;\r\n}\r\n\r\ninput:checked {\r\n border: 6px solid red;\r\n}\r\n\r\n#act3_scale {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/scale.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_fur {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/fur.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_cape {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/cape.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_robe {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/robe.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_helmet {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/helmet.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_tide {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/tide.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_flame {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/flame.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_partner {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/partner.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_ward {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/ward.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_illusion {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/illusion.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_minion {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/minion.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_mask {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/mask.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_shield {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/shield.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_armor {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/armor.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_mystic {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/mystic.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_blood {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/blood.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_void {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/void.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_nature {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/nature.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_storm {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/storm.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n\r\n#act3_frost {\r\n background-image: url('https://raw.githubusercontent.com/Zirpon/douyu-helper/main/src/dota2_act3/assets/img/frost.png');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n", ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); /***/ }), /***/ 3645: /***/ ((module) => { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ module.exports = function (cssWithMappingToString) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = ""; var needLayer = typeof item[5] !== "undefined"; if (item[4]) { content += "@supports (".concat(item[4], ") {"); } if (item[2]) { content += "@media ".concat(item[2], " {"); } if (needLayer) { content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); } content += cssWithMappingToString(item); if (needLayer) { content += "}"; } if (item[2]) { content += "}"; } if (item[4]) { content += "}"; } return content; }).join(""); }; // import a list of modules into the list list.i = function i(modules, media, dedupe, supports, layer) { if (typeof modules === "string") { modules = [[null, modules, undefined]]; } var alreadyImportedModules = {}; if (dedupe) { for (var k = 0; k < this.length; k++) { var id = this[k][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _k = 0; _k < modules.length; _k++) { var item = [].concat(modules[_k]); if (dedupe && alreadyImportedModules[item[0]]) { continue; } if (typeof layer !== "undefined") { if (typeof item[5] === "undefined") { item[5] = layer; } else { item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); item[5] = layer; } } if (media) { if (!item[2]) { item[2] = media; } else { item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); item[2] = media; } } if (supports) { if (!item[4]) { item[4] = "".concat(supports); } else { item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); item[4] = supports; } } list.push(item); } }; return list; }; /***/ }), /***/ 8081: /***/ ((module) => { "use strict"; module.exports = function (i) { return i[1]; }; /***/ }), /***/ 3379: /***/ ((module) => { "use strict"; var stylesInDOM = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDOM.length; i++) { if (stylesInDOM[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var indexByIdentifier = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3], supports: item[4], layer: item[5] }; if (indexByIdentifier !== -1) { stylesInDOM[indexByIdentifier].references++; stylesInDOM[indexByIdentifier].updater(obj); } else { var updater = addElementStyle(obj, options); options.byIndex = i; stylesInDOM.splice(i, 0, { identifier: identifier, updater: updater, references: 1 }); } identifiers.push(identifier); } return identifiers; } function addElementStyle(obj, options) { var api = options.domAPI(options); api.update(obj); var updater = function updater(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { return; } api.update(obj = newObj); } else { api.remove(); } }; return updater; } module.exports = function (list, options) { options = options || {}; list = list || []; var lastIdentifiers = modulesToDom(list, options); return function update(newList) { newList = newList || []; for (var i = 0; i < lastIdentifiers.length; i++) { var identifier = lastIdentifiers[i]; var index = getIndexByIdentifier(identifier); stylesInDOM[index].references--; } var newLastIdentifiers = modulesToDom(newList, options); for (var _i = 0; _i < lastIdentifiers.length; _i++) { var _identifier = lastIdentifiers[_i]; var _index = getIndexByIdentifier(_identifier); if (stylesInDOM[_index].references === 0) { stylesInDOM[_index].updater(); stylesInDOM.splice(_index, 1); } } lastIdentifiers = newLastIdentifiers; }; }; /***/ }), /***/ 569: /***/ ((module) => { "use strict"; var memo = {}; /* istanbul ignore next */ function getTarget(target) { if (typeof memo[target] === "undefined") { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; } /* istanbul ignore next */ function insertBySelector(insert, style) { var target = getTarget(insert); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } module.exports = insertBySelector; /***/ }), /***/ 9216: /***/ ((module) => { "use strict"; /* istanbul ignore next */ function insertStyleElement(options) { var element = document.createElement("style"); options.setAttributes(element, options.attributes); options.insert(element, options.options); return element; } module.exports = insertStyleElement; /***/ }), /***/ 3565: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* istanbul ignore next */ function setAttributesWithoutAttributes(styleElement) { var nonce = true ? __webpack_require__.nc : 0; if (nonce) { styleElement.setAttribute("nonce", nonce); } } module.exports = setAttributesWithoutAttributes; /***/ }), /***/ 7795: /***/ ((module) => { "use strict"; /* istanbul ignore next */ function apply(styleElement, options, obj) { var css = ""; if (obj.supports) { css += "@supports (".concat(obj.supports, ") {"); } if (obj.media) { css += "@media ".concat(obj.media, " {"); } var needLayer = typeof obj.layer !== "undefined"; if (needLayer) { css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); } css += obj.css; if (needLayer) { css += "}"; } if (obj.media) { css += "}"; } if (obj.supports) { css += "}"; } var sourceMap = obj.sourceMap; if (sourceMap && typeof btoa !== "undefined") { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ options.styleTagTransform(css, styleElement, options.options); } function removeStyleElement(styleElement) { // istanbul ignore if if (styleElement.parentNode === null) { return false; } styleElement.parentNode.removeChild(styleElement); } /* istanbul ignore next */ function domAPI(options) { var styleElement = options.insertStyleElement(options); return { update: function update(obj) { apply(styleElement, options, obj); }, remove: function remove() { removeStyleElement(styleElement); } }; } module.exports = domAPI; /***/ }), /***/ 4589: /***/ ((module) => { "use strict"; /* istanbul ignore next */ function styleTagTransform(css, styleElement) { if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild); } styleElement.appendChild(document.createTextNode(css)); } } module.exports = styleTagTransform; /***/ }), /***/ 6455: /***/ (function(module) { /*! * sweetalert2 v11.12.2 * Released under the MIT License. */ (function (global, factory) { true ? module.exports = factory() : 0; })(this, (function () { 'use strict'; function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _classPrivateFieldGet2(s, a) { return s.get(_assertClassBrand(s, a)); } function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } function _classPrivateFieldSet2(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return p; } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) { t && (r = t); var n = 0, F = function () {}; return { s: F, n: function () { return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] }; }, e: function (r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function () { t = t.call(r); }, n: function () { var r = t.next(); return a = r.done, r; }, e: function (r) { u = !0, o = r; }, f: function () { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); } function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; } function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r ); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } var RESTORE_FOCUS_TIMEOUT = 100; /** @type {GlobalState} */ var globalState = {}; var focusPreviousActiveElement = function focusPreviousActiveElement() { if (globalState.previousActiveElement instanceof HTMLElement) { globalState.previousActiveElement.focus(); globalState.previousActiveElement = null; } else if (document.body) { document.body.focus(); } }; /** * Restore previous active (focused) element * * @param {boolean} returnFocus * @returns {Promise<void>} */ var restoreActiveElement = function restoreActiveElement(returnFocus) { return new Promise(function (resolve) { if (!returnFocus) { return resolve(); } var x = window.scrollX; var y = window.scrollY; globalState.restoreFocusTimeout = setTimeout(function () { focusPreviousActiveElement(); resolve(); }, RESTORE_FOCUS_TIMEOUT); // issues/900 window.scrollTo(x, y); }); }; var swalPrefix = 'swal2-'; /** * @typedef * { | 'container' * | 'shown' * | 'height-auto' * | 'iosfix' * | 'popup' * | 'modal' * | 'no-backdrop' * | 'no-transition' * | 'toast' * | 'toast-shown' * | 'show' * | 'hide' * | 'close' * | 'title' * | 'html-container' * | 'actions' * | 'confirm' * | 'deny' * | 'cancel' * | 'default-outline' * | 'footer' * | 'icon' * | 'icon-content' * | 'image' * | 'input' * | 'file' * | 'range' * | 'select' * | 'radio' * | 'checkbox' * | 'label' * | 'textarea' * | 'inputerror' * | 'input-label' * | 'validation-message' * | 'progress-steps' * | 'active-progress-step' * | 'progress-step' * | 'progress-step-line' * | 'loader' * | 'loading' * | 'styled' * | 'top' * | 'top-start' * | 'top-end' * | 'top-left' * | 'top-right' * | 'center' * | 'center-start' * | 'center-end' * | 'center-left' * | 'center-right' * | 'bottom' * | 'bottom-start' * | 'bottom-end' * | 'bottom-left' * | 'bottom-right' * | 'grow-row' * | 'grow-column' * | 'grow-fullscreen' * | 'rtl' * | 'timer-progress-bar' * | 'timer-progress-bar-container' * | 'scrollbar-measure' * | 'icon-success' * | 'icon-warning' * | 'icon-info' * | 'icon-question' * | 'icon-error' * } SwalClass * @typedef {Record<SwalClass, string>} SwalClasses */ /** * @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon * @typedef {Record<SwalIcon, string>} SwalIcons */ /** @type {SwalClass[]} */ var classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']; var swalClasses = classNames.reduce(function (acc, className) { acc[className] = swalPrefix + className; return acc; }, /** @type {SwalClasses} */{}); /** @type {SwalIcon[]} */ var icons = ['success', 'warning', 'info', 'question', 'error']; var iconTypes = icons.reduce(function (acc, icon) { acc[icon] = swalPrefix + icon; return acc; }, /** @type {SwalIcons} */{}); var consolePrefix = 'SweetAlert2:'; /** * Capitalize the first letter of a string * * @param {string} str * @returns {string} */ var capitalizeFirstLetter = function capitalizeFirstLetter(str) { return str.charAt(0).toUpperCase() + str.slice(1); }; /** * Standardize console warnings * * @param {string | string[]} message */ var warn = function warn(message) { console.warn("".concat(consolePrefix, " ").concat(_typeof(message) === 'object' ? message.join(' ') : message)); }; /** * Standardize console errors * * @param {string} message */ var error = function error(message) { console.error("".concat(consolePrefix, " ").concat(message)); }; /** * Private global state for `warnOnce` * * @type {string[]} * @private */ var previousWarnOnceMessages = []; /** * Show a console warning, but only if it hasn't already been shown * * @param {string} message */ var warnOnce = function warnOnce(message) { if (!previousWarnOnceMessages.includes(message)) { previousWarnOnceMessages.push(message); warn(message); } }; /** * Show a one-time console warning about deprecated params/methods * * @param {string} deprecatedParam * @param {string?} useInstead */ var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam) { var useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release.").concat(useInstead ? " Use \"".concat(useInstead, "\" instead.") : '')); }; /** * If `arg` is a function, call it (with no arguments or context) and return the result. * Otherwise, just pass the value through * * @param {Function | any} arg * @returns {any} */ var callIfFunction = function callIfFunction(arg) { return typeof arg === 'function' ? arg() : arg; }; /** * @param {any} arg * @returns {boolean} */ var hasToPromiseFn = function hasToPromiseFn(arg) { return arg && typeof arg.toPromise === 'function'; }; /** * @param {any} arg * @returns {Promise<any>} */ var asPromise = function asPromise(arg) { return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); }; /** * @param {any} arg * @returns {boolean} */ var isPromise = function isPromise(arg) { return arg && Promise.resolve(arg) === arg; }; /** * Gets the popup container which contains the backdrop and the popup itself. * * @returns {HTMLElement | null} */ var getContainer = function getContainer() { return document.body.querySelector(".".concat(swalClasses.container)); }; /** * @param {string} selectorString * @returns {HTMLElement | null} */ var elementBySelector = function elementBySelector(selectorString) { var container = getContainer(); return container ? container.querySelector(selectorString) : null; }; /** * @param {string} className * @returns {HTMLElement | null} */ var elementByClass = function elementByClass(className) { return elementBySelector(".".concat(className)); }; /** * @returns {HTMLElement | null} */ var getPopup = function getPopup() { return elementByClass(swalClasses.popup); }; /** * @returns {HTMLElement | null} */ var getIcon = function getIcon() { return elementByClass(swalClasses.icon); }; /** * @returns {HTMLElement | null} */ var getIconContent = function getIconContent() { return elementByClass(swalClasses['icon-content']); }; /** * @returns {HTMLElement | null} */ var getTitle = function getTitle() { return elementByClass(swalClasses.title); }; /** * @returns {HTMLElement | null} */ var getHtmlContainer = function getHtmlContainer() { return elementByClass(swalClasses['html-container']); }; /** * @returns {HTMLElement | null} */ var getImage = function getImage() { return elementByClass(swalClasses.image); }; /** * @returns {HTMLElement | null} */ var getProgressSteps = function getProgressSteps() { return elementByClass(swalClasses['progress-steps']); }; /** * @returns {HTMLElement | null} */ var getValidationMessage = function getValidationMessage() { return elementByClass(swalClasses['validation-message']); }; /** * @returns {HTMLButtonElement | null} */ var getConfirmButton = function getConfirmButton() { return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); }; /** * @returns {HTMLButtonElement | null} */ var getCancelButton = function getCancelButton() { return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); }; /** * @returns {HTMLButtonElement | null} */ var getDenyButton = function getDenyButton() { return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); }; /** * @returns {HTMLElement | null} */ var getInputLabel = function getInputLabel() { return elementByClass(swalClasses['input-label']); }; /** * @returns {HTMLElement | null} */ var getLoader = function getLoader() { return elementBySelector(".".concat(swalClasses.loader)); }; /** * @returns {HTMLElement | null} */ var getActions = function getActions() { return elementByClass(swalClasses.actions); }; /** * @returns {HTMLElement | null} */ var getFooter = function getFooter() { return elementByClass(swalClasses.footer); }; /** * @returns {HTMLElement | null} */ var getTimerProgressBar = function getTimerProgressBar() { return elementByClass(swalClasses['timer-progress-bar']); }; /** * @returns {HTMLElement | null} */ var getCloseButton = function getCloseButton() { return elementByClass(swalClasses.close); }; // https://github.com/jkup/focusable/blob/master/index.js var focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; /** * @returns {HTMLElement[]} */ var getFocusableElements = function getFocusableElements() { var popup = getPopup(); if (!popup) { return []; } /** @type {NodeListOf<HTMLElement>} */ var focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); var focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) // sort according to tabindex .sort(function (a, b) { var tabindexA = parseInt(a.getAttribute('tabindex') || '0'); var tabindexB = parseInt(b.getAttribute('tabindex') || '0'); if (tabindexA > tabindexB) { return 1; } else if (tabindexA < tabindexB) { return -1; } return 0; }); /** @type {NodeListOf<HTMLElement>} */ var otherFocusableElements = popup.querySelectorAll(focusable); var otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(function (el) { return el.getAttribute('tabindex') !== '-1'; }); return _toConsumableArray(new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))).filter(function (el) { return isVisible$1(el); }); }; /** * @returns {boolean} */ var isModal = function isModal() { return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']); }; /** * @returns {boolean} */ var isToast = function isToast() { var popup = getPopup(); if (!popup) { return false; } return hasClass(popup, swalClasses.toast); }; /** * @returns {boolean} */ var isLoading = function isLoading() { var popup = getPopup(); if (!popup) { return false; } return popup.hasAttribute('data-loading'); }; /** * Securely set innerHTML of an element * https://github.com/sweetalert2/sweetalert2/issues/1926 * * @param {HTMLElement} elem * @param {string} html */ var setInnerHtml = function setInnerHtml(elem, html) { elem.textContent = ''; if (html) { var parser = new DOMParser(); var parsed = parser.parseFromString(html, "text/html"); var head = parsed.querySelector('head'); head && Array.from(head.childNodes).forEach(function (child) { elem.appendChild(child); }); var body = parsed.querySelector('body'); body && Array.from(body.childNodes).forEach(function (child) { if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 } else { elem.appendChild(child); } }); } }; /** * @param {HTMLElement} elem * @param {string} className * @returns {boolean} */ var hasClass = function hasClass(elem, className) { if (!className) { return false; } var classList = className.split(/\s+/); for (var i = 0; i < classList.length; i++) { if (!elem.classList.contains(classList[i])) { return false; } } return true; }; /** * @param {HTMLElement} elem * @param {SweetAlertOptions} params */ var removeCustomClasses = function removeCustomClasses(elem, params) { Array.from(elem.classList).forEach(function (className) { if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { elem.classList.remove(className); } }); }; /** * @param {HTMLElement} elem * @param {SweetAlertOptions} params * @param {string} className */ var applyCustomClass = function applyCustomClass(elem, params, className) { removeCustomClasses(elem, params); if (!params.customClass) { return; } var customClass = params.customClass[( /** @type {keyof SweetAlertCustomClass} */className)]; if (!customClass) { return; } if (typeof customClass !== 'string' && !customClass.forEach) { warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(customClass), "\"")); return; } addClass(elem, customClass); }; /** * @param {HTMLElement} popup * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass * @returns {HTMLInputElement | null} */ var getInput$1 = function getInput(popup, inputClass) { if (!inputClass) { return null; } switch (inputClass) { case 'select': case 'textarea': case 'file': return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses[inputClass])); case 'checkbox': return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.checkbox, " input")); case 'radio': return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.radio, " input:first-child")); case 'range': return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.range, " input")); default: return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.input)); } }; /** * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input */ var focusInput = function focusInput(input) { input.focus(); // place cursor at end of text in text input if (input.type !== 'file') { // http://stackoverflow.com/a/2345915 var val = input.value; input.value = ''; input.value = val; } }; /** * @param {HTMLElement | HTMLElement[] | null} target * @param {string | string[] | readonly string[] | undefined} classList * @param {boolean} condition */ var toggleClass = function toggleClass(target, classList, condition) { if (!target || !classList) { return; } if (typeof classList === 'string') { classList = classList.split(/\s+/).filter(Boolean); } classList.forEach(function (className) { if (Array.isArray(target)) { target.forEach(function (elem) { condition ? elem.classList.add(className) : elem.classList.remove(className); }); } else { condition ? target.classList.add(className) : target.classList.remove(className); } }); }; /** * @param {HTMLElement | HTMLElement[] | null} target * @param {string | string[] | readonly string[] | undefined} classList */ var addClass = function addClass(target, classList) { toggleClass(target, classList, true); }; /** * @param {HTMLElement | HTMLElement[] | null} target * @param {string | string[] | readonly string[] | undefined} classList */ var removeClass = function removeClass(target, classList) { toggleClass(target, classList, false); }; /** * Get direct child of an element by class name * * @param {HTMLElement} elem * @param {string} className * @returns {HTMLElement | undefined} */ var getDirectChildByClass = function getDirectChildByClass(elem, className) { var children = Array.from(elem.children); for (var i = 0; i < children.length; i++) { var child = children[i]; if (child instanceof HTMLElement && hasClass(child, className)) { return child; } } }; /** * @param {HTMLElement} elem * @param {string} property * @param {*} value */ var applyNumericalStyle = function applyNumericalStyle(elem, property, value) { if (value === "".concat(parseInt(value))) { value = parseInt(value); } if (value || parseInt(value) === 0) { elem.style.setProperty(property, typeof value === 'number' ? "".concat(value, "px") : value); } else { elem.style.removeProperty(property); } }; /** * @param {HTMLElement | null} elem * @param {string} display */ var show = function show(elem) { var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; elem && (elem.style.display = display); }; /** * @param {HTMLElement | null} elem */ var hide = function hide(elem) { elem && (elem.style.display = 'none'); }; /** * @param {HTMLElement | null} elem * @param {string} display */ var showWhenInnerHtmlPresent = function showWhenInnerHtmlPresent(elem) { var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; if (!elem) { return; } new MutationObserver(function () { toggle(elem, elem.innerHTML, display); }).observe(elem, { childList: true, subtree: true }); }; /** * @param {HTMLElement} parent * @param {string} selector * @param {string} property * @param {string} value */ var setStyle = function setStyle(parent, selector, property, value) { /** @type {HTMLElement | null} */ var el = parent.querySelector(selector); if (el) { el.style.setProperty(property, value); } }; /** * @param {HTMLElement} elem * @param {any} condition * @param {string} display */ var toggle = function toggle(elem, condition) { var display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; condition ? show(elem, display) : hide(elem); }; /** * borrowed from jquery $(elem).is(':visible') implementation * * @param {HTMLElement | null} elem * @returns {boolean} */ var isVisible$1 = function isVisible(elem) { return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); }; /** * @returns {boolean} */ var allButtonsAreHidden = function allButtonsAreHidden() { return !isVisible$1(getConfirmButton()) && !isVisible$1(getDenyButton()) && !isVisible$1(getCancelButton()); }; /** * @param {HTMLElement} elem * @returns {boolean} */ var isScrollable = function isScrollable(elem) { return !!(elem.scrollHeight > elem.clientHeight); }; /** * borrowed from https://stackoverflow.com/a/46352119 * * @param {HTMLElement} elem * @returns {boolean} */ var hasCssAnimation = function hasCssAnimation(elem) { var style = window.getComputedStyle(elem); var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); return animDuration > 0 || transDuration > 0; }; /** * @param {number} timer * @param {boolean} reset */ var animateTimerProgressBar = function animateTimerProgressBar(timer) { var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var timerProgressBar = getTimerProgressBar(); if (!timerProgressBar) { return; } if (isVisible$1(timerProgressBar)) { if (reset) { timerProgressBar.style.transition = 'none'; timerProgressBar.style.width = '100%'; } setTimeout(function () { timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); timerProgressBar.style.width = '0%'; }, 10); } }; var stopTimerProgressBar = function stopTimerProgressBar() { var timerProgressBar = getTimerProgressBar(); if (!timerProgressBar) { return; } var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = '100%'; var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); var timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); }; /** * Detect Node env * * @returns {boolean} */ var isNodeEnv = function isNodeEnv() { return typeof window === 'undefined' || typeof document === 'undefined'; }; var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses['html-container'], "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <button type=\"button\" class=\"").concat(swalClasses.close, "\"></button>\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, "\"></div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <div class=\"").concat(swalClasses['html-container'], "\" id=\"").concat(swalClasses['html-container'], "\"></div>\n <input class=\"").concat(swalClasses.input, "\" id=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\" id=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" id=\"").concat(swalClasses.checkbox, "\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\" id=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n <div class=\"").concat(swalClasses.actions, "\">\n <div class=\"").concat(swalClasses.loader, "\"></div>\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.deny, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\"></div>\n <div class=\"").concat(swalClasses['timer-progress-bar-container'], "\">\n <div class=\"").concat(swalClasses['timer-progress-bar'], "\"></div>\n </div>\n </div>\n").replace(/(^|\n)\s*/g, ''); /** * @returns {boolean} */ var resetOldContainer = function resetOldContainer() { var oldContainer = getContainer(); if (!oldContainer) { return false; } oldContainer.remove(); removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); return true; }; var resetValidationMessage$1 = function resetValidationMessage() { globalState.currentInstance.resetValidationMessage(); }; var addInputChangeListeners = function addInputChangeListeners() { var popup = getPopup(); var input = getDirectChildByClass(popup, swalClasses.input); var file = getDirectChildByClass(popup, swalClasses.file); /** @type {HTMLInputElement} */ var range = popup.querySelector(".".concat(swalClasses.range, " input")); /** @type {HTMLOutputElement} */ var rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); var select = getDirectChildByClass(popup, swalClasses.select); /** @type {HTMLInputElement} */ var checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); var textarea = getDirectChildByClass(popup, swalClasses.textarea); input.oninput = resetValidationMessage$1; file.onchange = resetValidationMessage$1; select.onchange = resetValidationMessage$1; checkbox.onchange = resetValidationMessage$1; textarea.oninput = resetValidationMessage$1; range.oninput = function () { resetValidationMessage$1(); rangeOutput.value = range.value; }; range.onchange = function () { resetValidationMessage$1(); rangeOutput.value = range.value; }; }; /** * @param {string | HTMLElement} target * @returns {HTMLElement} */ var getTarget = function getTarget(target) { return typeof target === 'string' ? document.querySelector(target) : target; }; /** * @param {SweetAlertOptions} params */ var setupAccessibility = function setupAccessibility(params) { var popup = getPopup(); popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); if (!params.toast) { popup.setAttribute('aria-modal', 'true'); } }; /** * @param {HTMLElement} targetElement */ var setupRTL = function setupRTL(targetElement) { if (window.getComputedStyle(targetElement).direction === 'rtl') { addClass(getContainer(), swalClasses.rtl); } }; /** * Add modal + backdrop + no-war message for Russians to DOM * * @param {SweetAlertOptions} params */ var init = function init(params) { // Clean up the old popup container if it exists var oldContainerExisted = resetOldContainer(); if (isNodeEnv()) { error('SweetAlert2 requires document to initialize'); return; } var container = document.createElement('div'); container.className = swalClasses.container; if (oldContainerExisted) { addClass(container, swalClasses['no-transition']); } setInnerHtml(container, sweetHTML); var targetElement = getTarget(params.target); targetElement.appendChild(container); setupAccessibility(params); setupRTL(targetElement); addInputChangeListeners(); }; /** * @param {HTMLElement | object | string} param * @param {HTMLElement} target */ var parseHtmlToContainer = function parseHtmlToContainer(param, target) { // DOM element if (param instanceof HTMLElement) { target.appendChild(param); } // Object else if (_typeof(param) === 'object') { handleObject(param, target); } // Plain string else if (param) { setInnerHtml(target, param); } }; /** * @param {any} param * @param {HTMLElement} target */ var handleObject = function handleObject(param, target) { // JQuery element(s) if (param.jquery) { handleJqueryElem(target, param); } // For other objects use their string representation else { setInnerHtml(target, param.toString()); } }; /** * @param {HTMLElement} target * @param {any} elem */ var handleJqueryElem = function handleJqueryElem(target, elem) { target.textContent = ''; if (0 in elem) { for (var i = 0; (i in elem); i++) { target.appendChild(elem[i].cloneNode(true)); } } else { target.appendChild(elem.cloneNode(true)); } }; /** * @returns {'webkitAnimationEnd' | 'animationend' | false} */ var animationEndEvent = function () { // Prevent run in Node env if (isNodeEnv()) { return false; } var testEl = document.createElement('div'); // Chrome, Safari and Opera if (typeof testEl.style.webkitAnimation !== 'undefined') { return 'webkitAnimationEnd'; } // Standard syntax if (typeof testEl.style.animation !== 'undefined') { return 'animationend'; } return false; }(); /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderActions = function renderActions(instance, params) { var actions = getActions(); var loader = getLoader(); if (!actions || !loader) { return; } // Actions (buttons) wrapper if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { hide(actions); } else { show(actions); } // Custom class applyCustomClass(actions, params, 'actions'); // Render all the buttons renderButtons(actions, loader, params); // Loader setInnerHtml(loader, params.loaderHtml || ''); applyCustomClass(loader, params, 'loader'); }; /** * @param {HTMLElement} actions * @param {HTMLElement} loader * @param {SweetAlertOptions} params */ function renderButtons(actions, loader, params) { var confirmButton = getConfirmButton(); var denyButton = getDenyButton(); var cancelButton = getCancelButton(); if (!confirmButton || !denyButton || !cancelButton) { return; } // Render buttons renderButton(confirmButton, 'confirm', params); renderButton(denyButton, 'deny', params); renderButton(cancelButton, 'cancel', params); handleButtonsStyling(confirmButton, denyButton, cancelButton, params); if (params.reverseButtons) { if (params.toast) { actions.insertBefore(cancelButton, confirmButton); actions.insertBefore(denyButton, confirmButton); } else { actions.insertBefore(cancelButton, loader); actions.insertBefore(denyButton, loader); actions.insertBefore(confirmButton, loader); } } } /** * @param {HTMLElement} confirmButton * @param {HTMLElement} denyButton * @param {HTMLElement} cancelButton * @param {SweetAlertOptions} params */ function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { if (!params.buttonsStyling) { removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); return; } addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors if (params.confirmButtonColor) { confirmButton.style.backgroundColor = params.confirmButtonColor; addClass(confirmButton, swalClasses['default-outline']); } if (params.denyButtonColor) { denyButton.style.backgroundColor = params.denyButtonColor; addClass(denyButton, swalClasses['default-outline']); } if (params.cancelButtonColor) { cancelButton.style.backgroundColor = params.cancelButtonColor; addClass(cancelButton, swalClasses['default-outline']); } } /** * @param {HTMLElement} button * @param {'confirm' | 'deny' | 'cancel'} buttonType * @param {SweetAlertOptions} params */ function renderButton(button, buttonType, params) { var buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); toggle(button, params["show".concat(buttonName, "Button")], 'inline-block'); setInnerHtml(button, params["".concat(buttonType, "ButtonText")] || ''); // Set caption text button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")] || ''); // ARIA label // Add buttons custom classes button.className = swalClasses[buttonType]; applyCustomClass(button, params, "".concat(buttonType, "Button")); } /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderCloseButton = function renderCloseButton(instance, params) { var closeButton = getCloseButton(); if (!closeButton) { return; } setInnerHtml(closeButton, params.closeButtonHtml || ''); // Custom class applyCustomClass(closeButton, params, 'closeButton'); toggle(closeButton, params.showCloseButton); closeButton.setAttribute('aria-label', params.closeButtonAriaLabel || ''); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderContainer = function renderContainer(instance, params) { var container = getContainer(); if (!container) { return; } handleBackdropParam(container, params.backdrop); handlePositionParam(container, params.position); handleGrowParam(container, params.grow); // Custom class applyCustomClass(container, params, 'container'); }; /** * @param {HTMLElement} container * @param {SweetAlertOptions['backdrop']} backdrop */ function handleBackdropParam(container, backdrop) { if (typeof backdrop === 'string') { container.style.background = backdrop; } else if (!backdrop) { addClass([document.documentElement, document.body], swalClasses['no-backdrop']); } } /** * @param {HTMLElement} container * @param {SweetAlertOptions['position']} position */ function handlePositionParam(container, position) { if (!position) { return; } if (position in swalClasses) { addClass(container, swalClasses[position]); } else { warn('The "position" parameter is not valid, defaulting to "center"'); addClass(container, swalClasses.center); } } /** * @param {HTMLElement} container * @param {SweetAlertOptions['grow']} grow */ function handleGrowParam(container, grow) { if (!grow) { return; } addClass(container, swalClasses["grow-".concat(grow)]); } /** * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` * This is the approach that Babel will probably take to implement private methods/fields * https://github.com/tc39/proposal-private-methods * https://github.com/babel/babel/pull/7555 * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* * then we can use that language feature. */ var privateProps = { innerParams: new WeakMap(), domCache: new WeakMap() }; /** @type {InputClass[]} */ var inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderInput = function renderInput(instance, params) { var popup = getPopup(); if (!popup) { return; } var innerParams = privateProps.innerParams.get(instance); var rerender = !innerParams || params.input !== innerParams.input; inputClasses.forEach(function (inputClass) { var inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); if (!inputContainer) { return; } // set attributes setAttributes(inputClass, params.inputAttributes); // set class inputContainer.className = swalClasses[inputClass]; if (rerender) { hide(inputContainer); } }); if (params.input) { if (rerender) { showInput(params); } // set custom class setCustomClass(params); } }; /** * @param {SweetAlertOptions} params */ var showInput = function showInput(params) { if (!params.input) { return; } if (!renderInputType[params.input]) { error("Unexpected type of input! Expected ".concat(Object.keys(renderInputType).join(' | '), ", got \"").concat(params.input, "\"")); return; } var inputContainer = getInputContainer(params.input); var input = renderInputType[params.input](inputContainer, params); show(inputContainer); // input autofocus if (params.inputAutoFocus) { setTimeout(function () { focusInput(input); }); } }; /** * @param {HTMLInputElement} input */ var removeAttributes = function removeAttributes(input) { for (var i = 0; i < input.attributes.length; i++) { var attrName = input.attributes[i].name; if (!['id', 'type', 'value', 'style'].includes(attrName)) { input.removeAttribute(attrName); } } }; /** * @param {InputClass} inputClass * @param {SweetAlertOptions['inputAttributes']} inputAttributes */ var setAttributes = function setAttributes(inputClass, inputAttributes) { var input = getInput$1(getPopup(), inputClass); if (!input) { return; } removeAttributes(input); for (var attr in inputAttributes) { input.setAttribute(attr, inputAttributes[attr]); } }; /** * @param {SweetAlertOptions} params */ var setCustomClass = function setCustomClass(params) { var inputContainer = getInputContainer(params.input); if (_typeof(params.customClass) === 'object') { addClass(inputContainer, params.customClass.input); } }; /** * @param {HTMLInputElement | HTMLTextAreaElement} input * @param {SweetAlertOptions} params */ var setInputPlaceholder = function setInputPlaceholder(input, params) { if (!input.placeholder || params.inputPlaceholder) { input.placeholder = params.inputPlaceholder; } }; /** * @param {Input} input * @param {Input} prependTo * @param {SweetAlertOptions} params */ var setInputLabel = function setInputLabel(input, prependTo, params) { if (params.inputLabel) { var label = document.createElement('label'); var labelClass = swalClasses['input-label']; label.setAttribute('for', input.id); label.className = labelClass; if (_typeof(params.customClass) === 'object') { addClass(label, params.customClass.inputLabel); } label.innerText = params.inputLabel; prependTo.insertAdjacentElement('beforebegin', label); } }; /** * @param {SweetAlertOptions['input']} inputType * @returns {HTMLElement} */ var getInputContainer = function getInputContainer(inputType) { return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input); }; /** * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input * @param {SweetAlertOptions['inputValue']} inputValue */ var checkAndSetInputValue = function checkAndSetInputValue(input, inputValue) { if (['string', 'number'].includes(_typeof(inputValue))) { input.value = "".concat(inputValue); } else if (!isPromise(inputValue)) { warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(inputValue), "\"")); } }; /** @type {Record<SweetAlertInput, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ var renderInputType = {}; /** * @param {HTMLInputElement} input * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = function (input, params) { checkAndSetInputValue(input, params.inputValue); setInputLabel(input, input, params); setInputPlaceholder(input, params); input.type = params.input; return input; }; /** * @param {HTMLInputElement} input * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ renderInputType.file = function (input, params) { setInputLabel(input, input, params); setInputPlaceholder(input, params); return input; }; /** * @param {HTMLInputElement} range * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ renderInputType.range = function (range, params) { var rangeInput = range.querySelector('input'); var rangeOutput = range.querySelector('output'); checkAndSetInputValue(rangeInput, params.inputValue); rangeInput.type = params.input; checkAndSetInputValue(rangeOutput, params.inputValue); setInputLabel(rangeInput, range, params); return range; }; /** * @param {HTMLSelectElement} select * @param {SweetAlertOptions} params * @returns {HTMLSelectElement} */ renderInputType.select = function (select, params) { select.textContent = ''; if (params.inputPlaceholder) { var placeholder = document.createElement('option'); setInnerHtml(placeholder, params.inputPlaceholder); placeholder.value = ''; placeholder.disabled = true; placeholder.selected = true; select.appendChild(placeholder); } setInputLabel(select, select, params); return select; }; /** * @param {HTMLInputElement} radio * @returns {HTMLInputElement} */ renderInputType.radio = function (radio) { radio.textContent = ''; return radio; }; /** * @param {HTMLLabelElement} checkboxContainer * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ renderInputType.checkbox = function (checkboxContainer, params) { var checkbox = getInput$1(getPopup(), 'checkbox'); checkbox.value = '1'; checkbox.checked = Boolean(params.inputValue); var label = checkboxContainer.querySelector('span'); setInnerHtml(label, params.inputPlaceholder); return checkbox; }; /** * @param {HTMLTextAreaElement} textarea * @param {SweetAlertOptions} params * @returns {HTMLTextAreaElement} */ renderInputType.textarea = function (textarea, params) { checkAndSetInputValue(textarea, params.inputValue); setInputPlaceholder(textarea, params); setInputLabel(textarea, textarea, params); /** * @param {HTMLElement} el * @returns {number} */ var getMargin = function getMargin(el) { return parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); }; // https://github.com/sweetalert2/sweetalert2/issues/2291 setTimeout(function () { // https://github.com/sweetalert2/sweetalert2/issues/1699 if ('MutationObserver' in window) { var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); var textareaResizeHandler = function textareaResizeHandler() { // check if texarea is still in document (i.e. popup wasn't closed in the meantime) if (!document.body.contains(textarea)) { return; } var textareaWidth = textarea.offsetWidth + getMargin(textarea); if (textareaWidth > initialPopupWidth) { getPopup().style.width = "".concat(textareaWidth, "px"); } else { applyNumericalStyle(getPopup(), 'width', params.width); } }; new MutationObserver(textareaResizeHandler).observe(textarea, { attributes: true, attributeFilter: ['style'] }); } }); return textarea; }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderContent = function renderContent(instance, params) { var htmlContainer = getHtmlContainer(); if (!htmlContainer) { return; } showWhenInnerHtmlPresent(htmlContainer); applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML if (params.html) { parseHtmlToContainer(params.html, htmlContainer); show(htmlContainer, 'block'); } // Content as plain text else if (params.text) { htmlContainer.textContent = params.text; show(htmlContainer, 'block'); } // No content else { hide(htmlContainer); } renderInput(instance, params); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderFooter = function renderFooter(instance, params) { var footer = getFooter(); if (!footer) { return; } showWhenInnerHtmlPresent(footer); toggle(footer, params.footer, 'block'); if (params.footer) { parseHtmlToContainer(params.footer, footer); } // Custom class applyCustomClass(footer, params, 'footer'); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderIcon = function renderIcon(instance, params) { var innerParams = privateProps.innerParams.get(instance); var icon = getIcon(); if (!icon) { return; } // if the given icon already rendered, apply the styling without re-rendering the icon if (innerParams && params.icon === innerParams.icon) { // Custom or default content setContent(icon, params); applyStyles(icon, params); return; } if (!params.icon && !params.iconHtml) { hide(icon); return; } if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); hide(icon); return; } show(icon); // Custom or default content setContent(icon, params); applyStyles(icon, params); // Animate icon addClass(icon, params.showClass && params.showClass.icon); }; /** * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ var applyStyles = function applyStyles(icon, params) { for (var _i = 0, _Object$entries = Object.entries(iconTypes); _i < _Object$entries.length; _i++) { var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), iconType = _Object$entries$_i[0], iconClassName = _Object$entries$_i[1]; if (params.icon !== iconType) { removeClass(icon, iconClassName); } } addClass(icon, params.icon && iconTypes[params.icon]); // Icon color setColor(icon, params); // Success icon background color adjustSuccessIconBackgroundColor(); // Custom class applyCustomClass(icon, params, 'icon'); }; // Adjust success icon background color to match the popup background color var adjustSuccessIconBackgroundColor = function adjustSuccessIconBackgroundColor() { var popup = getPopup(); if (!popup) { return; } var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); /** @type {NodeListOf<HTMLElement>} */ var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); for (var i = 0; i < successIconParts.length; i++) { successIconParts[i].style.backgroundColor = popupBackgroundColor; } }; var successIconHtml = "\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n"; var errorIconHtml = "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n"; /** * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ var setContent = function setContent(icon, params) { if (!params.icon && !params.iconHtml) { return; } var oldContent = icon.innerHTML; var newContent = ''; if (params.iconHtml) { newContent = iconContent(params.iconHtml); } else if (params.icon === 'success') { newContent = successIconHtml; oldContent = oldContent.replace(/ style=".*?"/g, ''); // undo adjustSuccessIconBackgroundColor() } else if (params.icon === 'error') { newContent = errorIconHtml; } else if (params.icon) { var defaultIconHtml = { question: '?', warning: '!', info: 'i' }; newContent = iconContent(defaultIconHtml[params.icon]); } if (oldContent.trim() !== newContent.trim()) { setInnerHtml(icon, newContent); } }; /** * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ var setColor = function setColor(icon, params) { if (!params.iconColor) { return; } icon.style.color = params.iconColor; icon.style.borderColor = params.iconColor; for (var _i2 = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i2 < _arr.length; _i2++) { var sel = _arr[_i2]; setStyle(icon, sel, 'background-color', params.iconColor); } setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); }; /** * @param {string} content * @returns {string} */ var iconContent = function iconContent(content) { return "<div class=\"".concat(swalClasses['icon-content'], "\">").concat(content, "</div>"); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderImage = function renderImage(instance, params) { var image = getImage(); if (!image) { return; } if (!params.imageUrl) { hide(image); return; } show(image, ''); // Src, alt image.setAttribute('src', params.imageUrl); image.setAttribute('alt', params.imageAlt || ''); // Width, height applyNumericalStyle(image, 'width', params.imageWidth); applyNumericalStyle(image, 'height', params.imageHeight); // Class image.className = swalClasses.image; applyCustomClass(image, params, 'image'); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderPopup = function renderPopup(instance, params) { var container = getContainer(); var popup = getPopup(); if (!container || !popup) { return; } // Width // https://github.com/sweetalert2/sweetalert2/issues/2170 if (params.toast) { applyNumericalStyle(container, 'width', params.width); popup.style.width = '100%'; var loader = getLoader(); loader && popup.insertBefore(loader, getIcon()); } else { applyNumericalStyle(popup, 'width', params.width); } // Padding applyNumericalStyle(popup, 'padding', params.padding); // Color if (params.color) { popup.style.color = params.color; } // Background if (params.background) { popup.style.background = params.background; } hide(getValidationMessage()); // Classes addClasses$1(popup, params); }; /** * @param {HTMLElement} popup * @param {SweetAlertOptions} params */ var addClasses$1 = function addClasses(popup, params) { var showClass = params.showClass || {}; // Default Class + showClass when updating Swal.update({}) popup.className = "".concat(swalClasses.popup, " ").concat(isVisible$1(popup) ? showClass.popup : ''); if (params.toast) { addClass([document.documentElement, document.body], swalClasses['toast-shown']); addClass(popup, swalClasses.toast); } else { addClass(popup, swalClasses.modal); } // Custom class applyCustomClass(popup, params, 'popup'); // TODO: remove in the next major if (typeof params.customClass === 'string') { addClass(popup, params.customClass); } // Icon class (#1842) if (params.icon) { addClass(popup, swalClasses["icon-".concat(params.icon)]); } }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderProgressSteps = function renderProgressSteps(instance, params) { var progressStepsContainer = getProgressSteps(); if (!progressStepsContainer) { return; } var progressSteps = params.progressSteps, currentProgressStep = params.currentProgressStep; if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { hide(progressStepsContainer); return; } show(progressStepsContainer); progressStepsContainer.textContent = ''; if (currentProgressStep >= progressSteps.length) { warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); } progressSteps.forEach(function (step, index) { var stepEl = createStepElement(step); progressStepsContainer.appendChild(stepEl); if (index === currentProgressStep) { addClass(stepEl, swalClasses['active-progress-step']); } if (index !== progressSteps.length - 1) { var lineEl = createLineElement(params); progressStepsContainer.appendChild(lineEl); } }); }; /** * @param {string} step * @returns {HTMLLIElement} */ var createStepElement = function createStepElement(step) { var stepEl = document.createElement('li'); addClass(stepEl, swalClasses['progress-step']); setInnerHtml(stepEl, step); return stepEl; }; /** * @param {SweetAlertOptions} params * @returns {HTMLLIElement} */ var createLineElement = function createLineElement(params) { var lineEl = document.createElement('li'); addClass(lineEl, swalClasses['progress-step-line']); if (params.progressStepsDistance) { applyNumericalStyle(lineEl, 'width', params.progressStepsDistance); } return lineEl; }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var renderTitle = function renderTitle(instance, params) { var title = getTitle(); if (!title) { return; } showWhenInnerHtmlPresent(title); toggle(title, params.title || params.titleText, 'block'); if (params.title) { parseHtmlToContainer(params.title, title); } if (params.titleText) { title.innerText = params.titleText; } // Custom class applyCustomClass(title, params, 'title'); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var render = function render(instance, params) { renderPopup(instance, params); renderContainer(instance, params); renderProgressSteps(instance, params); renderIcon(instance, params); renderImage(instance, params); renderTitle(instance, params); renderCloseButton(instance, params); renderContent(instance, params); renderActions(instance, params); renderFooter(instance, params); var popup = getPopup(); if (typeof params.didRender === 'function' && popup) { params.didRender(popup); } }; /* * Global function to determine if SweetAlert2 popup is shown */ var isVisible = function isVisible() { return isVisible$1(getPopup()); }; /* * Global function to click 'Confirm' button */ var clickConfirm = function clickConfirm() { var _dom$getConfirmButton; return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); }; /* * Global function to click 'Deny' button */ var clickDeny = function clickDeny() { var _dom$getDenyButton; return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); }; /* * Global function to click 'Cancel' button */ var clickCancel = function clickCancel() { var _dom$getCancelButton; return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); }; /** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ /** @type {Record<DismissReason, DismissReason>} */ var DismissReason = Object.freeze({ cancel: 'cancel', backdrop: 'backdrop', close: 'close', esc: 'esc', timer: 'timer' }); /** * @param {GlobalState} globalState */ var removeKeydownHandler = function removeKeydownHandler(globalState) { if (globalState.keydownTarget && globalState.keydownHandlerAdded) { globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture }); globalState.keydownHandlerAdded = false; } }; /** * @param {GlobalState} globalState * @param {SweetAlertOptions} innerParams * @param {*} dismissWith */ var addKeydownHandler = function addKeydownHandler(globalState, innerParams, dismissWith) { removeKeydownHandler(globalState); if (!innerParams.toast) { globalState.keydownHandler = function (e) { return keydownHandler(innerParams, e, dismissWith); }; globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); globalState.keydownListenerCapture = innerParams.keydownListenerCapture; globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture }); globalState.keydownHandlerAdded = true; } }; /** * @param {number} index * @param {number} increment */ var setFocus = function setFocus(index, increment) { var _dom$getPopup; var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match if (focusableElements.length) { index = index + increment; // rollover to first item if (index === focusableElements.length) { index = 0; // go to last item } else if (index === -1) { index = focusableElements.length - 1; } focusableElements[index].focus(); return; } // no visible focusable elements, focus the popup (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); }; var arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; /** * @param {SweetAlertOptions} innerParams * @param {KeyboardEvent} event * @param {Function} dismissWith */ var keydownHandler = function keydownHandler(innerParams, event, dismissWith) { if (!innerParams) { return; // This instance has already been destroyed } // Ignore keydown during IME composition // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition // https://github.com/sweetalert2/sweetalert2/issues/720 // https://github.com/sweetalert2/sweetalert2/issues/2406 if (event.isComposing || event.keyCode === 229) { return; } if (innerParams.stopKeydownPropagation) { event.stopPropagation(); } // ENTER if (event.key === 'Enter') { handleEnter(event, innerParams); } // TAB else if (event.key === 'Tab') { handleTab(event); } // ARROWS - switch focus between buttons else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).includes(event.key)) { handleArrows(event.key); } // ESC else if (event.key === 'Escape') { handleEsc(event, innerParams, dismissWith); } }; /** * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams */ var handleEnter = function handleEnter(event, innerParams) { // https://github.com/sweetalert2/sweetalert2/issues/2386 if (!callIfFunction(innerParams.allowEnterKey)) { return; } var input = getInput$1(getPopup(), innerParams.input); if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { if (['textarea', 'file'].includes(innerParams.input)) { return; // do not submit } clickConfirm(); event.preventDefault(); } }; /** * @param {KeyboardEvent} event */ var handleTab = function handleTab(event) { var targetElement = event.target; var focusableElements = getFocusableElements(); var btnIndex = -1; for (var i = 0; i < focusableElements.length; i++) { if (targetElement === focusableElements[i]) { btnIndex = i; break; } } // Cycle to the next button if (!event.shiftKey) { setFocus(btnIndex, 1); } // Cycle to the prev button else { setFocus(btnIndex, -1); } event.stopPropagation(); event.preventDefault(); }; /** * @param {string} key */ var handleArrows = function handleArrows(key) { var actions = getActions(); var confirmButton = getConfirmButton(); var denyButton = getDenyButton(); var cancelButton = getCancelButton(); if (!actions || !confirmButton || !denyButton || !cancelButton) { return; } /** @type HTMLElement[] */ var buttons = [confirmButton, denyButton, cancelButton]; if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { return; } var sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; var buttonToFocus = document.activeElement; if (!buttonToFocus) { return; } for (var i = 0; i < actions.children.length; i++) { buttonToFocus = buttonToFocus[sibling]; if (!buttonToFocus) { return; } if (buttonToFocus instanceof HTMLButtonElement && isVisible$1(buttonToFocus)) { break; } } if (buttonToFocus instanceof HTMLButtonElement) { buttonToFocus.focus(); } }; /** * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams * @param {Function} dismissWith */ var handleEsc = function handleEsc(event, innerParams, dismissWith) { if (callIfFunction(innerParams.allowEscapeKey)) { event.preventDefault(); dismissWith(DismissReason.esc); } }; /** * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` * This is the approach that Babel will probably take to implement private methods/fields * https://github.com/tc39/proposal-private-methods * https://github.com/babel/babel/pull/7555 * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* * then we can use that language feature. */ var privateMethods = { swalPromiseResolve: new WeakMap(), swalPromiseReject: new WeakMap() }; // From https://developer.paciellogroup.com/blog/2018/06/the-current-state-of-modal-dialog-accessibility/ // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that // elements not within the active modal dialog will not be surfaced if a user opens a screen // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. var setAriaHidden = function setAriaHidden() { var container = getContainer(); var bodyChildren = Array.from(document.body.children); bodyChildren.forEach(function (el) { if (el.contains(container)) { return; } if (el.hasAttribute('aria-hidden')) { el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden') || ''); } el.setAttribute('aria-hidden', 'true'); }); }; var unsetAriaHidden = function unsetAriaHidden() { var bodyChildren = Array.from(document.body.children); bodyChildren.forEach(function (el) { if (el.hasAttribute('data-previous-aria-hidden')) { el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); el.removeAttribute('data-previous-aria-hidden'); } else { el.removeAttribute('aria-hidden'); } }); }; // @ts-ignore var isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 /** * Fix iOS scrolling * http://stackoverflow.com/q/39626302 */ var iOSfix = function iOSfix() { if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { var offset = document.body.scrollTop; document.body.style.top = "".concat(offset * -1, "px"); addClass(document.body, swalClasses.iosfix); lockBodyScroll(); } }; /** * https://github.com/sweetalert2/sweetalert2/issues/1246 */ var lockBodyScroll = function lockBodyScroll() { var container = getContainer(); if (!container) { return; } /** @type {boolean} */ var preventTouchMove; /** * @param {TouchEvent} event */ container.ontouchstart = function (event) { preventTouchMove = shouldPreventTouchMove(event); }; /** * @param {TouchEvent} event */ container.ontouchmove = function (event) { if (preventTouchMove) { event.preventDefault(); event.stopPropagation(); } }; }; /** * @param {TouchEvent} event * @returns {boolean} */ var shouldPreventTouchMove = function shouldPreventTouchMove(event) { var target = event.target; var container = getContainer(); var htmlContainer = getHtmlContainer(); if (!container || !htmlContainer) { return false; } if (isStylus(event) || isZoom(event)) { return false; } if (target === container) { return true; } if (!isScrollable(container) && target instanceof HTMLElement && target.tagName !== 'INPUT' && // #1603 target.tagName !== 'TEXTAREA' && // #2266 !(isScrollable(htmlContainer) && // #1944 htmlContainer.contains(target))) { return true; } return false; }; /** * https://github.com/sweetalert2/sweetalert2/issues/1786 * * @param {*} event * @returns {boolean} */ var isStylus = function isStylus(event) { return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; }; /** * https://github.com/sweetalert2/sweetalert2/issues/1891 * * @param {TouchEvent} event * @returns {boolean} */ var isZoom = function isZoom(event) { return event.touches && event.touches.length > 1; }; var undoIOSfix = function undoIOSfix() { if (hasClass(document.body, swalClasses.iosfix)) { var offset = parseInt(document.body.style.top, 10); removeClass(document.body, swalClasses.iosfix); document.body.style.top = ''; document.body.scrollTop = offset * -1; } }; /** * Measure scrollbar width for padding body during modal show/hide * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js * * @returns {number} */ var measureScrollbar = function measureScrollbar() { var scrollDiv = document.createElement('div'); scrollDiv.className = swalClasses['scrollbar-measure']; document.body.appendChild(scrollDiv); var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; }; /** * Remember state in cases where opening and handling a modal will fiddle with it. * @type {number | null} */ var previousBodyPadding = null; /** * @param {string} initialBodyOverflow */ var replaceScrollbarWithPadding = function replaceScrollbarWithPadding(initialBodyOverflow) { // for queues, do not do this more than once if (previousBodyPadding !== null) { return; } // if the body has overflow if (document.body.scrollHeight > window.innerHeight || initialBodyOverflow === 'scroll' // https://github.com/sweetalert2/sweetalert2/issues/2663 ) { // add padding so the content doesn't shift after removal of scrollbar previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); document.body.style.paddingRight = "".concat(previousBodyPadding + measureScrollbar(), "px"); } }; var undoReplaceScrollbarWithPadding = function undoReplaceScrollbarWithPadding() { if (previousBodyPadding !== null) { document.body.style.paddingRight = "".concat(previousBodyPadding, "px"); previousBodyPadding = null; } }; /** * @param {SweetAlert} instance * @param {HTMLElement} container * @param {boolean} returnFocus * @param {Function} didClose */ function removePopupAndResetState(instance, container, returnFocus, didClose) { if (isToast()) { triggerDidCloseAndDispose(instance, didClose); } else { restoreActiveElement(returnFocus).then(function () { return triggerDidCloseAndDispose(instance, didClose); }); removeKeydownHandler(globalState); } // workaround for https://github.com/sweetalert2/sweetalert2/issues/2088 // for some reason removing the container in Safari will scroll the document to bottom if (isSafariOrIOS) { container.setAttribute('style', 'display:none !important'); container.removeAttribute('class'); container.innerHTML = ''; } else { container.remove(); } if (isModal()) { undoReplaceScrollbarWithPadding(); undoIOSfix(); unsetAriaHidden(); } removeBodyClasses(); } /** * Remove SweetAlert2 classes from body */ function removeBodyClasses() { removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); } /** * Instance method to close sweetAlert * * @param {any} resolveValue */ function close(resolveValue) { resolveValue = prepareResolveValue(resolveValue); var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); var didClose = triggerClosePopup(this); if (this.isAwaitingPromise) { // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 if (!resolveValue.isDismissed) { handleAwaitingPromise(this); swalPromiseResolve(resolveValue); } } else if (didClose) { // Resolve Swal promise swalPromiseResolve(resolveValue); } } var triggerClosePopup = function triggerClosePopup(instance) { var popup = getPopup(); if (!popup) { return false; } var innerParams = privateProps.innerParams.get(instance); if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { return false; } removeClass(popup, innerParams.showClass.popup); addClass(popup, innerParams.hideClass.popup); var backdrop = getContainer(); removeClass(backdrop, innerParams.showClass.backdrop); addClass(backdrop, innerParams.hideClass.backdrop); handlePopupAnimation(instance, popup, innerParams); return true; }; /** * @param {any} error */ function rejectPromise(error) { var rejectPromise = privateMethods.swalPromiseReject.get(this); handleAwaitingPromise(this); if (rejectPromise) { // Reject Swal promise rejectPromise(error); } } /** * @param {SweetAlert} instance */ var handleAwaitingPromise = function handleAwaitingPromise(instance) { if (instance.isAwaitingPromise) { delete instance.isAwaitingPromise; // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 if (!privateProps.innerParams.get(instance)) { instance._destroy(); } } }; /** * @param {any} resolveValue * @returns {SweetAlertResult} */ var prepareResolveValue = function prepareResolveValue(resolveValue) { // When user calls Swal.close() if (typeof resolveValue === 'undefined') { return { isConfirmed: false, isDenied: false, isDismissed: true }; } return Object.assign({ isConfirmed: false, isDenied: false, isDismissed: false }, resolveValue); }; /** * @param {SweetAlert} instance * @param {HTMLElement} popup * @param {SweetAlertOptions} innerParams */ var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) { var container = getContainer(); // If animation is supported, animate var animationIsSupported = animationEndEvent && hasCssAnimation(popup); if (typeof innerParams.willClose === 'function') { innerParams.willClose(popup); } if (animationIsSupported) { animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); } else { // Otherwise, remove immediately removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); } }; /** * @param {SweetAlert} instance * @param {HTMLElement} popup * @param {HTMLElement} container * @param {boolean} returnFocus * @param {Function} didClose */ var animatePopup = function animatePopup(instance, popup, container, returnFocus, didClose) { if (!animationEndEvent) { return; } globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); popup.addEventListener(animationEndEvent, function (e) { if (e.target === popup) { globalState.swalCloseEventFinishedCallback(); delete globalState.swalCloseEventFinishedCallback; } }); }; /** * @param {SweetAlert} instance * @param {Function} didClose */ var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) { setTimeout(function () { if (typeof didClose === 'function') { didClose.bind(instance.params)(); } // instance might have been destroyed already if (instance._destroy) { instance._destroy(); } }); }; /** * Shows loader (spinner), this is useful with AJAX requests. * By default the loader be shown instead of the "Confirm" button. * * @param {HTMLButtonElement | null} [buttonToReplace] */ var showLoading = function showLoading(buttonToReplace) { var popup = getPopup(); if (!popup) { new Swal(); // eslint-disable-line no-new } popup = getPopup(); if (!popup) { return; } var loader = getLoader(); if (isToast()) { hide(getIcon()); } else { replaceButton(popup, buttonToReplace); } show(loader); popup.setAttribute('data-loading', 'true'); popup.setAttribute('aria-busy', 'true'); popup.focus(); }; /** * @param {HTMLElement} popup * @param {HTMLButtonElement | null} [buttonToReplace] */ var replaceButton = function replaceButton(popup, buttonToReplace) { var actions = getActions(); var loader = getLoader(); if (!actions || !loader) { return; } if (!buttonToReplace && isVisible$1(getConfirmButton())) { buttonToReplace = getConfirmButton(); } show(actions); if (buttonToReplace) { hide(buttonToReplace); loader.setAttribute('data-button-to-replace', buttonToReplace.className); actions.insertBefore(loader, buttonToReplace); } addClass([popup, actions], swalClasses.loading); }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) { if (params.input === 'select' || params.input === 'radio') { handleInputOptions(instance, params); } else if (['text', 'email', 'number', 'tel', 'textarea'].some(function (i) { return i === params.input; }) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { showLoading(getConfirmButton()); handleInputValue(instance, params); } }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} innerParams * @returns {SweetAlertInputValue} */ var getInputValue = function getInputValue(instance, innerParams) { var input = instance.getInput(); if (!input) { return null; } switch (innerParams.input) { case 'checkbox': return getCheckboxValue(input); case 'radio': return getRadioValue(input); case 'file': return getFileValue(input); default: return innerParams.inputAutoTrim ? input.value.trim() : input.value; } }; /** * @param {HTMLInputElement} input * @returns {number} */ var getCheckboxValue = function getCheckboxValue(input) { return input.checked ? 1 : 0; }; /** * @param {HTMLInputElement} input * @returns {string | null} */ var getRadioValue = function getRadioValue(input) { return input.checked ? input.value : null; }; /** * @param {HTMLInputElement} input * @returns {FileList | File | null} */ var getFileValue = function getFileValue(input) { return input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var handleInputOptions = function handleInputOptions(instance, params) { var popup = getPopup(); if (!popup) { return; } /** * @param {Record<string, any>} inputOptions */ var processInputOptions = function processInputOptions(inputOptions) { if (params.input === 'select') { populateSelectOptions(popup, formatInputOptions(inputOptions), params); } else if (params.input === 'radio') { populateRadioOptions(popup, formatInputOptions(inputOptions), params); } }; if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { showLoading(getConfirmButton()); asPromise(params.inputOptions).then(function (inputOptions) { instance.hideLoading(); processInputOptions(inputOptions); }); } else if (_typeof(params.inputOptions) === 'object') { processInputOptions(params.inputOptions); } else { error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions))); } }; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ var handleInputValue = function handleInputValue(instance, params) { var input = instance.getInput(); if (!input) { return; } hide(input); asPromise(params.inputValue).then(function (inputValue) { input.value = params.input === 'number' ? "".concat(parseFloat(inputValue) || 0) : "".concat(inputValue); show(input); input.focus(); instance.hideLoading(); })["catch"](function (err) { error("Error in inputValue promise: ".concat(err)); input.value = ''; show(input); input.focus(); instance.hideLoading(); }); }; /** * @param {HTMLElement} popup * @param {InputOptionFlattened[]} inputOptions * @param {SweetAlertOptions} params */ function populateSelectOptions(popup, inputOptions, params) { var select = getDirectChildByClass(popup, swalClasses.select); if (!select) { return; } /** * @param {HTMLElement} parent * @param {string} optionLabel * @param {string} optionValue */ var renderOption = function renderOption(parent, optionLabel, optionValue) { var option = document.createElement('option'); option.value = optionValue; setInnerHtml(option, optionLabel); option.selected = isSelected(optionValue, params.inputValue); parent.appendChild(option); }; inputOptions.forEach(function (inputOption) { var optionValue = inputOption[0]; var optionLabel = inputOption[1]; // <optgroup> spec: // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." // check whether this is a <optgroup> if (Array.isArray(optionLabel)) { // if it is an array, then it is an <optgroup> var optgroup = document.createElement('optgroup'); optgroup.label = optionValue; optgroup.disabled = false; // not configurable for now select.appendChild(optgroup); optionLabel.forEach(function (o) { return renderOption(optgroup, o[1], o[0]); }); } else { // case of <option> renderOption(select, optionLabel, optionValue); } }); select.focus(); } /** * @param {HTMLElement} popup * @param {InputOptionFlattened[]} inputOptions * @param {SweetAlertOptions} params */ function populateRadioOptions(popup, inputOptions, params) { var radio = getDirectChildByClass(popup, swalClasses.radio); if (!radio) { return; } inputOptions.forEach(function (inputOption) { var radioValue = inputOption[0]; var radioLabel = inputOption[1]; var radioInput = document.createElement('input'); var radioLabelElement = document.createElement('label'); radioInput.type = 'radio'; radioInput.name = swalClasses.radio; radioInput.value = radioValue; if (isSelected(radioValue, params.inputValue)) { radioInput.checked = true; } var label = document.createElement('span'); setInnerHtml(label, radioLabel); label.className = swalClasses.label; radioLabelElement.appendChild(radioInput); radioLabelElement.appendChild(label); radio.appendChild(radioLabelElement); }); var radios = radio.querySelectorAll('input'); if (radios.length) { radios[0].focus(); } } /** * Converts `inputOptions` into an array of `[value, label]`s * * @param {Record<string, any>} inputOptions * @typedef {string[]} InputOptionFlattened * @returns {InputOptionFlattened[]} */ var formatInputOptions = function formatInputOptions(inputOptions) { /** @type {InputOptionFlattened[]} */ var result = []; if (inputOptions instanceof Map) { inputOptions.forEach(function (value, key) { var valueFormatted = value; if (_typeof(valueFormatted) === 'object') { // case of <optgroup> valueFormatted = formatInputOptions(valueFormatted); } result.push([key, valueFormatted]); }); } else { Object.keys(inputOptions).forEach(function (key) { var valueFormatted = inputOptions[key]; if (_typeof(valueFormatted) === 'object') { // case of <optgroup> valueFormatted = formatInputOptions(valueFormatted); } result.push([key, valueFormatted]); }); } return result; }; /** * @param {string} optionValue * @param {SweetAlertInputValue} inputValue * @returns {boolean} */ var isSelected = function isSelected(optionValue, inputValue) { return !!inputValue && inputValue.toString() === optionValue.toString(); }; var _this = undefined; /** * @param {SweetAlert} instance */ var handleConfirmButtonClick = function handleConfirmButtonClick(instance) { var innerParams = privateProps.innerParams.get(instance); instance.disableButtons(); if (innerParams.input) { handleConfirmOrDenyWithInput(instance, 'confirm'); } else { confirm(instance, true); } }; /** * @param {SweetAlert} instance */ var handleDenyButtonClick = function handleDenyButtonClick(instance) { var innerParams = privateProps.innerParams.get(instance); instance.disableButtons(); if (innerParams.returnInputValueOnDeny) { handleConfirmOrDenyWithInput(instance, 'deny'); } else { deny(instance, false); } }; /** * @param {SweetAlert} instance * @param {Function} dismissWith */ var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) { instance.disableButtons(); dismissWith(DismissReason.cancel); }; /** * @param {SweetAlert} instance * @param {'confirm' | 'deny'} type */ var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, type) { var innerParams = privateProps.innerParams.get(instance); if (!innerParams.input) { error("The \"input\" parameter is needed to be set when using returnInputValueOn".concat(capitalizeFirstLetter(type))); return; } var input = instance.getInput(); var inputValue = getInputValue(instance, innerParams); if (innerParams.inputValidator) { handleInputValidator(instance, inputValue, type); } else if (input && !input.checkValidity()) { instance.enableButtons(); instance.showValidationMessage(innerParams.validationMessage || input.validationMessage); } else if (type === 'deny') { deny(instance, inputValue); } else { confirm(instance, inputValue); } }; /** * @param {SweetAlert} instance * @param {SweetAlertInputValue} inputValue * @param {'confirm' | 'deny'} type */ var handleInputValidator = function handleInputValidator(instance, inputValue, type) { var innerParams = privateProps.innerParams.get(instance); instance.disableInput(); var validationPromise = Promise.resolve().then(function () { return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)); }); validationPromise.then(function (validationMessage) { instance.enableButtons(); instance.enableInput(); if (validationMessage) { instance.showValidationMessage(validationMessage); } else if (type === 'deny') { deny(instance, inputValue); } else { confirm(instance, inputValue); } }); }; /** * @param {SweetAlert} instance * @param {any} value */ var deny = function deny(instance, value) { var innerParams = privateProps.innerParams.get(instance || _this); if (innerParams.showLoaderOnDeny) { showLoading(getDenyButton()); } if (innerParams.preDeny) { instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received var preDenyPromise = Promise.resolve().then(function () { return asPromise(innerParams.preDeny(value, innerParams.validationMessage)); }); preDenyPromise.then(function (preDenyValue) { if (preDenyValue === false) { instance.hideLoading(); handleAwaitingPromise(instance); } else { instance.close({ isDenied: true, value: typeof preDenyValue === 'undefined' ? value : preDenyValue }); } })["catch"](function (error) { return rejectWith(instance || _this, error); }); } else { instance.close({ isDenied: true, value: value }); } }; /** * @param {SweetAlert} instance * @param {any} value */ var succeedWith = function succeedWith(instance, value) { instance.close({ isConfirmed: true, value: value }); }; /** * * @param {SweetAlert} instance * @param {string} error */ var rejectWith = function rejectWith(instance, error) { instance.rejectPromise(error); }; /** * * @param {SweetAlert} instance * @param {any} value */ var confirm = function confirm(instance, value) { var innerParams = privateProps.innerParams.get(instance || _this); if (innerParams.showLoaderOnConfirm) { showLoading(); } if (innerParams.preConfirm) { instance.resetValidationMessage(); instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received var preConfirmPromise = Promise.resolve().then(function () { return asPromise(innerParams.preConfirm(value, innerParams.validationMessage)); }); preConfirmPromise.then(function (preConfirmValue) { if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { instance.hideLoading(); handleAwaitingPromise(instance); } else { succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); } })["catch"](function (error) { return rejectWith(instance || _this, error); }); } else { succeedWith(instance, value); } }; /** * Hides loader and shows back the button which was hidden by .showLoading() */ function hideLoading() { // do nothing if popup is closed var innerParams = privateProps.innerParams.get(this); if (!innerParams) { return; } var domCache = privateProps.domCache.get(this); hide(domCache.loader); if (isToast()) { if (innerParams.icon) { show(getIcon()); } } else { showRelatedButton(domCache); } removeClass([domCache.popup, domCache.actions], swalClasses.loading); domCache.popup.removeAttribute('aria-busy'); domCache.popup.removeAttribute('data-loading'); domCache.confirmButton.disabled = false; domCache.denyButton.disabled = false; domCache.cancelButton.disabled = false; } var showRelatedButton = function showRelatedButton(domCache) { var buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); if (buttonToReplace.length) { show(buttonToReplace[0], 'inline-block'); } else if (allButtonsAreHidden()) { hide(domCache.actions); } }; /** * Gets the input DOM node, this method works with input parameter. * * @returns {HTMLInputElement | null} */ function getInput() { var innerParams = privateProps.innerParams.get(this); var domCache = privateProps.domCache.get(this); if (!domCache) { return null; } return getInput$1(domCache.popup, innerParams.input); } /** * @param {SweetAlert} instance * @param {string[]} buttons * @param {boolean} disabled */ function setButtonsDisabled(instance, buttons, disabled) { var domCache = privateProps.domCache.get(instance); buttons.forEach(function (button) { domCache[button].disabled = disabled; }); } /** * @param {HTMLInputElement | null} input * @param {boolean} disabled */ function setInputDisabled(input, disabled) { var popup = getPopup(); if (!popup || !input) { return; } if (input.type === 'radio') { /** @type {NodeListOf<HTMLInputElement>} */ var radios = popup.querySelectorAll("[name=\"".concat(swalClasses.radio, "\"]")); for (var i = 0; i < radios.length; i++) { radios[i].disabled = disabled; } } else { input.disabled = disabled; } } /** * Enable all the buttons * @this {SweetAlert} */ function enableButtons() { setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); } /** * Disable all the buttons * @this {SweetAlert} */ function disableButtons() { setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); } /** * Enable the input field * @this {SweetAlert} */ function enableInput() { setInputDisabled(this.getInput(), false); } /** * Disable the input field * @this {SweetAlert} */ function disableInput() { setInputDisabled(this.getInput(), true); } /** * Show block with validation message * * @param {string} error * @this {SweetAlert} */ function showValidationMessage(error) { var domCache = privateProps.domCache.get(this); var params = privateProps.innerParams.get(this); setInnerHtml(domCache.validationMessage, error); domCache.validationMessage.className = swalClasses['validation-message']; if (params.customClass && params.customClass.validationMessage) { addClass(domCache.validationMessage, params.customClass.validationMessage); } show(domCache.validationMessage); var input = this.getInput(); if (input) { input.setAttribute('aria-invalid', 'true'); input.setAttribute('aria-describedby', swalClasses['validation-message']); focusInput(input); addClass(input, swalClasses.inputerror); } } /** * Hide block with validation message * * @this {SweetAlert} */ function resetValidationMessage() { var domCache = privateProps.domCache.get(this); if (domCache.validationMessage) { hide(domCache.validationMessage); } var input = this.getInput(); if (input) { input.removeAttribute('aria-invalid'); input.removeAttribute('aria-describedby'); removeClass(input, swalClasses.inputerror); } } var defaultParams = { title: '', titleText: '', text: '', html: '', footer: '', icon: undefined, iconColor: undefined, iconHtml: undefined, template: undefined, toast: false, animation: true, showClass: { popup: 'swal2-show', backdrop: 'swal2-backdrop-show', icon: 'swal2-icon-show' }, hideClass: { popup: 'swal2-hide', backdrop: 'swal2-backdrop-hide', icon: 'swal2-icon-hide' }, customClass: {}, target: 'body', color: undefined, backdrop: true, heightAuto: true, allowOutsideClick: true, allowEscapeKey: true, allowEnterKey: true, stopKeydownPropagation: true, keydownListenerCapture: false, showConfirmButton: true, showDenyButton: false, showCancelButton: false, preConfirm: undefined, preDeny: undefined, confirmButtonText: 'OK', confirmButtonAriaLabel: '', confirmButtonColor: undefined, denyButtonText: 'No', denyButtonAriaLabel: '', denyButtonColor: undefined, cancelButtonText: 'Cancel', cancelButtonAriaLabel: '', cancelButtonColor: undefined, buttonsStyling: true, reverseButtons: false, focusConfirm: true, focusDeny: false, focusCancel: false, returnFocus: true, showCloseButton: false, closeButtonHtml: '×', closeButtonAriaLabel: 'Close this dialog', loaderHtml: '', showLoaderOnConfirm: false, showLoaderOnDeny: false, imageUrl: undefined, imageWidth: undefined, imageHeight: undefined, imageAlt: '', timer: undefined, timerProgressBar: false, width: undefined, padding: undefined, background: undefined, input: undefined, inputPlaceholder: '', inputLabel: '', inputValue: '', inputOptions: {}, inputAutoFocus: true, inputAutoTrim: true, inputAttributes: {}, inputValidator: undefined, returnInputValueOnDeny: false, validationMessage: undefined, grow: false, position: 'center', progressSteps: [], currentProgressStep: undefined, progressStepsDistance: undefined, willOpen: undefined, didOpen: undefined, didRender: undefined, willClose: undefined, didClose: undefined, didDestroy: undefined, scrollbarPadding: true }; var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; /** @type {Record<string, string | undefined>} */ var deprecatedParams = { allowEnterKey: undefined }; var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** * Is valid parameter * * @param {string} paramName * @returns {boolean} */ var isValidParameter = function isValidParameter(paramName) { return Object.prototype.hasOwnProperty.call(defaultParams, paramName); }; /** * Is valid parameter for Swal.update() method * * @param {string} paramName * @returns {boolean} */ var isUpdatableParameter = function isUpdatableParameter(paramName) { return updatableParams.indexOf(paramName) !== -1; }; /** * Is deprecated parameter * * @param {string} paramName * @returns {string | undefined} */ var isDeprecatedParameter = function isDeprecatedParameter(paramName) { return deprecatedParams[paramName]; }; /** * @param {string} param */ var checkIfParamIsValid = function checkIfParamIsValid(param) { if (!isValidParameter(param)) { warn("Unknown parameter \"".concat(param, "\"")); } }; /** * @param {string} param */ var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) { if (toastIncompatibleParams.includes(param)) { warn("The parameter \"".concat(param, "\" is incompatible with toasts")); } }; /** * @param {string} param */ var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) { var isDeprecated = isDeprecatedParameter(param); if (isDeprecated) { warnAboutDeprecation(param, isDeprecated); } }; /** * Show relevant warnings for given params * * @param {SweetAlertOptions} params */ var showWarningsForParams = function showWarningsForParams(params) { if (params.backdrop === false && params.allowOutsideClick) { warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); } for (var param in params) { checkIfParamIsValid(param); if (params.toast) { checkIfToastParamIsValid(param); } checkIfParamIsDeprecated(param); } }; /** * Updates popup parameters. * * @param {SweetAlertOptions} params */ function update(params) { var popup = getPopup(); var innerParams = privateProps.innerParams.get(this); if (!popup || hasClass(popup, innerParams.hideClass.popup)) { warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); return; } var validUpdatableParams = filterValidParams(params); var updatedParams = Object.assign({}, innerParams, validUpdatableParams); render(this, updatedParams); privateProps.innerParams.set(this, updatedParams); Object.defineProperties(this, { params: { value: Object.assign({}, this.params, params), writable: false, enumerable: true } }); } /** * @param {SweetAlertOptions} params * @returns {SweetAlertOptions} */ var filterValidParams = function filterValidParams(params) { var validUpdatableParams = {}; Object.keys(params).forEach(function (param) { if (isUpdatableParameter(param)) { validUpdatableParams[param] = params[param]; } else { warn("Invalid parameter to update: ".concat(param)); } }); return validUpdatableParams; }; /** * Dispose the current SweetAlert2 instance */ function _destroy() { var domCache = privateProps.domCache.get(this); var innerParams = privateProps.innerParams.get(this); if (!innerParams) { disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 return; // This instance has already been destroyed } // Check if there is another Swal closing if (domCache.popup && globalState.swalCloseEventFinishedCallback) { globalState.swalCloseEventFinishedCallback(); delete globalState.swalCloseEventFinishedCallback; } if (typeof innerParams.didDestroy === 'function') { innerParams.didDestroy(); } disposeSwal(this); } /** * @param {SweetAlert} instance */ var disposeSwal = function disposeSwal(instance) { disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569) delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) delete globalState.keydownHandler; delete globalState.keydownTarget; // Unset currentInstance delete globalState.currentInstance; }; /** * @param {SweetAlert} instance */ var disposeWeakMaps = function disposeWeakMaps(instance) { // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 if (instance.isAwaitingPromise) { unsetWeakMaps(privateProps, instance); instance.isAwaitingPromise = true; } else { unsetWeakMaps(privateMethods, instance); unsetWeakMaps(privateProps, instance); delete instance.isAwaitingPromise; // Unset instance methods delete instance.disableButtons; delete instance.enableButtons; delete instance.getInput; delete instance.disableInput; delete instance.enableInput; delete instance.hideLoading; delete instance.disableLoading; delete instance.showValidationMessage; delete instance.resetValidationMessage; delete instance.close; delete instance.closePopup; delete instance.closeModal; delete instance.closeToast; delete instance.rejectPromise; delete instance.update; delete instance._destroy; } }; /** * @param {object} obj * @param {SweetAlert} instance */ var unsetWeakMaps = function unsetWeakMaps(obj, instance) { for (var i in obj) { obj[i]["delete"](instance); } }; var instanceMethods = /*#__PURE__*/Object.freeze({ __proto__: null, _destroy: _destroy, close: close, closeModal: close, closePopup: close, closeToast: close, disableButtons: disableButtons, disableInput: disableInput, disableLoading: hideLoading, enableButtons: enableButtons, enableInput: enableInput, getInput: getInput, handleAwaitingPromise: handleAwaitingPromise, hideLoading: hideLoading, rejectPromise: rejectPromise, resetValidationMessage: resetValidationMessage, showValidationMessage: showValidationMessage, update: update }); /** * @param {SweetAlertOptions} innerParams * @param {DomCache} domCache * @param {Function} dismissWith */ var handlePopupClick = function handlePopupClick(innerParams, domCache, dismissWith) { if (innerParams.toast) { handleToastClick(innerParams, domCache, dismissWith); } else { // Ignore click events that had mousedown on the popup but mouseup on the container // This can happen when the user drags a slider handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup handleContainerMousedown(domCache); handleModalClick(innerParams, domCache, dismissWith); } }; /** * @param {SweetAlertOptions} innerParams * @param {DomCache} domCache * @param {Function} dismissWith */ var handleToastClick = function handleToastClick(innerParams, domCache, dismissWith) { // Closing toast by internal click domCache.popup.onclick = function () { if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { return; } dismissWith(DismissReason.close); }; }; /** * @param {SweetAlertOptions} innerParams * @returns {boolean} */ var isAnyButtonShown = function isAnyButtonShown(innerParams) { return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); }; var ignoreOutsideClick = false; /** * @param {DomCache} domCache */ var handleModalMousedown = function handleModalMousedown(domCache) { domCache.popup.onmousedown = function () { domCache.container.onmouseup = function (e) { domCache.container.onmouseup = function () {}; // We only check if the mouseup target is the container because usually it doesn't // have any other direct children aside of the popup if (e.target === domCache.container) { ignoreOutsideClick = true; } }; }; }; /** * @param {DomCache} domCache */ var handleContainerMousedown = function handleContainerMousedown(domCache) { domCache.container.onmousedown = function (e) { // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) if (e.target === domCache.container) { e.preventDefault(); } domCache.popup.onmouseup = function (e) { domCache.popup.onmouseup = function () {}; // We also need to check if the mouseup target is a child of the popup if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { ignoreOutsideClick = true; } }; }; }; /** * @param {SweetAlertOptions} innerParams * @param {DomCache} domCache * @param {Function} dismissWith */ var handleModalClick = function handleModalClick(innerParams, domCache, dismissWith) { domCache.container.onclick = function (e) { if (ignoreOutsideClick) { ignoreOutsideClick = false; return; } if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { dismissWith(DismissReason.backdrop); } }; }; var isJqueryElement = function isJqueryElement(elem) { return _typeof(elem) === 'object' && elem.jquery; }; var isElement = function isElement(elem) { return elem instanceof Element || isJqueryElement(elem); }; var argsToParams = function argsToParams(args) { var params = {}; if (_typeof(args[0]) === 'object' && !isElement(args[0])) { Object.assign(params, args[0]); } else { ['title', 'html', 'icon'].forEach(function (name, index) { var arg = args[index]; if (typeof arg === 'string' || isElement(arg)) { params[name] = arg; } else if (arg !== undefined) { error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg))); } }); } return params; }; /** * Main method to create a new SweetAlert2 popup * * @param {...SweetAlertOptions} args * @returns {Promise<SweetAlertResult>} */ function fire() { var Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _construct(Swal, args); } /** * Returns an extended version of `Swal` containing `params` as defaults. * Useful for reusing Swal configuration. * * For example: * * Before: * const textPromptOptions = { input: 'text', showCancelButton: true } * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) * * After: * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) * const {value: firstName} = await TextPrompt('What is your first name?') * const {value: lastName} = await TextPrompt('What is your last name?') * * @param {SweetAlertOptions} mixinParams * @returns {SweetAlert} */ function mixin(mixinParams) { var MixinSwal = /*#__PURE__*/function (_this) { function MixinSwal() { _classCallCheck(this, MixinSwal); return _callSuper(this, MixinSwal, arguments); } _inherits(MixinSwal, _this); return _createClass(MixinSwal, [{ key: "_main", value: function _main(params, priorityMixinParams) { return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, params, Object.assign({}, mixinParams, priorityMixinParams)); } }]); }(this); // @ts-ignore return MixinSwal; } /** * If `timer` parameter is set, returns number of milliseconds of timer remained. * Otherwise, returns undefined. * * @returns {number | undefined} */ var getTimerLeft = function getTimerLeft() { return globalState.timeout && globalState.timeout.getTimerLeft(); }; /** * Stop timer. Returns number of milliseconds of timer remained. * If `timer` parameter isn't set, returns undefined. * * @returns {number | undefined} */ var stopTimer = function stopTimer() { if (globalState.timeout) { stopTimerProgressBar(); return globalState.timeout.stop(); } }; /** * Resume timer. Returns number of milliseconds of timer remained. * If `timer` parameter isn't set, returns undefined. * * @returns {number | undefined} */ var resumeTimer = function resumeTimer() { if (globalState.timeout) { var remaining = globalState.timeout.start(); animateTimerProgressBar(remaining); return remaining; } }; /** * Resume timer. Returns number of milliseconds of timer remained. * If `timer` parameter isn't set, returns undefined. * * @returns {number | undefined} */ var toggleTimer = function toggleTimer() { var timer = globalState.timeout; return timer && (timer.running ? stopTimer() : resumeTimer()); }; /** * Increase timer. Returns number of milliseconds of an updated timer. * If `timer` parameter isn't set, returns undefined. * * @param {number} ms * @returns {number | undefined} */ var increaseTimer = function increaseTimer(ms) { if (globalState.timeout) { var remaining = globalState.timeout.increase(ms); animateTimerProgressBar(remaining, true); return remaining; } }; /** * Check if timer is running. Returns true if timer is running * or false if timer is paused or stopped. * If `timer` parameter isn't set, returns undefined * * @returns {boolean} */ var isTimerRunning = function isTimerRunning() { return !!(globalState.timeout && globalState.timeout.isRunning()); }; var bodyClickListenerAdded = false; var clickHandlers = {}; /** * @param {string} attr */ function bindClickHandler() { var attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; clickHandlers[attr] = this; if (!bodyClickListenerAdded) { document.body.addEventListener('click', bodyClickListener); bodyClickListenerAdded = true; } } var bodyClickListener = function bodyClickListener(event) { for (var el = event.target; el && el !== document; el = el.parentNode) { for (var attr in clickHandlers) { var template = el.getAttribute(attr); if (template) { clickHandlers[attr].fire({ template: template }); return; } } } }; var staticMethods = /*#__PURE__*/Object.freeze({ __proto__: null, argsToParams: argsToParams, bindClickHandler: bindClickHandler, clickCancel: clickCancel, clickConfirm: clickConfirm, clickDeny: clickDeny, enableLoading: showLoading, fire: fire, getActions: getActions, getCancelButton: getCancelButton, getCloseButton: getCloseButton, getConfirmButton: getConfirmButton, getContainer: getContainer, getDenyButton: getDenyButton, getFocusableElements: getFocusableElements, getFooter: getFooter, getHtmlContainer: getHtmlContainer, getIcon: getIcon, getIconContent: getIconContent, getImage: getImage, getInputLabel: getInputLabel, getLoader: getLoader, getPopup: getPopup, getProgressSteps: getProgressSteps, getTimerLeft: getTimerLeft, getTimerProgressBar: getTimerProgressBar, getTitle: getTitle, getValidationMessage: getValidationMessage, increaseTimer: increaseTimer, isDeprecatedParameter: isDeprecatedParameter, isLoading: isLoading, isTimerRunning: isTimerRunning, isUpdatableParameter: isUpdatableParameter, isValidParameter: isValidParameter, isVisible: isVisible, mixin: mixin, resumeTimer: resumeTimer, showLoading: showLoading, stopTimer: stopTimer, toggleTimer: toggleTimer }); var Timer = /*#__PURE__*/function () { /** * @param {Function} callback * @param {number} delay */ function Timer(callback, delay) { _classCallCheck(this, Timer); this.callback = callback; this.remaining = delay; this.running = false; this.start(); } /** * @returns {number} */ return _createClass(Timer, [{ key: "start", value: function start() { if (!this.running) { this.running = true; this.started = new Date(); this.id = setTimeout(this.callback, this.remaining); } return this.remaining; } /** * @returns {number} */ }, { key: "stop", value: function stop() { if (this.started && this.running) { this.running = false; clearTimeout(this.id); this.remaining -= new Date().getTime() - this.started.getTime(); } return this.remaining; } /** * @param {number} n * @returns {number} */ }, { key: "increase", value: function increase(n) { var running = this.running; if (running) { this.stop(); } this.remaining += n; if (running) { this.start(); } return this.remaining; } /** * @returns {number} */ }, { key: "getTimerLeft", value: function getTimerLeft() { if (this.running) { this.stop(); this.start(); } return this.remaining; } /** * @returns {boolean} */ }, { key: "isRunning", value: function isRunning() { return this.running; } }]); }(); var swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; /** * @param {SweetAlertOptions} params * @returns {SweetAlertOptions} */ var getTemplateParams = function getTemplateParams(params) { /** @type {HTMLTemplateElement} */ var template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; if (!template) { return {}; } /** @type {DocumentFragment} */ var templateContent = template.content; showWarningsForElements(templateContent); var result = Object.assign(getSwalParams(templateContent), getSwalFunctionParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); return result; }; /** * @param {DocumentFragment} templateContent * @returns {SweetAlertOptions} */ var getSwalParams = function getSwalParams(templateContent) { var result = {}; /** @type {HTMLElement[]} */ var swalParams = Array.from(templateContent.querySelectorAll('swal-param')); swalParams.forEach(function (param) { showWarningsForAttributes(param, ['name', 'value']); var paramName = param.getAttribute('name'); var value = param.getAttribute('value'); if (typeof defaultParams[paramName] === 'boolean') { result[paramName] = value !== 'false'; } else if (_typeof(defaultParams[paramName]) === 'object') { result[paramName] = JSON.parse(value); } else { result[paramName] = value; } }); return result; }; /** * @param {DocumentFragment} templateContent * @returns {SweetAlertOptions} */ var getSwalFunctionParams = function getSwalFunctionParams(templateContent) { var result = {}; /** @type {HTMLElement[]} */ var swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); swalFunctions.forEach(function (param) { var paramName = param.getAttribute('name'); var value = param.getAttribute('value'); result[paramName] = new Function("return ".concat(value))(); }); return result; }; /** * @param {DocumentFragment} templateContent * @returns {SweetAlertOptions} */ var getSwalButtons = function getSwalButtons(templateContent) { var result = {}; /** @type {HTMLElement[]} */ var swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); swalButtons.forEach(function (button) { showWarningsForAttributes(button, ['type', 'color', 'aria-label']); var type = button.getAttribute('type'); result["".concat(type, "ButtonText")] = button.innerHTML; result["show".concat(capitalizeFirstLetter(type), "Button")] = true; if (button.hasAttribute('color')) { result["".concat(type, "ButtonColor")] = button.getAttribute('color'); } if (button.hasAttribute('aria-label')) { result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); } }); return result; }; /** * @param {DocumentFragment} templateContent * @returns {Pick<SweetAlertOptions, 'imageUrl' | 'imageWidth' | 'imageHeight' | 'imageAlt'>} */ var getSwalImage = function getSwalImage(templateContent) { var result = {}; /** @type {HTMLElement | null} */ var image = templateContent.querySelector('swal-image'); if (image) { showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); if (image.hasAttribute('src')) { result.imageUrl = image.getAttribute('src') || undefined; } if (image.hasAttribute('width')) { result.imageWidth = image.getAttribute('width') || undefined; } if (image.hasAttribute('height')) { result.imageHeight = image.getAttribute('height') || undefined; } if (image.hasAttribute('alt')) { result.imageAlt = image.getAttribute('alt') || undefined; } } return result; }; /** * @param {DocumentFragment} templateContent * @returns {SweetAlertOptions} */ var getSwalIcon = function getSwalIcon(templateContent) { var result = {}; /** @type {HTMLElement} */ var icon = templateContent.querySelector('swal-icon'); if (icon) { showWarningsForAttributes(icon, ['type', 'color']); if (icon.hasAttribute('type')) { /** @type {SweetAlertIcon} */ // @ts-ignore result.icon = icon.getAttribute('type'); } if (icon.hasAttribute('color')) { result.iconColor = icon.getAttribute('color'); } result.iconHtml = icon.innerHTML; } return result; }; /** * @param {DocumentFragment} templateContent * @returns {SweetAlertOptions} */ var getSwalInput = function getSwalInput(templateContent) { var result = {}; /** @type {HTMLElement} */ var input = templateContent.querySelector('swal-input'); if (input) { showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); /** @type {SweetAlertInput} */ // @ts-ignore result.input = input.getAttribute('type') || 'text'; if (input.hasAttribute('label')) { result.inputLabel = input.getAttribute('label'); } if (input.hasAttribute('placeholder')) { result.inputPlaceholder = input.getAttribute('placeholder'); } if (input.hasAttribute('value')) { result.inputValue = input.getAttribute('value'); } } /** @type {HTMLElement[]} */ var inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option')); if (inputOptions.length) { result.inputOptions = {}; inputOptions.forEach(function (option) { showWarningsForAttributes(option, ['value']); var optionValue = option.getAttribute('value'); var optionName = option.innerHTML; result.inputOptions[optionValue] = optionName; }); } return result; }; /** * @param {DocumentFragment} templateContent * @param {string[]} paramNames * @returns {SweetAlertOptions} */ var getSwalStringParams = function getSwalStringParams(templateContent, paramNames) { var result = {}; for (var i in paramNames) { var paramName = paramNames[i]; /** @type {HTMLElement} */ var tag = templateContent.querySelector(paramName); if (tag) { showWarningsForAttributes(tag, []); result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); } } return result; }; /** * @param {DocumentFragment} templateContent */ var showWarningsForElements = function showWarningsForElements(templateContent) { var allowedElements = swalStringParams.concat(['swal-param', 'swal-function-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); Array.from(templateContent.children).forEach(function (el) { var tagName = el.tagName.toLowerCase(); if (!allowedElements.includes(tagName)) { warn("Unrecognized element <".concat(tagName, ">")); } }); }; /** * @param {HTMLElement} el * @param {string[]} allowedAttributes */ var showWarningsForAttributes = function showWarningsForAttributes(el, allowedAttributes) { Array.from(el.attributes).forEach(function (attribute) { if (allowedAttributes.indexOf(attribute.name) === -1) { warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); } }); }; var SHOW_CLASS_TIMEOUT = 10; /** * Open popup, add necessary classes and styles, fix scrollbar * * @param {SweetAlertOptions} params */ var openPopup = function openPopup(params) { var container = getContainer(); var popup = getPopup(); if (typeof params.willOpen === 'function') { params.willOpen(popup); } var bodyStyles = window.getComputedStyle(document.body); var initialBodyOverflow = bodyStyles.overflowY; addClasses(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' setTimeout(function () { setScrollingVisibility(container, popup); }, SHOW_CLASS_TIMEOUT); if (isModal()) { fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); setAriaHidden(); } if (!isToast() && !globalState.previousActiveElement) { globalState.previousActiveElement = document.activeElement; } if (typeof params.didOpen === 'function') { setTimeout(function () { return params.didOpen(popup); }); } removeClass(container, swalClasses['no-transition']); }; /** * @param {AnimationEvent} event */ var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) { var popup = getPopup(); if (event.target !== popup || !animationEndEvent) { return; } var container = getContainer(); popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); container.style.overflowY = 'auto'; }; /** * @param {HTMLElement} container * @param {HTMLElement} popup */ var setScrollingVisibility = function setScrollingVisibility(container, popup) { if (animationEndEvent && hasCssAnimation(popup)) { container.style.overflowY = 'hidden'; popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); } else { container.style.overflowY = 'auto'; } }; /** * @param {HTMLElement} container * @param {boolean} scrollbarPadding * @param {string} initialBodyOverflow */ var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) { iOSfix(); if (scrollbarPadding && initialBodyOverflow !== 'hidden') { replaceScrollbarWithPadding(initialBodyOverflow); } // sweetalert2/issues/1247 setTimeout(function () { container.scrollTop = 0; }); }; /** * @param {HTMLElement} container * @param {HTMLElement} popup * @param {SweetAlertOptions} params */ var addClasses = function addClasses(container, popup, params) { addClass(container, params.showClass.backdrop); if (params.animation) { // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 popup.style.setProperty('opacity', '0', 'important'); show(popup, 'grid'); setTimeout(function () { // Animate popup right after showing it addClass(popup, params.showClass.popup); // and remove the opacity workaround popup.style.removeProperty('opacity'); }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 } else { show(popup, 'grid'); } addClass([document.documentElement, document.body], swalClasses.shown); if (params.heightAuto && params.backdrop && !params.toast) { addClass([document.documentElement, document.body], swalClasses['height-auto']); } }; var defaultInputValidators = { /** * @param {string} string * @param {string} [validationMessage] * @returns {Promise<string | void>} */ email: function email(string, validationMessage) { return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); }, /** * @param {string} string * @param {string} [validationMessage] * @returns {Promise<string | void>} */ url: function url(string, validationMessage) { // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); } }; /** * @param {SweetAlertOptions} params */ function setDefaultInputValidators(params) { // Use default `inputValidator` for supported input types if not provided if (params.inputValidator) { return; } if (params.input === 'email') { params.inputValidator = defaultInputValidators['email']; } if (params.input === 'url') { params.inputValidator = defaultInputValidators['url']; } } /** * @param {SweetAlertOptions} params */ function validateCustomTargetElement(params) { // Determine if the custom target element is valid if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { warn('Target parameter is not valid, defaulting to "body"'); params.target = 'body'; } } /** * Set type, text and actions on popup * * @param {SweetAlertOptions} params */ function setParameters(params) { setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm if (params.showLoaderOnConfirm && !params.preConfirm) { warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); } validateCustomTargetElement(params); // Replace newlines with <br> in title if (typeof params.title === 'string') { params.title = params.title.split('\n').join('<br />'); } init(params); } /** @type {SweetAlert} */ var currentInstance; var _promise = /*#__PURE__*/new WeakMap(); var SweetAlert = /*#__PURE__*/function () { /** * @param {...any} args * @this {SweetAlert} */ function SweetAlert() { _classCallCheck(this, SweetAlert); /** * @type {Promise<SweetAlertResult>} */ _classPrivateFieldInitSpec(this, _promise, void 0); // Prevent run in Node env if (typeof window === 'undefined') { return; } currentInstance = this; // @ts-ignore for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var outerParams = Object.freeze(this.constructor.argsToParams(args)); /** @type {Readonly<SweetAlertOptions>} */ this.params = outerParams; /** @type {boolean} */ this.isAwaitingPromise = false; _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); } return _createClass(SweetAlert, [{ key: "_main", value: function _main(userParams) { var mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; showWarningsForParams(Object.assign({}, mixinParams, userParams)); if (globalState.currentInstance) { var swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); var isAwaitingPromise = globalState.currentInstance.isAwaitingPromise; globalState.currentInstance._destroy(); if (!isAwaitingPromise) { swalPromiseResolve({ isDismissed: true }); } if (isModal()) { unsetAriaHidden(); } } globalState.currentInstance = currentInstance; var innerParams = prepareParams(userParams, mixinParams); setParameters(innerParams); Object.freeze(innerParams); // clear the previous timer if (globalState.timeout) { globalState.timeout.stop(); delete globalState.timeout; } // clear the restore focus timeout clearTimeout(globalState.restoreFocusTimeout); var domCache = populateDomCache(currentInstance); render(currentInstance, innerParams); privateProps.innerParams.set(currentInstance, innerParams); return swalPromise(currentInstance, domCache, innerParams); } // `catch` cannot be the name of a module export, so we define our thenable methods here instead }, { key: "then", value: function then(onFulfilled) { return _classPrivateFieldGet2(_promise, this).then(onFulfilled); } }, { key: "finally", value: function _finally(onFinally) { return _classPrivateFieldGet2(_promise, this)["finally"](onFinally); } }]); }(); /** * @param {SweetAlert} instance * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams * @returns {Promise} */ var swalPromise = function swalPromise(instance, domCache, innerParams) { return new Promise(function (resolve, reject) { // functions to handle all closings/dismissals /** * @param {DismissReason} dismiss */ var dismissWith = function dismissWith(dismiss) { instance.close({ isDismissed: true, dismiss: dismiss }); }; privateMethods.swalPromiseResolve.set(instance, resolve); privateMethods.swalPromiseReject.set(instance, reject); domCache.confirmButton.onclick = function () { handleConfirmButtonClick(instance); }; domCache.denyButton.onclick = function () { handleDenyButtonClick(instance); }; domCache.cancelButton.onclick = function () { handleCancelButtonClick(instance, dismissWith); }; domCache.closeButton.onclick = function () { dismissWith(DismissReason.close); }; handlePopupClick(innerParams, domCache, dismissWith); addKeydownHandler(globalState, innerParams, dismissWith); handleInputOptionsAndValue(instance, innerParams); openPopup(innerParams); setupTimer(globalState, innerParams, dismissWith); initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) setTimeout(function () { domCache.container.scrollTop = 0; }); }); }; /** * @param {SweetAlertOptions} userParams * @param {SweetAlertOptions} mixinParams * @returns {SweetAlertOptions} */ var prepareParams = function prepareParams(userParams, mixinParams) { var templateParams = getTemplateParams(userParams); var params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); if (params.animation === false) { params.showClass = { backdrop: 'swal2-noanimation' }; params.hideClass = {}; } return params; }; /** * @param {SweetAlert} instance * @returns {DomCache} */ var populateDomCache = function populateDomCache(instance) { var domCache = { popup: getPopup(), container: getContainer(), actions: getActions(), confirmButton: getConfirmButton(), denyButton: getDenyButton(), cancelButton: getCancelButton(), loader: getLoader(), closeButton: getCloseButton(), validationMessage: getValidationMessage(), progressSteps: getProgressSteps() }; privateProps.domCache.set(instance, domCache); return domCache; }; /** * @param {GlobalState} globalState * @param {SweetAlertOptions} innerParams * @param {Function} dismissWith */ var setupTimer = function setupTimer(globalState, innerParams, dismissWith) { var timerProgressBar = getTimerProgressBar(); hide(timerProgressBar); if (innerParams.timer) { globalState.timeout = new Timer(function () { dismissWith('timer'); delete globalState.timeout; }, innerParams.timer); if (innerParams.timerProgressBar) { show(timerProgressBar); applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar'); setTimeout(function () { if (globalState.timeout && globalState.timeout.running) { // timer can be already stopped or unset at this point animateTimerProgressBar(innerParams.timer); } }); } } }; /** * Initialize focus in the popup: * * 1. If `toast` is `true`, don't steal focus from the document. * 2. Else if there is an [autofocus] element, focus it. * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. * 6. Else focus the first focusable element in a popup (if any). * * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams */ var initFocus = function initFocus(domCache, innerParams) { if (innerParams.toast) { return; } // TODO: this is dumb, remove `allowEnterKey` param in the next major version if (!callIfFunction(innerParams.allowEnterKey)) { warnAboutDeprecation('allowEnterKey'); blurActiveElement(); return; } if (focusAutofocus(domCache)) { return; } if (focusButton(domCache, innerParams)) { return; } setFocus(-1, 1); }; /** * @param {DomCache} domCache * @returns {boolean} */ var focusAutofocus = function focusAutofocus(domCache) { var autofocusElements = domCache.popup.querySelectorAll('[autofocus]'); var _iterator = _createForOfIteratorHelper(autofocusElements), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var autofocusElement = _step.value; if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { autofocusElement.focus(); return true; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return false; }; /** * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams * @returns {boolean} */ var focusButton = function focusButton(domCache, innerParams) { if (innerParams.focusDeny && isVisible$1(domCache.denyButton)) { domCache.denyButton.focus(); return true; } if (innerParams.focusCancel && isVisible$1(domCache.cancelButton)) { domCache.cancelButton.focus(); return true; } if (innerParams.focusConfirm && isVisible$1(domCache.confirmButton)) { domCache.confirmButton.focus(); return true; } return false; }; var blurActiveElement = function blurActiveElement() { if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') { document.activeElement.blur(); } }; // Dear russian users visiting russian sites. Let's have fun. if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { var now = new Date(); var initiationDate = localStorage.getItem('swal-initiation'); if (!initiationDate) { localStorage.setItem('swal-initiation', "".concat(now)); } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { setTimeout(function () { document.body.style.pointerEvents = 'none'; var ukrainianAnthem = document.createElement('audio'); ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; ukrainianAnthem.loop = true; document.body.appendChild(ukrainianAnthem); setTimeout(function () { ukrainianAnthem.play()["catch"](function () { // ignore }); }, 2500); }, 500); } } // Assign instance methods from src/instanceMethods/*.js to prototype SweetAlert.prototype.disableButtons = disableButtons; SweetAlert.prototype.enableButtons = enableButtons; SweetAlert.prototype.getInput = getInput; SweetAlert.prototype.disableInput = disableInput; SweetAlert.prototype.enableInput = enableInput; SweetAlert.prototype.hideLoading = hideLoading; SweetAlert.prototype.disableLoading = hideLoading; SweetAlert.prototype.showValidationMessage = showValidationMessage; SweetAlert.prototype.resetValidationMessage = resetValidationMessage; SweetAlert.prototype.close = close; SweetAlert.prototype.closePopup = close; SweetAlert.prototype.closeModal = close; SweetAlert.prototype.closeToast = close; SweetAlert.prototype.rejectPromise = rejectPromise; SweetAlert.prototype.update = update; SweetAlert.prototype._destroy = _destroy; // Assign static methods from src/staticMethods/*.js to constructor Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility Object.keys(instanceMethods).forEach(function (key) { /** * @param {...any} args * @returns {any | undefined} */ SweetAlert[key] = function () { if (currentInstance && currentInstance[key]) { var _currentInstance; return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments); } return null; }; }); SweetAlert.DismissReason = DismissReason; SweetAlert.version = '11.12.2'; var Swal = SweetAlert; // @ts-ignore Swal["default"] = Swal; return Swal; })); if (typeof this !== 'undefined' && this.Sweetalert2){this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} "undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); /***/ }), /***/ 6752: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); //import { initScript } from './douyu_livebc'; var main_1 = __importDefault(__webpack_require__(5811)); var app = function () { (0, main_1.default)(); }; exports["default"] = app; /***/ }), /***/ 3607: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); var app_1 = __importDefault(__webpack_require__(6752)); if (true) { (0, app_1.default)(); } else {} /***/ }), /***/ 509: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isCallable = __webpack_require__(9985); var tryToString = __webpack_require__(3691); var $TypeError = TypeError; // `Assert: IsCallable(argument) is true` module.exports = function (argument) { if (isCallable(argument)) return argument; throw new $TypeError(tryToString(argument) + ' is not a function'); }; /***/ }), /***/ 2655: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isConstructor = __webpack_require__(9429); var tryToString = __webpack_require__(3691); var $TypeError = TypeError; // `Assert: IsConstructor(argument) is true` module.exports = function (argument) { if (isConstructor(argument)) return argument; throw new $TypeError(tryToString(argument) + ' is not a constructor'); }; /***/ }), /***/ 3550: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isPossiblePrototype = __webpack_require__(598); var $String = String; var $TypeError = TypeError; module.exports = function (argument) { if (isPossiblePrototype(argument)) return argument; throw new $TypeError("Can't set " + $String(argument) + ' as a prototype'); }; /***/ }), /***/ 7370: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); var create = __webpack_require__(5391); var defineProperty = (__webpack_require__(2560).f); var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] === undefined) { defineProperty(ArrayPrototype, UNSCOPABLES, { configurable: true, value: create(null) }); } // add a key to Array.prototype[@@unscopables] module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; /***/ }), /***/ 1514: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var charAt = (__webpack_require__(730).charAt); // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? charAt(S, index).length : 1); }; /***/ }), /***/ 767: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isPrototypeOf = __webpack_require__(3622); var $TypeError = TypeError; module.exports = function (it, Prototype) { if (isPrototypeOf(Prototype, it)) return it; throw new $TypeError('Incorrect invocation'); }; /***/ }), /***/ 5027: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isObject = __webpack_require__(8999); var $String = String; var $TypeError = TypeError; // `Assert: Type(argument) is Object` module.exports = function (argument) { if (isObject(argument)) return argument; throw new $TypeError($String(argument) + ' is not an object'); }; /***/ }), /***/ 1655: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it var fails = __webpack_require__(3689); module.exports = fails(function () { if (typeof ArrayBuffer == 'function') { var buffer = new ArrayBuffer(8); // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 }); } }); /***/ }), /***/ 7612: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $forEach = (__webpack_require__(2960).forEach); var arrayMethodIsStrict = __webpack_require__(6834); var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); // eslint-disable-next-line es/no-array-prototype-foreach -- safe } : [].forEach; /***/ }), /***/ 1055: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(4071); var call = __webpack_require__(2615); var toObject = __webpack_require__(690); var callWithSafeIterationClosing = __webpack_require__(1228); var isArrayIteratorMethod = __webpack_require__(3292); var isConstructor = __webpack_require__(9429); var lengthOfArrayLike = __webpack_require__(6310); var createProperty = __webpack_require__(6522); var getIterator = __webpack_require__(5185); var getIteratorMethod = __webpack_require__(1664); var $Array = Array; // `Array.from` method implementation // https://tc39.es/ecma262/#sec-array.from module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var IS_CONSTRUCTOR = isConstructor(this); var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined); var iteratorMethod = getIteratorMethod(O); var index = 0; var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) { result = IS_CONSTRUCTOR ? new this() : []; iterator = getIterator(O, iteratorMethod); next = iterator.next; for (;!(step = call(next, iterator)).done; index++) { value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; createProperty(result, index, value); } } else { length = lengthOfArrayLike(O); result = IS_CONSTRUCTOR ? new this(length) : $Array(length); for (;length > index; index++) { value = mapping ? mapfn(O[index], index) : O[index]; createProperty(result, index, value); } } result.length = index; return result; }; /***/ }), /***/ 4328: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toIndexedObject = __webpack_require__(5290); var toAbsoluteIndex = __webpack_require__(7578); var lengthOfArrayLike = __webpack_require__(6310); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare -- NaN check if (IS_INCLUDES && el !== el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check if (value !== value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; /***/ }), /***/ 2960: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(4071); var uncurryThis = __webpack_require__(8844); var IndexedObject = __webpack_require__(4413); var toObject = __webpack_require__(690); var lengthOfArrayLike = __webpack_require__(6310); var arraySpeciesCreate = __webpack_require__(7120); var push = uncurryThis([].push); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation var createMethod = function (TYPE) { var IS_MAP = TYPE === 1; var IS_FILTER = TYPE === 2; var IS_SOME = TYPE === 3; var IS_EVERY = TYPE === 4; var IS_FIND_INDEX = TYPE === 6; var IS_FILTER_REJECT = TYPE === 7; var NO_HOLES = TYPE === 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = IndexedObject(O); var length = lengthOfArrayLike(self); var boundFunction = bind(callbackfn, that); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) target[index] = result; // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: push(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; module.exports = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod(6), // `Array.prototype.filterReject` method // https://github.com/tc39/proposal-array-filtering filterReject: createMethod(7) }; /***/ }), /***/ 9042: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var wellKnownSymbol = __webpack_require__(4201); var V8_VERSION = __webpack_require__(3615); var SPECIES = wellKnownSymbol('species'); module.exports = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; /***/ }), /***/ 6834: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); module.exports = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; /***/ }), /***/ 6004: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); module.exports = uncurryThis([].slice); /***/ }), /***/ 382: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var arraySlice = __webpack_require__(6004); var floor = Math.floor; var sort = function (array, comparefn) { var length = array.length; if (length < 8) { // insertion sort var i = 1; var element, j; while (i < length) { j = i; element = array[i]; while (j && comparefn(array[j - 1], element) > 0) { array[j] = array[--j]; } if (j !== i++) array[j] = element; } } else { // merge sort var middle = floor(length / 2); var left = sort(arraySlice(array, 0, middle), comparefn); var right = sort(arraySlice(array, middle), comparefn); var llength = left.length; var rlength = right.length; var lindex = 0; var rindex = 0; while (lindex < llength || rindex < rlength) { array[lindex + rindex] = (lindex < llength && rindex < rlength) ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++]; } } return array; }; module.exports = sort; /***/ }), /***/ 5271: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isArray = __webpack_require__(2297); var isConstructor = __webpack_require__(9429); var isObject = __webpack_require__(8999); var wellKnownSymbol = __webpack_require__(4201); var SPECIES = wellKnownSymbol('species'); var $Array = Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? $Array : C; }; /***/ }), /***/ 7120: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var arraySpeciesConstructor = __webpack_require__(5271); // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; /***/ }), /***/ 1228: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var anObject = __webpack_require__(5027); var iteratorClose = __webpack_require__(2125); // call something on iterator step with safe closing on error module.exports = function (iterator, fn, value, ENTRIES) { try { return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); } catch (error) { iteratorClose(iterator, 'throw', error); } }; /***/ }), /***/ 6431: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); var ITERATOR = wellKnownSymbol('iterator'); var SAFE_CLOSING = false; try { var called = 0; var iteratorWithReturn = { next: function () { return { done: !!called++ }; }, 'return': function () { SAFE_CLOSING = true; } }; iteratorWithReturn[ITERATOR] = function () { return this; }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing Array.from(iteratorWithReturn, function () { throw 2; }); } catch (error) { /* empty */ } module.exports = function (exec, SKIP_CLOSING) { try { if (!SKIP_CLOSING && !SAFE_CLOSING) return false; } catch (error) { return false; } // workaround of old WebKit + `eval` bug var ITERATION_SUPPORT = false; try { var object = {}; object[ITERATOR] = function () { return { next: function () { return { done: ITERATION_SUPPORT = true }; } }; }; exec(object); } catch (error) { /* empty */ } return ITERATION_SUPPORT; }; /***/ }), /***/ 6648: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var toString = uncurryThis({}.toString); var stringSlice = uncurryThis(''.slice); module.exports = function (it) { return stringSlice(toString(it), 8, -1); }; /***/ }), /***/ 926: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__(3043); var isCallable = __webpack_require__(9985); var classofRaw = __webpack_require__(6648); var wellKnownSymbol = __webpack_require__(4201); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $Object = Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; /***/ }), /***/ 800: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var create = __webpack_require__(5391); var defineBuiltInAccessor = __webpack_require__(2148); var defineBuiltIns = __webpack_require__(6045); var bind = __webpack_require__(4071); var anInstance = __webpack_require__(767); var isNullOrUndefined = __webpack_require__(981); var iterate = __webpack_require__(8734); var defineIterator = __webpack_require__(1934); var createIterResultObject = __webpack_require__(7807); var setSpecies = __webpack_require__(4241); var DESCRIPTORS = __webpack_require__(7697); var fastKey = (__webpack_require__(5375).fastKey); var InternalStateModule = __webpack_require__(618); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; module.exports = { getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var Constructor = wrapper(function (that, iterable) { anInstance(that, Prototype); setInternalState(that, { type: CONSTRUCTOR_NAME, index: create(null), first: undefined, last: undefined, size: 0 }); if (!DESCRIPTORS) that.size = 0; if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var Prototype = Constructor.prototype; var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function (that, key, value) { var state = getInternalState(that); var entry = getEntry(that, key); var previous, index; // change existing entry if (entry) { entry.value = value; // create new entry } else { state.last = entry = { index: index = fastKey(key, true), key: key, value: value, previous: previous = state.last, next: undefined, removed: false }; if (!state.first) state.first = entry; if (previous) previous.next = entry; if (DESCRIPTORS) state.size++; else that.size++; // add to index if (index !== 'F') state.index[index] = entry; } return that; }; var getEntry = function (that, key) { var state = getInternalState(that); // fast case var index = fastKey(key); var entry; if (index !== 'F') return state.index[index]; // frozen object case for (entry = state.first; entry; entry = entry.next) { if (entry.key === key) return entry; } }; defineBuiltIns(Prototype, { // `{ Map, Set }.prototype.clear()` methods // https://tc39.es/ecma262/#sec-map.prototype.clear // https://tc39.es/ecma262/#sec-set.prototype.clear clear: function clear() { var that = this; var state = getInternalState(that); var entry = state.first; while (entry) { entry.removed = true; if (entry.previous) entry.previous = entry.previous.next = undefined; entry = entry.next; } state.first = state.last = undefined; state.index = create(null); if (DESCRIPTORS) state.size = 0; else that.size = 0; }, // `{ Map, Set }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.delete // https://tc39.es/ecma262/#sec-set.prototype.delete 'delete': function (key) { var that = this; var state = getInternalState(that); var entry = getEntry(that, key); if (entry) { var next = entry.next; var prev = entry.previous; delete state.index[entry.index]; entry.removed = true; if (prev) prev.next = next; if (next) next.previous = prev; if (state.first === entry) state.first = next; if (state.last === entry) state.last = prev; if (DESCRIPTORS) state.size--; else that.size--; } return !!entry; }, // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods // https://tc39.es/ecma262/#sec-map.prototype.foreach // https://tc39.es/ecma262/#sec-set.prototype.foreach forEach: function forEach(callbackfn /* , that = undefined */) { var state = getInternalState(this); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined); var entry; while (entry = entry ? entry.next : state.first) { boundFunction(entry.value, entry.key, this); // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; } }, // `{ Map, Set}.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.has // https://tc39.es/ecma262/#sec-set.prototype.has has: function has(key) { return !!getEntry(this, key); } }); defineBuiltIns(Prototype, IS_MAP ? { // `Map.prototype.get(key)` method // https://tc39.es/ecma262/#sec-map.prototype.get get: function get(key) { var entry = getEntry(this, key); return entry && entry.value; }, // `Map.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-map.prototype.set set: function set(key, value) { return define(this, key === 0 ? 0 : key, value); } } : { // `Set.prototype.add(value)` method // https://tc39.es/ecma262/#sec-set.prototype.add add: function add(value) { return define(this, value = value === 0 ? 0 : value, value); } }); if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', { configurable: true, get: function () { return getInternalState(this).size; } }); return Constructor; }, setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods // https://tc39.es/ecma262/#sec-map.prototype.entries // https://tc39.es/ecma262/#sec-map.prototype.keys // https://tc39.es/ecma262/#sec-map.prototype.values // https://tc39.es/ecma262/#sec-map.prototype-@@iterator // https://tc39.es/ecma262/#sec-set.prototype.entries // https://tc39.es/ecma262/#sec-set.prototype.keys // https://tc39.es/ecma262/#sec-set.prototype.values // https://tc39.es/ecma262/#sec-set.prototype-@@iterator defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { setInternalState(this, { type: ITERATOR_NAME, target: iterated, state: getInternalCollectionState(iterated), kind: kind, last: undefined }); }, function () { var state = getInternalIteratorState(this); var kind = state.kind; var entry = state.last; // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; // get next entry if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { // or finish the iteration state.target = undefined; return createIterResultObject(undefined, true); } // return step by kind if (kind === 'keys') return createIterResultObject(entry.key, false); if (kind === 'values') return createIterResultObject(entry.value, false); return createIterResultObject([entry.key, entry.value], false); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors // https://tc39.es/ecma262/#sec-get-map-@@species // https://tc39.es/ecma262/#sec-get-set-@@species setSpecies(CONSTRUCTOR_NAME); } }; /***/ }), /***/ 319: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var global = __webpack_require__(9037); var uncurryThis = __webpack_require__(8844); var isForced = __webpack_require__(5266); var defineBuiltIn = __webpack_require__(1880); var InternalMetadataModule = __webpack_require__(5375); var iterate = __webpack_require__(8734); var anInstance = __webpack_require__(767); var isCallable = __webpack_require__(9985); var isNullOrUndefined = __webpack_require__(981); var isObject = __webpack_require__(8999); var fails = __webpack_require__(3689); var checkCorrectnessOfIteration = __webpack_require__(6431); var setToStringTag = __webpack_require__(5997); var inheritIfRequired = __webpack_require__(3457); module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; var NativeConstructor = global[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var Constructor = NativeConstructor; var exported = {}; var fixMethod = function (KEY) { var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]); defineBuiltIn(NativePrototype, KEY, KEY === 'add' ? function add(value) { uncurriedNativeMethod(this, value === 0 ? 0 : value); return this; } : KEY === 'delete' ? function (key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY === 'get' ? function get(key) { return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY === 'has' ? function has(key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : function set(key, value) { uncurriedNativeMethod(this, key === 0 ? 0 : key, value); return this; } ); }; var REPLACE = isForced( CONSTRUCTOR_NAME, !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); })) ); if (REPLACE) { // create collection constructor Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); InternalMetadataModule.enable(); } else if (isForced(CONSTRUCTOR_NAME, true)) { var instance = new Constructor(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly // eslint-disable-next-line no-new -- required for testing var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new NativeConstructor(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { Constructor = wrapper(function (dummy, iterable) { anInstance(dummy, NativePrototype); var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); return that; }); Constructor.prototype = NativePrototype; NativePrototype.constructor = Constructor; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; } exported[CONSTRUCTOR_NAME] = Constructor; $({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported); setToStringTag(Constructor, CONSTRUCTOR_NAME); if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); return Constructor; }; /***/ }), /***/ 8758: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var hasOwn = __webpack_require__(6812); var ownKeys = __webpack_require__(9152); var getOwnPropertyDescriptorModule = __webpack_require__(2474); var definePropertyModule = __webpack_require__(2560); module.exports = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; /***/ }), /***/ 7413: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); var MATCH = wellKnownSymbol('match'); module.exports = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; /***/ }), /***/ 1748: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); module.exports = !fails(function () { function F() { /* empty */ } F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing return Object.getPrototypeOf(new F()) !== F.prototype; }); /***/ }), /***/ 7807: /***/ ((module) => { "use strict"; // `CreateIterResultObject` abstract operation // https://tc39.es/ecma262/#sec-createiterresultobject module.exports = function (value, done) { return { value: value, done: done }; }; /***/ }), /***/ 5773: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var definePropertyModule = __webpack_require__(2560); var createPropertyDescriptor = __webpack_require__(5684); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ 5684: /***/ ((module) => { "use strict"; module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ 6522: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var definePropertyModule = __webpack_require__(2560); var createPropertyDescriptor = __webpack_require__(5684); module.exports = function (object, key, value) { if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value)); else object[key] = value; }; /***/ }), /***/ 2148: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var makeBuiltIn = __webpack_require__(8702); var defineProperty = __webpack_require__(2560); module.exports = function (target, name, descriptor) { if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); return defineProperty.f(target, name, descriptor); }; /***/ }), /***/ 1880: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isCallable = __webpack_require__(9985); var definePropertyModule = __webpack_require__(2560); var makeBuiltIn = __webpack_require__(8702); var defineGlobalProperty = __webpack_require__(5014); module.exports = function (O, key, value, options) { if (!options) options = {}; var simple = options.enumerable; var name = options.name !== undefined ? options.name : key; if (isCallable(value)) makeBuiltIn(value, name, options); if (options.global) { if (simple) O[key] = value; else defineGlobalProperty(key, value); } else { try { if (!options.unsafe) delete O[key]; else if (O[key]) simple = true; } catch (error) { /* empty */ } if (simple) O[key] = value; else definePropertyModule.f(O, key, { value: value, enumerable: false, configurable: !options.nonConfigurable, writable: !options.nonWritable }); } return O; }; /***/ }), /***/ 6045: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var defineBuiltIn = __webpack_require__(1880); module.exports = function (target, src, options) { for (var key in src) defineBuiltIn(target, key, src[key], options); return target; }; /***/ }), /***/ 5014: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; module.exports = function (key, value) { try { defineProperty(global, key, { value: value, configurable: true, writable: true }); } catch (error) { global[key] = value; } return value; }; /***/ }), /***/ 7697: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); // Detect IE8's incomplete defineProperty implementation module.exports = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); /***/ }), /***/ 6420: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var isObject = __webpack_require__(8999); var document = global.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; /***/ }), /***/ 5565: /***/ ((module) => { "use strict"; var $TypeError = TypeError; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 module.exports = function (it) { if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded'); return it; }; /***/ }), /***/ 6338: /***/ ((module) => { "use strict"; // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods module.exports = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; /***/ }), /***/ 3265: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var documentCreateElement = __webpack_require__(6420); var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; /***/ }), /***/ 2532: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var IS_DENO = __webpack_require__(8563); var IS_NODE = __webpack_require__(806); module.exports = !IS_DENO && !IS_NODE && typeof window == 'object' && typeof document == 'object'; /***/ }), /***/ 8563: /***/ ((module) => { "use strict"; /* global Deno -- Deno case */ module.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object'; /***/ }), /***/ 3221: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var userAgent = __webpack_require__(71); module.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined'; /***/ }), /***/ 4764: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var userAgent = __webpack_require__(71); // eslint-disable-next-line redos/no-vulnerable -- safe module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent); /***/ }), /***/ 806: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var classof = __webpack_require__(6648); module.exports = classof(global.process) === 'process'; /***/ }), /***/ 7486: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var userAgent = __webpack_require__(71); module.exports = /web0s(?!.*chrome)/i.test(userAgent); /***/ }), /***/ 71: /***/ ((module) => { "use strict"; module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; /***/ }), /***/ 3615: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var userAgent = __webpack_require__(71); var process = global.process; var Deno = global.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } module.exports = version; /***/ }), /***/ 2739: /***/ ((module) => { "use strict"; // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ 9989: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var getOwnPropertyDescriptor = (__webpack_require__(2474).f); var createNonEnumerableProperty = __webpack_require__(5773); var defineBuiltIn = __webpack_require__(1880); var defineGlobalProperty = __webpack_require__(5014); var copyConstructorProperties = __webpack_require__(8758); var isForced = __webpack_require__(5266); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.dontCallGetSet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || defineGlobalProperty(TARGET, {}); } else { target = global[TARGET] && global[TARGET].prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.dontCallGetSet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } defineBuiltIn(target, key, sourceProperty, options); } }; /***/ }), /***/ 3689: /***/ ((module) => { "use strict"; module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; /***/ }), /***/ 8678: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove from `core-js@4` since it's moved to entry points __webpack_require__(4043); var call = __webpack_require__(2615); var defineBuiltIn = __webpack_require__(1880); var regexpExec = __webpack_require__(6308); var fails = __webpack_require__(3689); var wellKnownSymbol = __webpack_require__(4201); var createNonEnumerableProperty = __webpack_require__(5773); var SPECIES = wellKnownSymbol('species'); var RegExpPrototype = RegExp.prototype; module.exports = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegExp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) !== 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; if (KEY === 'split') { // We can't use real regex here since it causes deoptimization // and serious performance degradation in V8 // https://github.com/zloirock/core-js/issues/306 re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED ) { var nativeRegExpMethod = /./[SYMBOL]; var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var $exec = regexp.exec; if ($exec === regexpExec || $exec === RegExpPrototype.exec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) }; } return { done: true, value: call(nativeMethod, str, regexp, arg2) }; } return { done: false }; }); defineBuiltIn(String.prototype, KEY, methods[0]); defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true); }; /***/ }), /***/ 1594: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); module.exports = !fails(function () { // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing return Object.isExtensible(Object.preventExtensions({})); }); /***/ }), /***/ 1735: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NATIVE_BIND = __webpack_require__(7215); var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () { return call.apply(apply, arguments); }); /***/ }), /***/ 4071: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(6576); var aCallable = __webpack_require__(509); var NATIVE_BIND = __webpack_require__(7215); var bind = uncurryThis(uncurryThis.bind); // optional / simple context binding module.exports = function (fn, that) { aCallable(fn); return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ 7215: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); module.exports = !fails(function () { // eslint-disable-next-line es/no-function-prototype-bind -- safe var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); /***/ }), /***/ 2615: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NATIVE_BIND = __webpack_require__(7215); var call = Function.prototype.call; module.exports = NATIVE_BIND ? call.bind(call) : function () { return call.apply(call, arguments); }; /***/ }), /***/ 1236: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var hasOwn = __webpack_require__(6812); var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); module.exports = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; /***/ }), /***/ 2743: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var aCallable = __webpack_require__(509); module.exports = function (object, key, method) { try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method])); } catch (error) { /* empty */ } }; /***/ }), /***/ 6576: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var classofRaw = __webpack_require__(6648); var uncurryThis = __webpack_require__(8844); module.exports = function (fn) { // Nashorn bug: // https://github.com/zloirock/core-js/issues/1128 // https://github.com/zloirock/core-js/issues/1130 if (classofRaw(fn) === 'Function') return uncurryThis(fn); }; /***/ }), /***/ 8844: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NATIVE_BIND = __webpack_require__(7215); var FunctionPrototype = Function.prototype; var call = FunctionPrototype.call; var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) { return function () { return call.apply(fn, arguments); }; }; /***/ }), /***/ 6058: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var isCallable = __webpack_require__(9985); var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; module.exports = function (namespace, method) { return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method]; }; /***/ }), /***/ 1664: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var classof = __webpack_require__(926); var getMethod = __webpack_require__(4849); var isNullOrUndefined = __webpack_require__(981); var Iterators = __webpack_require__(9478); var wellKnownSymbol = __webpack_require__(4201); var ITERATOR = wellKnownSymbol('iterator'); module.exports = function (it) { if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)]; }; /***/ }), /***/ 5185: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var aCallable = __webpack_require__(509); var anObject = __webpack_require__(5027); var tryToString = __webpack_require__(3691); var getIteratorMethod = __webpack_require__(1664); var $TypeError = TypeError; module.exports = function (argument, usingIterator) { var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); throw new $TypeError(tryToString(argument) + ' is not iterable'); }; /***/ }), /***/ 2643: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var isArray = __webpack_require__(2297); var isCallable = __webpack_require__(9985); var classof = __webpack_require__(6648); var toString = __webpack_require__(4327); var push = uncurryThis([].push); module.exports = function (replacer) { if (isCallable(replacer)) return replacer; if (!isArray(replacer)) return; var rawLength = replacer.length; var keys = []; for (var i = 0; i < rawLength; i++) { var element = replacer[i]; if (typeof element == 'string') push(keys, element); else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element)); } var keysLength = keys.length; var root = true; return function (key, value) { if (root) { root = false; return value; } if (isArray(this)) return value; for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value; }; }; /***/ }), /***/ 4849: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var aCallable = __webpack_require__(509); var isNullOrUndefined = __webpack_require__(981); // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod module.exports = function (V, P) { var func = V[P]; return isNullOrUndefined(func) ? undefined : aCallable(func); }; /***/ }), /***/ 9037: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var check = function (it) { return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) || check(typeof this == 'object' && this) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); /***/ }), /***/ 6812: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var toObject = __webpack_require__(690); var hasOwnProperty = uncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty // eslint-disable-next-line es/no-object-hasown -- safe module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; /***/ }), /***/ 7248: /***/ ((module) => { "use strict"; module.exports = {}; /***/ }), /***/ 920: /***/ ((module) => { "use strict"; module.exports = function (a, b) { try { // eslint-disable-next-line no-console -- safe arguments.length === 1 ? console.error(a) : console.error(a, b); } catch (error) { /* empty */ } }; /***/ }), /***/ 2688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getBuiltIn = __webpack_require__(6058); module.exports = getBuiltIn('document', 'documentElement'); /***/ }), /***/ 8506: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var fails = __webpack_require__(3689); var createElement = __webpack_require__(6420); // Thanks to IE8 for its funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a !== 7; }); /***/ }), /***/ 4413: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var fails = __webpack_require__(3689); var classof = __webpack_require__(6648); var $Object = Object; var split = uncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) === 'String' ? split(it, '') : $Object(it); } : $Object; /***/ }), /***/ 3457: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isCallable = __webpack_require__(9985); var isObject = __webpack_require__(8999); var setPrototypeOf = __webpack_require__(9385); // makes subclassing work correct for wrapped built-ins module.exports = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) setPrototypeOf($this, NewTargetPrototype); return $this; }; /***/ }), /***/ 6738: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var isCallable = __webpack_require__(9985); var store = __webpack_require__(4091); var functionToString = uncurryThis(Function.toString); // this helper broken in `[email protected]`, so we can't use `shared` helper if (!isCallable(store.inspectSource)) { store.inspectSource = function (it) { return functionToString(it); }; } module.exports = store.inspectSource; /***/ }), /***/ 5375: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var uncurryThis = __webpack_require__(8844); var hiddenKeys = __webpack_require__(7248); var isObject = __webpack_require__(8999); var hasOwn = __webpack_require__(6812); var defineProperty = (__webpack_require__(2560).f); var getOwnPropertyNamesModule = __webpack_require__(2741); var getOwnPropertyNamesExternalModule = __webpack_require__(6062); var isExtensible = __webpack_require__(1129); var uid = __webpack_require__(4630); var FREEZING = __webpack_require__(1594); var REQUIRED = false; var METADATA = uid('meta'); var id = 0; var setMetadata = function (it) { defineProperty(it, METADATA, { value: { objectID: 'O' + id++, // object ID weakData: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return a primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMetadata(it); // return object ID } return it[METADATA].objectID; }; var getWeakData = function (it, create) { if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMetadata(it); // return the store of weak collections IDs } return it[METADATA].weakData; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it); return it; }; var enable = function () { meta.enable = function () { /* empty */ }; REQUIRED = true; var getOwnPropertyNames = getOwnPropertyNamesModule.f; var splice = uncurryThis([].splice); var test = {}; test[METADATA] = 1; // prevent exposing of metadata key if (getOwnPropertyNames(test).length) { getOwnPropertyNamesModule.f = function (it) { var result = getOwnPropertyNames(it); for (var i = 0, length = result.length; i < length; i++) { if (result[i] === METADATA) { splice(result, i, 1); break; } } return result; }; $({ target: 'Object', stat: true, forced: true }, { getOwnPropertyNames: getOwnPropertyNamesExternalModule.f }); } }; var meta = module.exports = { enable: enable, fastKey: fastKey, getWeakData: getWeakData, onFreeze: onFreeze }; hiddenKeys[METADATA] = true; /***/ }), /***/ 618: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NATIVE_WEAK_MAP = __webpack_require__(9834); var global = __webpack_require__(9037); var isObject = __webpack_require__(8999); var createNonEnumerableProperty = __webpack_require__(5773); var hasOwn = __webpack_require__(6812); var shared = __webpack_require__(4091); var sharedKey = __webpack_require__(2713); var hiddenKeys = __webpack_require__(7248); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError = global.TypeError; var WeakMap = global.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw new TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); /* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get; store.has = store.has; store.set = store.set; /* eslint-enable no-self-assign -- prototype methods protection */ set = function (it, metadata) { if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store.set(it, metadata); return metadata; }; get = function (it) { return store.get(it) || {}; }; has = function (it) { return store.has(it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ 3292: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); var Iterators = __webpack_require__(9478); var ITERATOR = wellKnownSymbol('iterator'); var ArrayPrototype = Array.prototype; // check on default Array iterator module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); }; /***/ }), /***/ 2297: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var classof = __webpack_require__(6648); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe module.exports = Array.isArray || function isArray(argument) { return classof(argument) === 'Array'; }; /***/ }), /***/ 9985: /***/ ((module) => { "use strict"; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot var documentAll = typeof document == 'object' && document.all; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; /***/ }), /***/ 9429: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var fails = __webpack_require__(3689); var isCallable = __webpack_require__(9985); var classof = __webpack_require__(926); var getBuiltIn = __webpack_require__(6058); var inspectSource = __webpack_require__(6738); var noop = function () { /* empty */ }; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec = uncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.test(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, [], argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(argument)) return false; switch (classof(argument)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': return false; } try { // we can't check .prototype since constructors produced by .bind haven't it // `Function#toString` throws on some built-it function in some legacy engines // (for example, `DOMQuad` and similar in FF41-) return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor module.exports = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; /***/ }), /***/ 5266: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var isCallable = __webpack_require__(9985); var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; /***/ }), /***/ 981: /***/ ((module) => { "use strict"; // we can't use just `it == null` since of `document.all` special case // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec module.exports = function (it) { return it === null || it === undefined; }; /***/ }), /***/ 8999: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isCallable = __webpack_require__(9985); module.exports = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; /***/ }), /***/ 598: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isObject = __webpack_require__(8999); module.exports = function (argument) { return isObject(argument) || argument === null; }; /***/ }), /***/ 3931: /***/ ((module) => { "use strict"; module.exports = false; /***/ }), /***/ 1245: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isObject = __webpack_require__(8999); var classof = __webpack_require__(6648); var wellKnownSymbol = __webpack_require__(4201); var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp'); }; /***/ }), /***/ 734: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getBuiltIn = __webpack_require__(6058); var isCallable = __webpack_require__(9985); var isPrototypeOf = __webpack_require__(3622); var USE_SYMBOL_AS_UID = __webpack_require__(9525); var $Object = Object; module.exports = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it)); }; /***/ }), /***/ 8734: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(4071); var call = __webpack_require__(2615); var anObject = __webpack_require__(5027); var tryToString = __webpack_require__(3691); var isArrayIteratorMethod = __webpack_require__(3292); var lengthOfArrayLike = __webpack_require__(6310); var isPrototypeOf = __webpack_require__(3622); var getIterator = __webpack_require__(5185); var getIteratorMethod = __webpack_require__(1664); var iteratorClose = __webpack_require__(2125); var $TypeError = TypeError; var Result = function (stopped, result) { this.stopped = stopped; this.result = result; }; var ResultPrototype = Result.prototype; module.exports = function (iterable, unboundFunction, options) { var that = options && options.that; var AS_ENTRIES = !!(options && options.AS_ENTRIES); var IS_RECORD = !!(options && options.IS_RECORD); var IS_ITERATOR = !!(options && options.IS_ITERATOR); var INTERRUPTED = !!(options && options.INTERRUPTED); var fn = bind(unboundFunction, that); var iterator, iterFn, index, length, result, next, step; var stop = function (condition) { if (iterator) iteratorClose(iterator, 'normal', condition); return new Result(true, condition); }; var callFn = function (value) { if (AS_ENTRIES) { anObject(value); return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); } return INTERRUPTED ? fn(value, stop) : fn(value); }; if (IS_RECORD) { iterator = iterable.iterator; } else if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { result = callFn(iterable[index]); if (result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); } iterator = getIterator(iterable, iterFn); } next = IS_RECORD ? iterable.next : iterator.next; while (!(step = call(next, iterator)).done) { try { result = callFn(step.value); } catch (error) { iteratorClose(iterator, 'throw', error); } if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); }; /***/ }), /***/ 2125: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var anObject = __webpack_require__(5027); var getMethod = __webpack_require__(4849); module.exports = function (iterator, kind, value) { var innerResult, innerError; anObject(iterator); try { innerResult = getMethod(iterator, 'return'); if (!innerResult) { if (kind === 'throw') throw value; return value; } innerResult = call(innerResult, iterator); } catch (error) { innerError = true; innerResult = error; } if (kind === 'throw') throw value; if (innerError) throw innerResult; anObject(innerResult); return value; }; /***/ }), /***/ 974: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var IteratorPrototype = (__webpack_require__(2013).IteratorPrototype); var create = __webpack_require__(5391); var createPropertyDescriptor = __webpack_require__(5684); var setToStringTag = __webpack_require__(5997); var Iterators = __webpack_require__(9478); var returnThis = function () { return this; }; module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); Iterators[TO_STRING_TAG] = returnThis; return IteratorConstructor; }; /***/ }), /***/ 1934: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var call = __webpack_require__(2615); var IS_PURE = __webpack_require__(3931); var FunctionName = __webpack_require__(1236); var isCallable = __webpack_require__(9985); var createIteratorConstructor = __webpack_require__(974); var getPrototypeOf = __webpack_require__(1868); var setPrototypeOf = __webpack_require__(9385); var setToStringTag = __webpack_require__(5997); var createNonEnumerableProperty = __webpack_require__(5773); var defineBuiltIn = __webpack_require__(1880); var wellKnownSymbol = __webpack_require__(4201); var Iterators = __webpack_require__(9478); var IteratorsCore = __webpack_require__(2013); var PROPER_FUNCTION_NAME = FunctionName.PROPER; var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; var IteratorPrototype = IteratorsCore.IteratorPrototype; var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; var ITERATOR = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis = function () { return this; }; module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); var getIterationMethod = function (KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; } return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; var INCORRECT_VALUES_NAME = false; var IterablePrototype = Iterable.prototype; var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; var CurrentIteratorPrototype, methods, KEY; // fix native if (anyNativeIterator) { CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { if (setPrototypeOf) { setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis); } } // Set @@toStringTag to native iterators setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; } } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) { if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) { createNonEnumerableProperty(IterablePrototype, 'name', VALUES); } else { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return call(nativeIterator, this); }; } } // export additional methods if (DEFAULT) { methods = { values: getIterationMethod(VALUES), keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), entries: getIterationMethod(ENTRIES) }; if (FORCED) for (KEY in methods) { if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { defineBuiltIn(IterablePrototype, KEY, methods[KEY]); } } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } // define iterator if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); } Iterators[NAME] = defaultIterator; return methods; }; /***/ }), /***/ 2013: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var isCallable = __webpack_require__(9985); var isObject = __webpack_require__(8999); var create = __webpack_require__(5391); var getPrototypeOf = __webpack_require__(1868); var defineBuiltIn = __webpack_require__(1880); var wellKnownSymbol = __webpack_require__(4201); var IS_PURE = __webpack_require__(3931); var ITERATOR = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; else { PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype[ITERATOR].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if (!isCallable(IteratorPrototype[ITERATOR])) { defineBuiltIn(IteratorPrototype, ITERATOR, function () { return this; }); } module.exports = { IteratorPrototype: IteratorPrototype, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; /***/ }), /***/ 9478: /***/ ((module) => { "use strict"; module.exports = {}; /***/ }), /***/ 6310: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toLength = __webpack_require__(3126); // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike module.exports = function (obj) { return toLength(obj.length); }; /***/ }), /***/ 8702: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var fails = __webpack_require__(3689); var isCallable = __webpack_require__(9985); var hasOwn = __webpack_require__(6812); var DESCRIPTORS = __webpack_require__(7697); var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(1236).CONFIGURABLE); var inspectSource = __webpack_require__(6738); var InternalStateModule = __webpack_require__(618); var enforceInternalState = InternalStateModule.enforce; var getInternalState = InternalStateModule.get; var $String = String; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; var stringSlice = uncurryThis(''.slice); var replace = uncurryThis(''.replace); var join = uncurryThis([].join); var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () { return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; }); var TEMPLATE = String(String).split('String'); var makeBuiltIn = module.exports = function (value, name, options) { if (stringSlice($String(name), 0, 7) === 'Symbol(') { name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; } if (options && options.getter) name = 'get ' + name; if (options && options.setter) name = 'set ' + name; if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true }); else value.name = name; } if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) { defineProperty(value, 'length', { value: options.arity }); } try { if (options && hasOwn(options, 'constructor') && options.constructor) { if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false }); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable } else if (value.prototype) value.prototype = undefined; } catch (error) { /* empty */ } var state = enforceInternalState(value); if (!hasOwn(state, 'source')) { state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); } return value; }; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative // eslint-disable-next-line no-extend-native -- required Function.prototype.toString = makeBuiltIn(function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }, 'toString'); /***/ }), /***/ 8828: /***/ ((module) => { "use strict"; var ceil = Math.ceil; var floor = Math.floor; // `Math.trunc` method // https://tc39.es/ecma262/#sec-math.trunc // eslint-disable-next-line es/no-math-trunc -- safe module.exports = Math.trunc || function trunc(x) { var n = +x; return (n > 0 ? floor : ceil)(n); }; /***/ }), /***/ 231: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var safeGetBuiltIn = __webpack_require__(517); var bind = __webpack_require__(4071); var macrotask = (__webpack_require__(9886).set); var Queue = __webpack_require__(4410); var IS_IOS = __webpack_require__(4764); var IS_IOS_PEBBLE = __webpack_require__(3221); var IS_WEBOS_WEBKIT = __webpack_require__(7486); var IS_NODE = __webpack_require__(806); var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; var document = global.document; var process = global.process; var Promise = global.Promise; var microtask = safeGetBuiltIn('queueMicrotask'); var notify, toggle, node, promise, then; // modern engines have queueMicrotask method if (!microtask) { var queue = new Queue(); var flush = function () { var parent, fn; if (IS_NODE && (parent = process.domain)) parent.exit(); while (fn = queue.get()) try { fn(); } catch (error) { if (queue.head) notify(); throw error; } if (parent) parent.enter(); }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { toggle = true; node = document.createTextNode(''); new MutationObserver(flush).observe(node, { characterData: true }); notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 promise = Promise.resolve(undefined); // workaround of WebKit ~ iOS Safari 10.1 bug promise.constructor = Promise; then = bind(promise.then, promise); notify = function () { then(flush); }; // Node.js without promises } else if (IS_NODE) { notify = function () { process.nextTick(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessage // - onreadystatechange // - setTimeout } else { // `webpack` dev server bug on IE global methods - use bind(fn, global) macrotask = bind(macrotask, global); notify = function () { macrotask(flush); }; } microtask = function (fn) { if (!queue.head) notify(); queue.add(fn); }; } module.exports = microtask; /***/ }), /***/ 8742: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var aCallable = __webpack_require__(509); var $TypeError = TypeError; var PromiseCapability = function (C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aCallable(resolve); this.reject = aCallable(reject); }; // `NewPromiseCapability` abstract operation // https://tc39.es/ecma262/#sec-newpromisecapability module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /***/ 2124: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isRegExp = __webpack_require__(1245); var $TypeError = TypeError; module.exports = function (it) { if (isRegExp(it)) { throw new $TypeError("The method doesn't accept regular expressions"); } return it; }; /***/ }), /***/ 4818: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var fails = __webpack_require__(3689); var uncurryThis = __webpack_require__(8844); var toString = __webpack_require__(4327); var trim = (__webpack_require__(1435).trim); var whitespaces = __webpack_require__(6350); var charAt = uncurryThis(''.charAt); var $parseFloat = global.parseFloat; var Symbol = global.Symbol; var ITERATOR = Symbol && Symbol.iterator; var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity // MS Edge 18- broken with boxed symbols || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); })); // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string module.exports = FORCED ? function parseFloat(string) { var trimmedString = trim(toString(string)); var result = $parseFloat(trimmedString); return result === 0 && charAt(trimmedString, 0) === '-' ? -0 : result; } : $parseFloat; /***/ }), /***/ 5391: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* global ActiveXObject -- old IE, WSH */ var anObject = __webpack_require__(5027); var definePropertiesModule = __webpack_require__(8920); var enumBugKeys = __webpack_require__(2739); var hiddenKeys = __webpack_require__(7248); var html = __webpack_require__(2688); var documentCreateElement = __webpack_require__(6420); var sharedKey = __webpack_require__(2713); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function (activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; activeXDocument = null; // avoid memory leak return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { // Thrash, waste and sodomy: IE GC bug var iframe = documentCreateElement('iframe'); var JS = 'java' + SCRIPT + ':'; var iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475 iframe.src = String(JS); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(scriptTag('document.F=Object')); iframeDocument.close(); return iframeDocument.F; }; // Check for document.domain and active x support // No need to use active x approach when document.domain is not set // see https://github.com/es-shims/es5-shim/issues/150 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 // avoid IE GC bug var activeXDocument; var NullProtoObject = function () { try { activeXDocument = new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH var length = enumBugKeys.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; return NullProtoObject(); }; hiddenKeys[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create // eslint-disable-next-line es/no-object-create -- safe module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : definePropertiesModule.f(result, Properties); }; /***/ }), /***/ 8920: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(5648); var definePropertyModule = __webpack_require__(2560); var anObject = __webpack_require__(5027); var toIndexedObject = __webpack_require__(5290); var objectKeys = __webpack_require__(300); // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); return O; }; /***/ }), /***/ 2560: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var IE8_DOM_DEFINE = __webpack_require__(8506); var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(5648); var anObject = __webpack_require__(5027); var toPropertyKey = __webpack_require__(8360); var $TypeError = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ 2474: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var call = __webpack_require__(2615); var propertyIsEnumerableModule = __webpack_require__(9556); var createPropertyDescriptor = __webpack_require__(5684); var toIndexedObject = __webpack_require__(5290); var toPropertyKey = __webpack_require__(8360); var hasOwn = __webpack_require__(6812); var IE8_DOM_DEFINE = __webpack_require__(8506); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; /***/ }), /***/ 6062: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable es/no-object-getownpropertynames -- safe */ var classof = __webpack_require__(6648); var toIndexedObject = __webpack_require__(5290); var $getOwnPropertyNames = (__webpack_require__(2741).f); var arraySlice = __webpack_require__(6004); var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return $getOwnPropertyNames(it); } catch (error) { return arraySlice(windowNames); } }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window module.exports.f = function getOwnPropertyNames(it) { return windowNames && classof(it) === 'Window' ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it)); }; /***/ }), /***/ 2741: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var internalObjectKeys = __webpack_require__(4948); var enumBugKeys = __webpack_require__(2739); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; /***/ }), /***/ 7518: /***/ ((__unused_webpack_module, exports) => { "use strict"; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ 1868: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var hasOwn = __webpack_require__(6812); var isCallable = __webpack_require__(9985); var toObject = __webpack_require__(690); var sharedKey = __webpack_require__(2713); var CORRECT_PROTOTYPE_GETTER = __webpack_require__(1748); var IE_PROTO = sharedKey('IE_PROTO'); var $Object = Object; var ObjectPrototype = $Object.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof // eslint-disable-next-line es/no-object-getprototypeof -- safe module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { var object = toObject(O); if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; if (isCallable(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof $Object ? ObjectPrototype : null; }; /***/ }), /***/ 1129: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var isObject = __webpack_require__(8999); var classof = __webpack_require__(6648); var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(1655); // eslint-disable-next-line es/no-object-isextensible -- safe var $isExtensible = Object.isExtensible; var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); }); // `Object.isExtensible` method // https://tc39.es/ecma262/#sec-object.isextensible module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) { if (!isObject(it)) return false; if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false; return $isExtensible ? $isExtensible(it) : true; } : $isExtensible; /***/ }), /***/ 3622: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); module.exports = uncurryThis({}.isPrototypeOf); /***/ }), /***/ 4948: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var hasOwn = __webpack_require__(6812); var toIndexedObject = __webpack_require__(5290); var indexOf = (__webpack_require__(4328).indexOf); var hiddenKeys = __webpack_require__(7248); var push = uncurryThis([].push); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn(O, key = names[i++])) { ~indexOf(result, key) || push(result, key); } return result; }; /***/ }), /***/ 300: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var internalObjectKeys = __webpack_require__(4948); var enumBugKeys = __webpack_require__(2739); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; /***/ }), /***/ 9556: /***/ ((__unused_webpack_module, exports) => { "use strict"; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; /***/ }), /***/ 9385: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable no-proto -- safe */ var uncurryThisAccessor = __webpack_require__(2743); var isObject = __webpack_require__(8999); var requireObjectCoercible = __webpack_require__(4684); var aPossiblePrototype = __webpack_require__(3550); // `Object.setPrototypeOf` method // https://tc39.es/ecma262/#sec-object.setprototypeof // Works with __proto__ only. Old v8 can't work with null proto objects. // eslint-disable-next-line es/no-object-setprototypeof -- safe module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { var CORRECT_SETTER = false; var test = {}; var setter; try { setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); setter(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { requireObjectCoercible(O); aPossiblePrototype(proto); if (!isObject(O)) return O; if (CORRECT_SETTER) setter(O, proto); else O.__proto__ = proto; return O; }; }() : undefined); /***/ }), /***/ 9419: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var fails = __webpack_require__(3689); var uncurryThis = __webpack_require__(8844); var objectGetPrototypeOf = __webpack_require__(1868); var objectKeys = __webpack_require__(300); var toIndexedObject = __webpack_require__(5290); var $propertyIsEnumerable = (__webpack_require__(9556).f); var propertyIsEnumerable = uncurryThis($propertyIsEnumerable); var push = uncurryThis([].push); // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys // of `null` prototype objects var IE_BUG = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-create -- safe var O = Object.create(null); O[2] = 2; return !propertyIsEnumerable(O, 2); }); // `Object.{ entries, values }` methods implementation var createMethod = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null; var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) { push(result, TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; module.exports = { // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries entries: createMethod(true), // `Object.values` method // https://tc39.es/ecma262/#sec-object.values values: createMethod(false) }; /***/ }), /***/ 5073: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__(3043); var classof = __webpack_require__(926); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; /***/ }), /***/ 5899: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var isCallable = __webpack_require__(9985); var isObject = __webpack_require__(8999); var $TypeError = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive module.exports = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw new $TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ 9152: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getBuiltIn = __webpack_require__(6058); var uncurryThis = __webpack_require__(8844); var getOwnPropertyNamesModule = __webpack_require__(2741); var getOwnPropertySymbolsModule = __webpack_require__(7518); var anObject = __webpack_require__(5027); var concat = uncurryThis([].concat); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; }; /***/ }), /***/ 496: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); module.exports = global; /***/ }), /***/ 9302: /***/ ((module) => { "use strict"; module.exports = function (exec) { try { return { error: false, value: exec() }; } catch (error) { return { error: true, value: error }; } }; /***/ }), /***/ 7073: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var NativePromiseConstructor = __webpack_require__(7919); var isCallable = __webpack_require__(9985); var isForced = __webpack_require__(5266); var inspectSource = __webpack_require__(6738); var wellKnownSymbol = __webpack_require__(4201); var IS_BROWSER = __webpack_require__(2532); var IS_DENO = __webpack_require__(8563); var IS_PURE = __webpack_require__(3931); var V8_VERSION = __webpack_require__(3615); var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; var SPECIES = wellKnownSymbol('species'); var SUBCLASSING = false; var NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent); var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () { var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor); var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor); // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // We can't detect it synchronously, so just check versions if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true; // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation // https://github.com/zloirock/core-js/issues/679 if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) { // Detect correctness of subclassing with @@species support var promise = new NativePromiseConstructor(function (resolve) { resolve(1); }); var FakePromise = function (exec) { exec(function () { /* empty */ }, function () { /* empty */ }); }; var constructor = promise.constructor = {}; constructor[SPECIES] = FakePromise; SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; if (!SUBCLASSING) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT; }); module.exports = { CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR, REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT, SUBCLASSING: SUBCLASSING }; /***/ }), /***/ 7919: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); module.exports = global.Promise; /***/ }), /***/ 2945: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var anObject = __webpack_require__(5027); var isObject = __webpack_require__(8999); var newPromiseCapability = __webpack_require__(8742); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; /***/ }), /***/ 562: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NativePromiseConstructor = __webpack_require__(7919); var checkCorrectnessOfIteration = __webpack_require__(6431); var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(7073).CONSTRUCTOR); module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) { NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ }); }); /***/ }), /***/ 4410: /***/ ((module) => { "use strict"; var Queue = function () { this.head = null; this.tail = null; }; Queue.prototype = { add: function (item) { var entry = { item: item, next: null }; var tail = this.tail; if (tail) tail.next = entry; else this.head = entry; this.tail = entry; }, get: function () { var entry = this.head; if (entry) { var next = this.head = entry.next; if (next === null) this.tail = null; return entry.item; } } }; module.exports = Queue; /***/ }), /***/ 6100: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var anObject = __webpack_require__(5027); var isCallable = __webpack_require__(9985); var classof = __webpack_require__(6648); var regexpExec = __webpack_require__(6308); var $TypeError = TypeError; // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (isCallable(exec)) { var result = call(exec, R, S); if (result !== null) anObject(result); return result; } if (classof(R) === 'RegExp') return call(regexpExec, R, S); throw new $TypeError('RegExp#exec called on incompatible receiver'); }; /***/ }), /***/ 6308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var call = __webpack_require__(2615); var uncurryThis = __webpack_require__(8844); var toString = __webpack_require__(4327); var regexpFlags = __webpack_require__(9633); var stickyHelpers = __webpack_require__(7901); var shared = __webpack_require__(3430); var create = __webpack_require__(5391); var getInternalState = (__webpack_require__(618).get); var UNSUPPORTED_DOT_ALL = __webpack_require__(2100); var UNSUPPORTED_NCG = __webpack_require__(6422); var nativeReplace = shared('native-string-replace', String.prototype.replace); var nativeExec = RegExp.prototype.exec; var patchedExec = nativeExec; var charAt = uncurryThis(''.charAt); var indexOf = uncurryThis(''.indexOf); var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; call(nativeExec, re1, 'a'); call(nativeExec, re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; if (PATCH) { patchedExec = function exec(string) { var re = this; var state = getInternalState(re); var str = toString(string); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = call(patchedExec, raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y && re.sticky; var flags = call(regexpFlags, re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = replace(flags, 'y', ''); if (indexOf(flags, 'g') === -1) { flags += 'g'; } strCopy = stringSlice(str, re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) { source = '(?: ' + source + ')'; strCopy = ' ' + strCopy; charsAdded++; } // ^(? + rx + ) is needed, in combination with some str slicing, to // simulate the 'y' flag. reCopy = new RegExp('^(?:' + source + ')', flags); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = call(nativeExec, sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = stringSlice(match.input, charsAdded); match[0] = stringSlice(match[0], charsAdded); match.index = re.lastIndex; re.lastIndex += match[0].length; } else re.lastIndex = 0; } else if (UPDATES_LAST_INDEX_WRONG && match) { re.lastIndex = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/ call(nativeReplace, match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = create(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } module.exports = patchedExec; /***/ }), /***/ 9633: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var anObject = __webpack_require__(5027); // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags module.exports = function () { var that = anObject(this); var result = ''; if (that.hasIndices) result += 'd'; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.unicodeSets) result += 'v'; if (that.sticky) result += 'y'; return result; }; /***/ }), /***/ 7901: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var global = __webpack_require__(9037); // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var $RegExp = global.RegExp; var UNSUPPORTED_Y = fails(function () { var re = $RegExp('a', 'y'); re.lastIndex = 2; return re.exec('abcd') !== null; }); // UC Browser bug // https://github.com/zloirock/core-js/issues/1008 var MISSED_STICKY = UNSUPPORTED_Y || fails(function () { return !$RegExp('a', 'y').sticky; }); var BROKEN_CARET = UNSUPPORTED_Y || fails(function () { // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 var re = $RegExp('^r', 'gy'); re.lastIndex = 2; return re.exec('str') !== null; }); module.exports = { BROKEN_CARET: BROKEN_CARET, MISSED_STICKY: MISSED_STICKY, UNSUPPORTED_Y: UNSUPPORTED_Y }; /***/ }), /***/ 2100: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var global = __webpack_require__(9037); // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var $RegExp = global.RegExp; module.exports = fails(function () { var re = $RegExp('.', 's'); return !(re.dotAll && re.test('\n') && re.flags === 's'); }); /***/ }), /***/ 6422: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var global = __webpack_require__(9037); // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError var $RegExp = global.RegExp; module.exports = fails(function () { var re = $RegExp('(?<a>b)', 'g'); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$<a>c') !== 'bc'; }); /***/ }), /***/ 4684: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isNullOrUndefined = __webpack_require__(981); var $TypeError = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ 517: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var DESCRIPTORS = __webpack_require__(7697); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Avoid NodeJS experimental warning module.exports = function (name) { if (!DESCRIPTORS) return global[name]; var descriptor = getOwnPropertyDescriptor(global, name); return descriptor && descriptor.value; }; /***/ }), /***/ 953: /***/ ((module) => { "use strict"; // `SameValue` abstract operation // https://tc39.es/ecma262/#sec-samevalue // eslint-disable-next-line es/no-object-is -- safe module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare -- NaN check return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y; }; /***/ }), /***/ 4241: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getBuiltIn = __webpack_require__(6058); var defineBuiltInAccessor = __webpack_require__(2148); var wellKnownSymbol = __webpack_require__(4201); var DESCRIPTORS = __webpack_require__(7697); var SPECIES = wellKnownSymbol('species'); module.exports = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { defineBuiltInAccessor(Constructor, SPECIES, { configurable: true, get: function () { return this; } }); } }; /***/ }), /***/ 5997: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var defineProperty = (__webpack_require__(2560).f); var hasOwn = __webpack_require__(6812); var wellKnownSymbol = __webpack_require__(4201); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); module.exports = function (target, TAG, STATIC) { if (target && !STATIC) target = target.prototype; if (target && !hasOwn(target, TO_STRING_TAG)) { defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG }); } }; /***/ }), /***/ 2713: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var shared = __webpack_require__(3430); var uid = __webpack_require__(4630); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; /***/ }), /***/ 4091: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var IS_PURE = __webpack_require__(3931); var globalThis = __webpack_require__(9037); var defineGlobalProperty = __webpack_require__(5014); var SHARED = '__core-js_shared__'; var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {}); (store.versions || (store.versions = [])).push({ version: '3.37.1', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); /***/ }), /***/ 3430: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var store = __webpack_require__(4091); module.exports = function (key, value) { return store[key] || (store[key] = value || {}); }; /***/ }), /***/ 6373: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var anObject = __webpack_require__(5027); var aConstructor = __webpack_require__(2655); var isNullOrUndefined = __webpack_require__(981); var wellKnownSymbol = __webpack_require__(4201); var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor module.exports = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S); }; /***/ }), /***/ 730: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var toIntegerOrInfinity = __webpack_require__(8700); var toString = __webpack_require__(4327); var requireObjectCoercible = __webpack_require__(4684); var charAt = uncurryThis(''.charAt); var charCodeAt = uncurryThis(''.charCodeAt); var stringSlice = uncurryThis(''.slice); var createMethod = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString(requireObjectCoercible($this)); var position = toIntegerOrInfinity(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = charCodeAt(S, position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; module.exports = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; /***/ }), /***/ 1435: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var requireObjectCoercible = __webpack_require__(4684); var toString = __webpack_require__(4327); var whitespaces = __webpack_require__(6350); var replace = uncurryThis(''.replace); var ltrim = RegExp('^[' + whitespaces + ']+'); var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod = function (TYPE) { return function ($this) { var string = toString(requireObjectCoercible($this)); if (TYPE & 1) string = replace(string, ltrim, ''); if (TYPE & 2) string = replace(string, rtrim, '$1'); return string; }; }; module.exports = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimstart start: createMethod(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimend end: createMethod(2), // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim trim: createMethod(3) }; /***/ }), /***/ 146: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__(3615); var fails = __webpack_require__(3689); var global = __webpack_require__(9037); var $String = global.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol('symbol detection'); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, // of course, fail. return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; }); /***/ }), /***/ 3032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var getBuiltIn = __webpack_require__(6058); var wellKnownSymbol = __webpack_require__(4201); var defineBuiltIn = __webpack_require__(1880); module.exports = function () { var Symbol = getBuiltIn('Symbol'); var SymbolPrototype = Symbol && Symbol.prototype; var valueOf = SymbolPrototype && SymbolPrototype.valueOf; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) { // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive // eslint-disable-next-line no-unused-vars -- required for .length defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) { return call(valueOf, this); }, { arity: 1 }); } }; /***/ }), /***/ 6549: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var NATIVE_SYMBOL = __webpack_require__(146); /* eslint-disable es/no-symbol -- safe */ module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor; /***/ }), /***/ 9886: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var apply = __webpack_require__(1735); var bind = __webpack_require__(4071); var isCallable = __webpack_require__(9985); var hasOwn = __webpack_require__(6812); var fails = __webpack_require__(3689); var html = __webpack_require__(2688); var arraySlice = __webpack_require__(6004); var createElement = __webpack_require__(6420); var validateArgumentsLength = __webpack_require__(1500); var IS_IOS = __webpack_require__(4764); var IS_NODE = __webpack_require__(806); var set = global.setImmediate; var clear = global.clearImmediate; var process = global.process; var Dispatch = global.Dispatch; var Function = global.Function; var MessageChannel = global.MessageChannel; var String = global.String; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var $location, defer, channel, port; fails(function () { // Deno throws a ReferenceError on `location` access without `--location` flag $location = global.location; }); var run = function (id) { if (hasOwn(queue, id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var runner = function (id) { return function () { run(id); }; }; var eventListener = function (event) { run(event.data); }; var globalPostMessageDefer = function (id) { // old engines have not location.origin global.postMessage(String(id), $location.protocol + '//' + $location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!set || !clear) { set = function setImmediate(handler) { validateArgumentsLength(arguments.length, 1); var fn = isCallable(handler) ? handler : Function(handler); var args = arraySlice(arguments, 1); queue[++counter] = function () { apply(fn, undefined, args); }; defer(counter); return counter; }; clear = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (IS_NODE) { defer = function (id) { process.nextTick(runner(id)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(runner(id)); }; // Browsers with MessageChannel, includes WebWorkers // except iOS - https://github.com/zloirock/core-js/issues/624 } else if (MessageChannel && !IS_IOS) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = eventListener; defer = bind(port.postMessage, port); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if ( global.addEventListener && isCallable(global.postMessage) && !global.importScripts && $location && $location.protocol !== 'file:' && !fails(globalPostMessageDefer) ) { defer = globalPostMessageDefer; global.addEventListener('message', eventListener, false); // IE8- } else if (ONREADYSTATECHANGE in createElement('script')) { defer = function (id) { html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(runner(id), 0); }; } } module.exports = { set: set, clear: clear }; /***/ }), /***/ 7578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toIntegerOrInfinity = __webpack_require__(8700); var max = Math.max; var min = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). module.exports = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ 5290: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__(4413); var requireObjectCoercible = __webpack_require__(4684); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /***/ 8700: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var trunc = __webpack_require__(8828); // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity module.exports = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; /***/ }), /***/ 3126: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toIntegerOrInfinity = __webpack_require__(8700); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { var len = toIntegerOrInfinity(argument); return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ 690: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var requireObjectCoercible = __webpack_require__(4684); var $Object = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return $Object(requireObjectCoercible(argument)); }; /***/ }), /***/ 8732: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var isObject = __webpack_require__(8999); var isSymbol = __webpack_require__(734); var getMethod = __webpack_require__(4849); var ordinaryToPrimitive = __webpack_require__(5899); var wellKnownSymbol = __webpack_require__(4201); var $TypeError = TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive module.exports = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw new $TypeError("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; /***/ }), /***/ 8360: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toPrimitive = __webpack_require__(8732); var isSymbol = __webpack_require__(734); // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey module.exports = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; /***/ }), /***/ 3043: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ 4327: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var classof = __webpack_require__(926); var $String = String; module.exports = function (argument) { if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); return $String(argument); }; /***/ }), /***/ 3691: /***/ ((module) => { "use strict"; var $String = String; module.exports = function (argument) { try { return $String(argument); } catch (error) { return 'Object'; } }; /***/ }), /***/ 4630: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var uncurryThis = __webpack_require__(8844); var id = 0; var postfix = Math.random(); var toString = uncurryThis(1.0.toString); module.exports = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; /***/ }), /***/ 6837: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var fails = __webpack_require__(3689); var wellKnownSymbol = __webpack_require__(4201); var DESCRIPTORS = __webpack_require__(7697); var IS_PURE = __webpack_require__(3931); var ITERATOR = wellKnownSymbol('iterator'); module.exports = !fails(function () { // eslint-disable-next-line unicorn/relative-url-style -- required for testing var url = new URL('b?a=1&b=2&c=3', 'http://a'); var params = url.searchParams; var params2 = new URLSearchParams('a=1&a=2&b=3'); var result = ''; url.pathname = 'c%20d'; params.forEach(function (value, key) { params['delete']('b'); result += key + value; }); params2['delete']('a', 2); // `undefined` case is a Chromium 117 bug // https://bugs.chromium.org/p/v8/issues/detail?id=14222 params2['delete']('b', undefined); return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b'))) || (!params.size && (IS_PURE || !DESCRIPTORS)) || !params.sort || url.href !== 'http://a/c%20d?a=1&c=3' || params.get('c') !== '3' || String(new URLSearchParams('?a=1')) !== 'a=1' || !params[ITERATOR] // throws in Edge || new URL('https://a@b').username !== 'a' || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' // not punycoded in Edge || new URL('http://тест').host !== 'xn--e1aybc' // not escaped in Chrome 62- || new URL('http://a#б').hash !== '#%D0%B1' // fails in Chrome 66- || result !== 'a1c3' // throws in Safari || new URL('http://x', undefined).host !== 'x'; }); /***/ }), /***/ 9525: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = __webpack_require__(146); module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; /***/ }), /***/ 5648: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var fails = __webpack_require__(3689); // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 module.exports = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype !== 42; }); /***/ }), /***/ 1500: /***/ ((module) => { "use strict"; var $TypeError = TypeError; module.exports = function (passed, required) { if (passed < required) throw new $TypeError('Not enough arguments'); return passed; }; /***/ }), /***/ 9834: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var isCallable = __webpack_require__(9985); var WeakMap = global.WeakMap; module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap)); /***/ }), /***/ 5405: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var path = __webpack_require__(496); var hasOwn = __webpack_require__(6812); var wrappedWellKnownSymbolModule = __webpack_require__(6145); var defineProperty = (__webpack_require__(2560).f); module.exports = function (NAME) { var Symbol = path.Symbol || (path.Symbol = {}); if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, { value: wrappedWellKnownSymbolModule.f(NAME) }); }; /***/ }), /***/ 6145: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var wellKnownSymbol = __webpack_require__(4201); exports.f = wellKnownSymbol; /***/ }), /***/ 4201: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var shared = __webpack_require__(3430); var hasOwn = __webpack_require__(6812); var uid = __webpack_require__(4630); var NATIVE_SYMBOL = __webpack_require__(146); var USE_SYMBOL_AS_UID = __webpack_require__(9525); var Symbol = global.Symbol; var WellKnownSymbolsStore = shared('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!hasOwn(WellKnownSymbolsStore, name)) { WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) ? Symbol[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; /***/ }), /***/ 6350: /***/ ((module) => { "use strict"; // a string of all valid unicode whitespaces module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /***/ 4338: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var fails = __webpack_require__(3689); var isArray = __webpack_require__(2297); var isObject = __webpack_require__(8999); var toObject = __webpack_require__(690); var lengthOfArrayLike = __webpack_require__(6310); var doesNotExceedSafeInteger = __webpack_require__(5565); var createProperty = __webpack_require__(6522); var arraySpeciesCreate = __webpack_require__(7120); var arrayMethodHasSpeciesSupport = __webpack_require__(9042); var wellKnownSymbol = __webpack_require__(4201); var V8_VERSION = __webpack_require__(3615); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat'); // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); doesNotExceedSafeInteger(n + len); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { doesNotExceedSafeInteger(n + 1); createProperty(A, n++, E); } } A.length = n; return A; } }); /***/ }), /***/ 8077: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var $filter = (__webpack_require__(2960).filter); var arrayMethodHasSpeciesSupport = __webpack_require__(9042); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ 9693: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var forEach = __webpack_require__(7612); // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach // eslint-disable-next-line es/no-array-prototype-foreach -- safe $({ target: 'Array', proto: true, forced: [].forEach !== forEach }, { forEach: forEach }); /***/ }), /***/ 7049: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var from = __webpack_require__(1055); var checkCorrectnessOfIteration = __webpack_require__(6431); var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { // eslint-disable-next-line es/no-array-from -- required for testing Array.from(iterable); }); // `Array.from` method // https://tc39.es/ecma262/#sec-array.from $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { from: from }); /***/ }), /***/ 6801: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var $includes = (__webpack_require__(4328).includes); var fails = __webpack_require__(3689); var addToUnscopables = __webpack_require__(7370); // FF99+ bug var BROKEN_ON_SPARSE = fails(function () { // eslint-disable-next-line es/no-array-prototype-includes -- detection return !Array(1).includes(); }); // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); /***/ }), /***/ 7195: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable es/no-array-prototype-indexof -- required for testing */ var $ = __webpack_require__(9989); var uncurryThis = __webpack_require__(6576); var $indexOf = (__webpack_require__(4328).indexOf); var arrayMethodIsStrict = __webpack_require__(6834); var nativeIndexOf = uncurryThis([].indexOf); var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0; var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf'); // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof $({ target: 'Array', proto: true, forced: FORCED }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { var fromIndex = arguments.length > 1 ? arguments[1] : undefined; return NEGATIVE_ZERO // convert -0 to +0 ? nativeIndexOf(this, searchElement, fromIndex) || 0 : $indexOf(this, searchElement, fromIndex); } }); /***/ }), /***/ 3975: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var isArray = __webpack_require__(2297); // `Array.isArray` method // https://tc39.es/ecma262/#sec-array.isarray $({ target: 'Array', stat: true }, { isArray: isArray }); /***/ }), /***/ 752: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toIndexedObject = __webpack_require__(5290); var addToUnscopables = __webpack_require__(7370); var Iterators = __webpack_require__(9478); var InternalStateModule = __webpack_require__(618); var defineProperty = (__webpack_require__(2560).f); var defineIterator = __webpack_require__(1934); var createIterResultObject = __webpack_require__(7807); var IS_PURE = __webpack_require__(3931); var DESCRIPTORS = __webpack_require__(7697); var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.es/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.es/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.es/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.es/ecma262/#sec-createarrayiterator module.exports = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return createIterResultObject(undefined, true); } switch (state.kind) { case 'keys': return createIterResultObject(index, false); case 'values': return createIterResultObject(target[index], false); } return createIterResultObject([index, target[index]], false); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.es/ecma262/#sec-createunmappedargumentsobject // https://tc39.es/ecma262/#sec-createmappedargumentsobject var values = Iterators.Arguments = Iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); // V8 ~ Chrome 45- bug if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try { defineProperty(values, 'name', { value: 'values' }); } catch (error) { /* empty */ } /***/ }), /***/ 886: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var $map = (__webpack_require__(2960).map); var arrayMethodHasSpeciesSupport = __webpack_require__(9042); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ 3374: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var uncurryThis = __webpack_require__(8844); var isArray = __webpack_require__(2297); var nativeReverse = uncurryThis([].reverse); var test = [1, 2]; // `Array.prototype.reverse` method // https://tc39.es/ecma262/#sec-array.prototype.reverse // fix for Safari 12.0 bug // https://bugs.webkit.org/show_bug.cgi?id=188794 $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, { reverse: function reverse() { // eslint-disable-next-line no-self-assign -- dirty hack if (isArray(this)) this.length = this.length; return nativeReverse(this); } }); /***/ }), /***/ 9730: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var isArray = __webpack_require__(2297); var isConstructor = __webpack_require__(9429); var isObject = __webpack_require__(8999); var toAbsoluteIndex = __webpack_require__(7578); var lengthOfArrayLike = __webpack_require__(6310); var toIndexedObject = __webpack_require__(5290); var createProperty = __webpack_require__(6522); var wellKnownSymbol = __webpack_require__(4201); var arrayMethodHasSpeciesSupport = __webpack_require__(9042); var nativeSlice = __webpack_require__(6004); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var $Array = Array; var max = Math.max; // `Array.prototype.slice` method // https://tc39.es/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible var Constructor, result, n; if (isArray(O)) { Constructor = O.constructor; // cross-realm fallback if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === $Array || Constructor === undefined) { return nativeSlice(O, k, fin); } } result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0)); for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); result.length = n; return result; } }); /***/ }), /***/ 24: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove from `core-js@4` var uncurryThis = __webpack_require__(8844); var defineBuiltIn = __webpack_require__(1880); var DatePrototype = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; var nativeDateToString = uncurryThis(DatePrototype[TO_STRING]); var thisTimeValue = uncurryThis(DatePrototype.getTime); // `Date.prototype.toString` method // https://tc39.es/ecma262/#sec-date.prototype.tostring if (String(new Date(NaN)) !== INVALID_DATE) { defineBuiltIn(DatePrototype, TO_STRING, function toString() { var value = thisTimeValue(this); // eslint-disable-next-line no-self-compare -- NaN check return value === value ? nativeDateToString(this) : INVALID_DATE; }); } /***/ }), /***/ 4284: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var DESCRIPTORS = __webpack_require__(7697); var FUNCTION_NAME_EXISTS = (__webpack_require__(1236).EXISTS); var uncurryThis = __webpack_require__(8844); var defineBuiltInAccessor = __webpack_require__(2148); var FunctionPrototype = Function.prototype; var functionToString = uncurryThis(FunctionPrototype.toString); var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/; var regExpExec = uncurryThis(nameRE.exec); var NAME = 'name'; // Function instances `.name` property // https://tc39.es/ecma262/#sec-function-instances-name if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) { defineBuiltInAccessor(FunctionPrototype, NAME, { configurable: true, get: function () { try { return regExpExec(nameRE, functionToString(this))[1]; } catch (error) { return ''; } } }); } /***/ }), /***/ 8324: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var getBuiltIn = __webpack_require__(6058); var apply = __webpack_require__(1735); var call = __webpack_require__(2615); var uncurryThis = __webpack_require__(8844); var fails = __webpack_require__(3689); var isCallable = __webpack_require__(9985); var isSymbol = __webpack_require__(734); var arraySlice = __webpack_require__(6004); var getReplacerFunction = __webpack_require__(2643); var NATIVE_SYMBOL = __webpack_require__(146); var $String = String; var $stringify = getBuiltIn('JSON', 'stringify'); var exec = uncurryThis(/./.exec); var charAt = uncurryThis(''.charAt); var charCodeAt = uncurryThis(''.charCodeAt); var replace = uncurryThis(''.replace); var numberToString = uncurryThis(1.0.toString); var tester = /[\uD800-\uDFFF]/g; var low = /^[\uD800-\uDBFF]$/; var hi = /^[\uDC00-\uDFFF]$/; var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () { var symbol = getBuiltIn('Symbol')('stringify detection'); // MS Edge converts symbol values to JSON as {} return $stringify([symbol]) !== '[null]' // WebKit converts symbol values to JSON as null || $stringify({ a: symbol }) !== '{}' // V8 throws on boxed symbols || $stringify(Object(symbol)) !== '{}'; }); // https://github.com/tc39/proposal-well-formed-stringify var ILL_FORMED_UNICODE = fails(function () { return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"' || $stringify('\uDEAD') !== '"\\udead"'; }); var stringifyWithSymbolsFix = function (it, replacer) { var args = arraySlice(arguments); var $replacer = getReplacerFunction(replacer); if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined args[1] = function (key, value) { // some old implementations (like WebKit) could pass numbers as keys if (isCallable($replacer)) value = call($replacer, this, $String(key), value); if (!isSymbol(value)) return value; }; return apply($stringify, null, args); }; var fixIllFormed = function (match, offset, string) { var prev = charAt(string, offset - 1); var next = charAt(string, offset + 1); if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) { return '\\u' + numberToString(charCodeAt(match, 0), 16); } return match; }; if ($stringify) { // `JSON.stringify` method // https://tc39.es/ecma262/#sec-json.stringify $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, { // eslint-disable-next-line no-unused-vars -- required for `.length` stringify: function stringify(it, replacer, space) { var args = arraySlice(arguments); var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args); return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result; } }); } /***/ }), /***/ 7629: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var setToStringTag = __webpack_require__(5997); // JSON[@@toStringTag] property // https://tc39.es/ecma262/#sec-json-@@tostringtag setToStringTag(global.JSON, 'JSON', true); /***/ }), /***/ 7509: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var setToStringTag = __webpack_require__(5997); // Math[@@toStringTag] property // https://tc39.es/ecma262/#sec-math-@@tostringtag setToStringTag(Math, 'Math', true); /***/ }), /***/ 1013: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove from `core-js@4` var $ = __webpack_require__(9989); var DESCRIPTORS = __webpack_require__(7697); var create = __webpack_require__(5391); // `Object.create` method // https://tc39.es/ecma262/#sec-object.create $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { create: create }); /***/ }), /***/ 739: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var DESCRIPTORS = __webpack_require__(7697); var defineProperty = (__webpack_require__(2560).f); // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty // eslint-disable-next-line es/no-object-defineproperty -- safe $({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, { defineProperty: defineProperty }); /***/ }), /***/ 6585: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var $entries = (__webpack_require__(9419).entries); // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries $({ target: 'Object', stat: true }, { entries: function entries(O) { return $entries(O); } }); /***/ }), /***/ 9434: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var NATIVE_SYMBOL = __webpack_require__(146); var fails = __webpack_require__(3689); var getOwnPropertySymbolsModule = __webpack_require__(7518); var toObject = __webpack_require__(690); // V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); }); // `Object.getOwnPropertySymbols` method // https://tc39.es/ecma262/#sec-object.getownpropertysymbols $({ target: 'Object', stat: true, forced: FORCED }, { getOwnPropertySymbols: function getOwnPropertySymbols(it) { var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : []; } }); /***/ }), /***/ 8052: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var fails = __webpack_require__(3689); var toObject = __webpack_require__(690); var nativeGetPrototypeOf = __webpack_require__(1868); var CORRECT_PROTOTYPE_GETTER = __webpack_require__(1748); var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { getPrototypeOf: function getPrototypeOf(it) { return nativeGetPrototypeOf(toObject(it)); } }); /***/ }), /***/ 9358: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var toObject = __webpack_require__(690); var nativeKeys = __webpack_require__(300); var fails = __webpack_require__(3689); var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { keys: function keys(it) { return nativeKeys(toObject(it)); } }); /***/ }), /***/ 5399: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var setPrototypeOf = __webpack_require__(9385); // `Object.setPrototypeOf` method // https://tc39.es/ecma262/#sec-object.setprototypeof $({ target: 'Object', stat: true }, { setPrototypeOf: setPrototypeOf }); /***/ }), /***/ 228: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__(3043); var defineBuiltIn = __webpack_require__(1880); var toString = __webpack_require__(5073); // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!TO_STRING_TAG_SUPPORT) { defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true }); } /***/ }), /***/ 939: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var $parseFloat = __webpack_require__(4818); // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string $({ global: true, forced: parseFloat !== $parseFloat }, { parseFloat: $parseFloat }); /***/ }), /***/ 1692: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var call = __webpack_require__(2615); var aCallable = __webpack_require__(509); var newPromiseCapabilityModule = __webpack_require__(8742); var perform = __webpack_require__(9302); var iterate = __webpack_require__(8734); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(562); // `Promise.all` method // https://tc39.es/ecma262/#sec-promise.all $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { all: function all(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; remaining++; call($promiseResolve, C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ 5089: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var IS_PURE = __webpack_require__(3931); var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(7073).CONSTRUCTOR); var NativePromiseConstructor = __webpack_require__(7919); var getBuiltIn = __webpack_require__(6058); var isCallable = __webpack_require__(9985); var defineBuiltIn = __webpack_require__(1880); var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; // `Promise.prototype.catch` method // https://tc39.es/ecma262/#sec-promise.prototype.catch $({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, { 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` if (!IS_PURE && isCallable(NativePromiseConstructor)) { var method = getBuiltIn('Promise').prototype['catch']; if (NativePromisePrototype['catch'] !== method) { defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true }); } } /***/ }), /***/ 6697: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var IS_PURE = __webpack_require__(3931); var IS_NODE = __webpack_require__(806); var global = __webpack_require__(9037); var call = __webpack_require__(2615); var defineBuiltIn = __webpack_require__(1880); var setPrototypeOf = __webpack_require__(9385); var setToStringTag = __webpack_require__(5997); var setSpecies = __webpack_require__(4241); var aCallable = __webpack_require__(509); var isCallable = __webpack_require__(9985); var isObject = __webpack_require__(8999); var anInstance = __webpack_require__(767); var speciesConstructor = __webpack_require__(6373); var task = (__webpack_require__(9886).set); var microtask = __webpack_require__(231); var hostReportErrors = __webpack_require__(920); var perform = __webpack_require__(9302); var Queue = __webpack_require__(4410); var InternalStateModule = __webpack_require__(618); var NativePromiseConstructor = __webpack_require__(7919); var PromiseConstructorDetection = __webpack_require__(7073); var newPromiseCapabilityModule = __webpack_require__(8742); var PROMISE = 'Promise'; var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR; var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT; var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING; var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); var setInternalState = InternalStateModule.set; var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; var PromiseConstructor = NativePromiseConstructor; var PromisePrototype = NativePromisePrototype; var TypeError = global.TypeError; var document = global.document; var process = global.process; var newPromiseCapability = newPromiseCapabilityModule.f; var newGenericPromiseCapability = newPromiseCapability; var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; var HANDLED = 1; var UNHANDLED = 2; var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; // helpers var isThenable = function (it) { var then; return isObject(it) && isCallable(then = it.then) ? then : false; }; var callReaction = function (reaction, state) { var value = state.value; var ok = state.state === FULFILLED; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (state.rejection === UNHANDLED) onHandleUnhandled(state); state.rejection = HANDLED; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // can throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(new TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { call(then, result, resolve, reject); } else resolve(result); } else reject(value); } catch (error) { if (domain && !exited) domain.exit(); reject(error); } }; var notify = function (state, isReject) { if (state.notified) return; state.notified = true; microtask(function () { var reactions = state.reactions; var reaction; while (reaction = reactions.get()) { callReaction(reaction, state); } state.notified = false; if (isReject && !state.rejection) onUnhandled(state); }); }; var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { event = document.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); global.dispatchEvent(event); } else event = { promise: promise, reason: reason }; if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event); else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; var onUnhandled = function (state) { call(task, global, function () { var promise = state.facade; var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { if (IS_NODE) { process.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); }; var isUnhandled = function (state) { return state.rejection !== HANDLED && !state.parent; }; var onHandleUnhandled = function (state) { call(task, global, function () { var promise = state.facade; if (IS_NODE) { process.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; var bind = function (fn, state, unwrap) { return function (value) { fn(state, value, unwrap); }; }; var internalReject = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; notify(state, true); }; var internalResolve = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { if (state.facade === value) throw new TypeError("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { call(then, value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state) ); } catch (error) { internalReject(wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; notify(state, false); } } catch (error) { internalReject({ done: false }, error, state); } }; // constructor polyfill if (FORCED_PROMISE_CONSTRUCTOR) { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromisePrototype); aCallable(executor); call(Internal, this); var state = getInternalPromiseState(this); try { executor(bind(internalResolve, state), bind(internalReject, state)); } catch (error) { internalReject(state, error); } }; PromisePrototype = PromiseConstructor.prototype; // eslint-disable-next-line no-unused-vars -- required for `.length` Internal = function Promise(executor) { setInternalState(this, { type: PROMISE, done: false, notified: false, parent: false, reactions: new Queue(), rejection: false, state: PENDING, value: undefined }); }; // `Promise.prototype.then` method // https://tc39.es/ecma262/#sec-promise.prototype.then Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) { var state = getInternalPromiseState(this); var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); state.parent = true; reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; reaction.fail = isCallable(onRejected) && onRejected; reaction.domain = IS_NODE ? process.domain : undefined; if (state.state === PENDING) state.reactions.add(reaction); else microtask(function () { callReaction(reaction, state); }); return reaction.promise; }); OwnPromiseCapability = function () { var promise = new Internal(); var state = getInternalPromiseState(promise); this.promise = promise; this.resolve = bind(internalResolve, state); this.reject = bind(internalReject, state); }; newPromiseCapabilityModule.f = newPromiseCapability = function (C) { return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) { nativeThen = NativePromisePrototype.then; if (!NATIVE_PROMISE_SUBCLASSING) { // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { var that = this; return new PromiseConstructor(function (resolve, reject) { call(nativeThen, that, resolve, reject); }).then(onFulfilled, onRejected); // https://github.com/zloirock/core-js/issues/640 }, { unsafe: true }); } // make `.constructor === Promise` work for native promise-based APIs try { delete NativePromisePrototype.constructor; } catch (error) { /* empty */ } // make `instanceof Promise` work for native promise-based APIs if (setPrototypeOf) { setPrototypeOf(NativePromisePrototype, PromisePrototype); } } } $({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, { Promise: PromiseConstructor }); setToStringTag(PromiseConstructor, PROMISE, false, true); setSpecies(PROMISE); /***/ }), /***/ 3964: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove this module from `core-js@4` since it's split to modules listed below __webpack_require__(6697); __webpack_require__(1692); __webpack_require__(5089); __webpack_require__(8829); __webpack_require__(2092); __webpack_require__(7905); /***/ }), /***/ 8829: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var call = __webpack_require__(2615); var aCallable = __webpack_require__(509); var newPromiseCapabilityModule = __webpack_require__(8742); var perform = __webpack_require__(9302); var iterate = __webpack_require__(8734); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(562); // `Promise.race` method // https://tc39.es/ecma262/#sec-promise.race $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { race: function race(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); iterate(iterable, function (promise) { call($promiseResolve, C, promise).then(capability.resolve, reject); }); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ 2092: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var newPromiseCapabilityModule = __webpack_require__(8742); var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(7073).CONSTRUCTOR); // `Promise.reject` method // https://tc39.es/ecma262/#sec-promise.reject $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, { reject: function reject(r) { var capability = newPromiseCapabilityModule.f(this); var capabilityReject = capability.reject; capabilityReject(r); return capability.promise; } }); /***/ }), /***/ 7905: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var getBuiltIn = __webpack_require__(6058); var IS_PURE = __webpack_require__(3931); var NativePromiseConstructor = __webpack_require__(7919); var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(7073).CONSTRUCTOR); var promiseResolve = __webpack_require__(2945); var PromiseConstructorWrapper = getBuiltIn('Promise'); var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR; // `Promise.resolve` method // https://tc39.es/ecma262/#sec-promise.resolve $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, { resolve: function resolve(x) { return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x); } }); /***/ }), /***/ 4043: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var exec = __webpack_require__(6308); // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { exec: exec }); /***/ }), /***/ 7985: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var collection = __webpack_require__(319); var collectionStrong = __webpack_require__(800); // `Set` constructor // https://tc39.es/ecma262/#sec-set-objects collection('Set', function (init) { return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); /***/ }), /***/ 9649: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__(7985); /***/ }), /***/ 3843: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var uncurryThis = __webpack_require__(8844); var notARegExp = __webpack_require__(2124); var requireObjectCoercible = __webpack_require__(4684); var toString = __webpack_require__(4327); var correctIsRegExpLogic = __webpack_require__(7413); var stringIndexOf = uncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf( toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); /***/ }), /***/ 1694: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var charAt = (__webpack_require__(730).charAt); var toString = __webpack_require__(4327); var InternalStateModule = __webpack_require__(618); var defineIterator = __webpack_require__(1934); var createIterResultObject = __webpack_require__(7807); var STRING_ITERATOR = 'String Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-string.prototype-@@iterator defineIterator(String, 'String', function (iterated) { setInternalState(this, { type: STRING_ITERATOR, string: toString(iterated), index: 0 }); // `%StringIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next }, function next() { var state = getInternalState(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return createIterResultObject(undefined, true); point = charAt(string, index); state.index += point.length; return createIterResultObject(point, false); }); /***/ }), /***/ 7872: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var fixRegExpWellKnownSymbolLogic = __webpack_require__(8678); var anObject = __webpack_require__(5027); var isNullOrUndefined = __webpack_require__(981); var requireObjectCoercible = __webpack_require__(4684); var sameValue = __webpack_require__(953); var toString = __webpack_require__(4327); var getMethod = __webpack_require__(4849); var regExpExec = __webpack_require__(6100); // @@search logic fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) { return [ // `String.prototype.search` method // https://tc39.es/ecma262/#sec-string.prototype.search function search(regexp) { var O = requireObjectCoercible(this); var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH); return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O)); }, // `RegExp.prototype[@@search]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@search function (string) { var rx = anObject(this); var S = toString(string); var res = maybeCallNative(nativeSearch, rx, S); if (res.done) return res.value; var previousLastIndex = rx.lastIndex; if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; var result = regExpExec(rx, S); if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; return result === null ? -1 : result.index; } ]; }); /***/ }), /***/ 9873: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = __webpack_require__(2615); var uncurryThis = __webpack_require__(8844); var fixRegExpWellKnownSymbolLogic = __webpack_require__(8678); var anObject = __webpack_require__(5027); var isNullOrUndefined = __webpack_require__(981); var requireObjectCoercible = __webpack_require__(4684); var speciesConstructor = __webpack_require__(6373); var advanceStringIndex = __webpack_require__(1514); var toLength = __webpack_require__(3126); var toString = __webpack_require__(4327); var getMethod = __webpack_require__(4849); var regExpExec = __webpack_require__(6100); var stickyHelpers = __webpack_require__(7901); var fails = __webpack_require__(3689); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; var MAX_UINT32 = 0xFFFFFFFF; var min = Math.min; var push = uncurryThis([].push); var stringSlice = uncurryThis(''.slice); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length !== 4 || 'ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length; // @@split logic fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) { return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit); } : nativeSplit; return [ // `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT); return splitter ? call(splitter, separator, O, limit) : call(internalSplit, toString(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var rx = anObject(this); var S = toString(string); if (!BUGGY) { var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); if (res.done) return res.value; } var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S); var e; if ( z === null || (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { push(A, stringSlice(S, p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { push(A, z[i]); if (A.length === lim) return A; } q = p = e; } } push(A, stringSlice(S, p)); return A; } ]; }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); /***/ }), /***/ 8373: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var defineWellKnownSymbol = __webpack_require__(5405); // `Symbol.asyncIterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.asynciterator defineWellKnownSymbol('asyncIterator'); /***/ }), /***/ 7855: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var global = __webpack_require__(9037); var call = __webpack_require__(2615); var uncurryThis = __webpack_require__(8844); var IS_PURE = __webpack_require__(3931); var DESCRIPTORS = __webpack_require__(7697); var NATIVE_SYMBOL = __webpack_require__(146); var fails = __webpack_require__(3689); var hasOwn = __webpack_require__(6812); var isPrototypeOf = __webpack_require__(3622); var anObject = __webpack_require__(5027); var toIndexedObject = __webpack_require__(5290); var toPropertyKey = __webpack_require__(8360); var $toString = __webpack_require__(4327); var createPropertyDescriptor = __webpack_require__(5684); var nativeObjectCreate = __webpack_require__(5391); var objectKeys = __webpack_require__(300); var getOwnPropertyNamesModule = __webpack_require__(2741); var getOwnPropertyNamesExternal = __webpack_require__(6062); var getOwnPropertySymbolsModule = __webpack_require__(7518); var getOwnPropertyDescriptorModule = __webpack_require__(2474); var definePropertyModule = __webpack_require__(2560); var definePropertiesModule = __webpack_require__(8920); var propertyIsEnumerableModule = __webpack_require__(9556); var defineBuiltIn = __webpack_require__(1880); var defineBuiltInAccessor = __webpack_require__(2148); var shared = __webpack_require__(3430); var sharedKey = __webpack_require__(2713); var hiddenKeys = __webpack_require__(7248); var uid = __webpack_require__(4630); var wellKnownSymbol = __webpack_require__(4201); var wrappedWellKnownSymbolModule = __webpack_require__(6145); var defineWellKnownSymbol = __webpack_require__(5405); var defineSymbolToPrimitive = __webpack_require__(3032); var setToStringTag = __webpack_require__(5997); var InternalStateModule = __webpack_require__(618); var $forEach = (__webpack_require__(2960).forEach); var HIDDEN = sharedKey('hidden'); var SYMBOL = 'Symbol'; var PROTOTYPE = 'prototype'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(SYMBOL); var ObjectPrototype = Object[PROTOTYPE]; var $Symbol = global.Symbol; var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE]; var RangeError = global.RangeError; var TypeError = global.TypeError; var QObject = global.QObject; var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; var push = uncurryThis([].push); var AllSymbols = shared('symbols'); var ObjectPrototypeSymbols = shared('op-symbols'); var WellKnownSymbolsStore = shared('wks'); // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var fallbackDefineProperty = function (O, P, Attributes) { var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; nativeDefineProperty(O, P, Attributes); if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); } }; var setSymbolDescriptor = DESCRIPTORS && fails(function () { return nativeObjectCreate(nativeDefineProperty({}, 'a', { get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } })).a !== 7; }) ? fallbackDefineProperty : nativeDefineProperty; var wrap = function (tag, description) { var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype); setInternalState(symbol, { type: SYMBOL, tag: tag, description: description }); if (!DESCRIPTORS) symbol.description = description; return symbol; }; var $defineProperty = function defineProperty(O, P, Attributes) { if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); anObject(O); var key = toPropertyKey(P); anObject(Attributes); if (hasOwn(AllSymbols, key)) { if (!Attributes.enumerable) { if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null))); O[HIDDEN][key] = true; } else { if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); } return setSymbolDescriptor(O, key, Attributes); } return nativeDefineProperty(O, key, Attributes); }; var $defineProperties = function defineProperties(O, Properties) { anObject(O); var properties = toIndexedObject(Properties); var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); $forEach(keys, function (key) { if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]); }); return O; }; var $create = function create(O, Properties) { return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); }; var $propertyIsEnumerable = function propertyIsEnumerable(V) { var P = toPropertyKey(V); var enumerable = call(nativePropertyIsEnumerable, this, P); if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false; return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { var it = toIndexedObject(O); var key = toPropertyKey(P); if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return; var descriptor = nativeGetOwnPropertyDescriptor(it, key); if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) { descriptor.enumerable = true; } return descriptor; }; var $getOwnPropertyNames = function getOwnPropertyNames(O) { var names = nativeGetOwnPropertyNames(toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key); }); return result; }; var $getOwnPropertySymbols = function (O) { var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) { push(result, AllSymbols[key]); } }); return result; }; // `Symbol` constructor // https://tc39.es/ecma262/#sec-symbol-constructor if (!NATIVE_SYMBOL) { $Symbol = function Symbol() { if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor'); var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); var tag = uid(description); var setter = function (value) { var $this = this === undefined ? global : this; if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value); if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false; var descriptor = createPropertyDescriptor(1, value); try { setSymbolDescriptor($this, tag, descriptor); } catch (error) { if (!(error instanceof RangeError)) throw error; fallbackDefineProperty($this, tag, descriptor); } }; if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); return wrap(tag, description); }; SymbolPrototype = $Symbol[PROTOTYPE]; defineBuiltIn(SymbolPrototype, 'toString', function toString() { return getInternalState(this).tag; }); defineBuiltIn($Symbol, 'withoutSetter', function (description) { return wrap(uid(description), description); }); propertyIsEnumerableModule.f = $propertyIsEnumerable; definePropertyModule.f = $defineProperty; definePropertiesModule.f = $defineProperties; getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; wrappedWellKnownSymbolModule.f = function (name) { return wrap(wellKnownSymbol(name), name); }; if (DESCRIPTORS) { // https://github.com/tc39/proposal-Symbol-description defineBuiltInAccessor(SymbolPrototype, 'description', { configurable: true, get: function description() { return getInternalState(this).description; } }); if (!IS_PURE) { defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); } } } $({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { Symbol: $Symbol }); $forEach(objectKeys(WellKnownSymbolsStore), function (name) { defineWellKnownSymbol(name); }); $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { useSetter: function () { USE_SETTER = true; }, useSimple: function () { USE_SETTER = false; } }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { // `Object.create` method // https://tc39.es/ecma262/#sec-object.create create: $create, // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty defineProperty: $defineProperty, // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties defineProperties: $defineProperties, // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors getOwnPropertyDescriptor: $getOwnPropertyDescriptor }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames getOwnPropertyNames: $getOwnPropertyNames }); // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive defineSymbolToPrimitive(); // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag($Symbol, SYMBOL); hiddenKeys[HIDDEN] = true; /***/ }), /***/ 6544: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // `Symbol.prototype.description` getter // https://tc39.es/ecma262/#sec-symbol.prototype.description var $ = __webpack_require__(9989); var DESCRIPTORS = __webpack_require__(7697); var global = __webpack_require__(9037); var uncurryThis = __webpack_require__(8844); var hasOwn = __webpack_require__(6812); var isCallable = __webpack_require__(9985); var isPrototypeOf = __webpack_require__(3622); var toString = __webpack_require__(4327); var defineBuiltInAccessor = __webpack_require__(2148); var copyConstructorProperties = __webpack_require__(8758); var NativeSymbol = global.Symbol; var SymbolPrototype = NativeSymbol && NativeSymbol.prototype; if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) || // Safari 12 bug NativeSymbol().description !== undefined )) { var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description var SymbolWrapper = function Symbol() { var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]); var result = isPrototypeOf(SymbolPrototype, this) ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' : description === undefined ? NativeSymbol() : NativeSymbol(description); if (description === '') EmptyStringDescriptionStore[result] = true; return result; }; copyConstructorProperties(SymbolWrapper, NativeSymbol); SymbolWrapper.prototype = SymbolPrototype; SymbolPrototype.constructor = SymbolWrapper; var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)'; var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf); var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString); var regexp = /^Symbol\((.*)\)[^)]+$/; var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); defineBuiltInAccessor(SymbolPrototype, 'description', { configurable: true, get: function description() { var symbol = thisSymbolValue(this); if (hasOwn(EmptyStringDescriptionStore, symbol)) return ''; var string = symbolDescriptiveString(symbol); var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1'); return desc === '' ? undefined : desc; } }); $({ global: true, constructor: true, forced: true }, { Symbol: SymbolWrapper }); } /***/ }), /***/ 8074: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var getBuiltIn = __webpack_require__(6058); var hasOwn = __webpack_require__(6812); var toString = __webpack_require__(4327); var shared = __webpack_require__(3430); var NATIVE_SYMBOL_REGISTRY = __webpack_require__(6549); var StringToSymbolRegistry = shared('string-to-symbol-registry'); var SymbolToStringRegistry = shared('symbol-to-string-registry'); // `Symbol.for` method // https://tc39.es/ecma262/#sec-symbol.for $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, { 'for': function (key) { var string = toString(key); if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; var symbol = getBuiltIn('Symbol')(string); StringToSymbolRegistry[string] = symbol; SymbolToStringRegistry[symbol] = string; return symbol; } }); /***/ }), /***/ 4254: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var defineWellKnownSymbol = __webpack_require__(5405); // `Symbol.iterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.iterator defineWellKnownSymbol('iterator'); /***/ }), /***/ 9749: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove this module from `core-js@4` since it's split to modules listed below __webpack_require__(7855); __webpack_require__(8074); __webpack_require__(1445); __webpack_require__(8324); __webpack_require__(9434); /***/ }), /***/ 1445: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $ = __webpack_require__(9989); var hasOwn = __webpack_require__(6812); var isSymbol = __webpack_require__(734); var tryToString = __webpack_require__(3691); var shared = __webpack_require__(3430); var NATIVE_SYMBOL_REGISTRY = __webpack_require__(6549); var SymbolToStringRegistry = shared('symbol-to-string-registry'); // `Symbol.keyFor` method // https://tc39.es/ecma262/#sec-symbol.keyfor $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, { keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol'); if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; } }); /***/ }), /***/ 6793: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getBuiltIn = __webpack_require__(6058); var defineWellKnownSymbol = __webpack_require__(5405); var setToStringTag = __webpack_require__(5997); // `Symbol.toStringTag` well-known symbol // https://tc39.es/ecma262/#sec-symbol.tostringtag defineWellKnownSymbol('toStringTag'); // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag(getBuiltIn('Symbol'), 'Symbol'); /***/ }), /***/ 7522: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var DOMIterables = __webpack_require__(6338); var DOMTokenListPrototype = __webpack_require__(3265); var forEach = __webpack_require__(7612); var createNonEnumerableProperty = __webpack_require__(5773); var handlePrototype = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); } catch (error) { CollectionPrototype.forEach = forEach; } }; for (var COLLECTION_NAME in DOMIterables) { if (DOMIterables[COLLECTION_NAME]) { handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype); } } handlePrototype(DOMTokenListPrototype); /***/ }), /***/ 6265: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var global = __webpack_require__(9037); var DOMIterables = __webpack_require__(6338); var DOMTokenListPrototype = __webpack_require__(3265); var ArrayIteratorMethods = __webpack_require__(752); var createNonEnumerableProperty = __webpack_require__(5773); var setToStringTag = __webpack_require__(5997); var wellKnownSymbol = __webpack_require__(4201); var ITERATOR = wellKnownSymbol('iterator'); var ArrayValues = ArrayIteratorMethods.values; var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { if (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[ITERATOR] !== ArrayValues) try { createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); } catch (error) { CollectionPrototype[ITERATOR] = ArrayValues; } setToStringTag(CollectionPrototype, COLLECTION_NAME, true); if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); } catch (error) { CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; } } } }; for (var COLLECTION_NAME in DOMIterables) { handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME); } handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); /***/ }), /***/ 2625: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` __webpack_require__(752); var $ = __webpack_require__(9989); var global = __webpack_require__(9037); var safeGetBuiltIn = __webpack_require__(517); var call = __webpack_require__(2615); var uncurryThis = __webpack_require__(8844); var DESCRIPTORS = __webpack_require__(7697); var USE_NATIVE_URL = __webpack_require__(6837); var defineBuiltIn = __webpack_require__(1880); var defineBuiltInAccessor = __webpack_require__(2148); var defineBuiltIns = __webpack_require__(6045); var setToStringTag = __webpack_require__(5997); var createIteratorConstructor = __webpack_require__(974); var InternalStateModule = __webpack_require__(618); var anInstance = __webpack_require__(767); var isCallable = __webpack_require__(9985); var hasOwn = __webpack_require__(6812); var bind = __webpack_require__(4071); var classof = __webpack_require__(926); var anObject = __webpack_require__(5027); var isObject = __webpack_require__(8999); var $toString = __webpack_require__(4327); var create = __webpack_require__(5391); var createPropertyDescriptor = __webpack_require__(5684); var getIterator = __webpack_require__(5185); var getIteratorMethod = __webpack_require__(1664); var createIterResultObject = __webpack_require__(7807); var validateArgumentsLength = __webpack_require__(1500); var wellKnownSymbol = __webpack_require__(4201); var arraySort = __webpack_require__(382); var ITERATOR = wellKnownSymbol('iterator'); var URL_SEARCH_PARAMS = 'URLSearchParams'; var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; var setInternalState = InternalStateModule.set; var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); var nativeFetch = safeGetBuiltIn('fetch'); var NativeRequest = safeGetBuiltIn('Request'); var Headers = safeGetBuiltIn('Headers'); var RequestPrototype = NativeRequest && NativeRequest.prototype; var HeadersPrototype = Headers && Headers.prototype; var RegExp = global.RegExp; var TypeError = global.TypeError; var decodeURIComponent = global.decodeURIComponent; var encodeURIComponent = global.encodeURIComponent; var charAt = uncurryThis(''.charAt); var join = uncurryThis([].join); var push = uncurryThis([].push); var replace = uncurryThis(''.replace); var shift = uncurryThis([].shift); var splice = uncurryThis([].splice); var split = uncurryThis(''.split); var stringSlice = uncurryThis(''.slice); var plus = /\+/g; var sequences = Array(4); var percentSequence = function (bytes) { return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); }; var percentDecode = function (sequence) { try { return decodeURIComponent(sequence); } catch (error) { return sequence; } }; var deserialize = function (it) { var result = replace(it, plus, ' '); var bytes = 4; try { return decodeURIComponent(result); } catch (error) { while (bytes) { result = replace(result, percentSequence(bytes--), percentDecode); } return result; } }; var find = /[!'()~]|%20/g; var replacements = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+' }; var replacer = function (match) { return replacements[match]; }; var serialize = function (it) { return replace(encodeURIComponent(it), find, replacer); }; var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { setInternalState(this, { type: URL_SEARCH_PARAMS_ITERATOR, target: getInternalParamsState(params).entries, index: 0, kind: kind }); }, URL_SEARCH_PARAMS, function next() { var state = getInternalIteratorState(this); var target = state.target; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return createIterResultObject(undefined, true); } var entry = target[index]; switch (state.kind) { case 'keys': return createIterResultObject(entry.key, false); case 'values': return createIterResultObject(entry.value, false); } return createIterResultObject([entry.key, entry.value], false); }, true); var URLSearchParamsState = function (init) { this.entries = []; this.url = null; if (init !== undefined) { if (isObject(init)) this.parseObject(init); else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init)); } }; URLSearchParamsState.prototype = { type: URL_SEARCH_PARAMS, bindURL: function (url) { this.url = url; this.update(); }, parseObject: function (object) { var entries = this.entries; var iteratorMethod = getIteratorMethod(object); var iterator, next, step, entryIterator, entryNext, first, second; if (iteratorMethod) { iterator = getIterator(object, iteratorMethod); next = iterator.next; while (!(step = call(next, iterator)).done) { entryIterator = getIterator(anObject(step.value)); entryNext = entryIterator.next; if ( (first = call(entryNext, entryIterator)).done || (second = call(entryNext, entryIterator)).done || !call(entryNext, entryIterator).done ) throw new TypeError('Expected sequence with length 2'); push(entries, { key: $toString(first.value), value: $toString(second.value) }); } } else for (var key in object) if (hasOwn(object, key)) { push(entries, { key: key, value: $toString(object[key]) }); } }, parseQuery: function (query) { if (query) { var entries = this.entries; var attributes = split(query, '&'); var index = 0; var attribute, entry; while (index < attributes.length) { attribute = attributes[index++]; if (attribute.length) { entry = split(attribute, '='); push(entries, { key: deserialize(shift(entry)), value: deserialize(join(entry, '=')) }); } } } }, serialize: function () { var entries = this.entries; var result = []; var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; push(result, serialize(entry.key) + '=' + serialize(entry.value)); } return join(result, '&'); }, update: function () { this.entries.length = 0; this.parseQuery(this.url.query); }, updateURL: function () { if (this.url) this.url.update(); } }; // `URLSearchParams` constructor // https://url.spec.whatwg.org/#interface-urlsearchparams var URLSearchParamsConstructor = function URLSearchParams(/* init */) { anInstance(this, URLSearchParamsPrototype); var init = arguments.length > 0 ? arguments[0] : undefined; var state = setInternalState(this, new URLSearchParamsState(init)); if (!DESCRIPTORS) this.size = state.entries.length; }; var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; defineBuiltIns(URLSearchParamsPrototype, { // `URLSearchParams.prototype.append` method // https://url.spec.whatwg.org/#dom-urlsearchparams-append append: function append(name, value) { var state = getInternalParamsState(this); validateArgumentsLength(arguments.length, 2); push(state.entries, { key: $toString(name), value: $toString(value) }); if (!DESCRIPTORS) this.length++; state.updateURL(); }, // `URLSearchParams.prototype.delete` method // https://url.spec.whatwg.org/#dom-urlsearchparams-delete 'delete': function (name /* , value */) { var state = getInternalParamsState(this); var length = validateArgumentsLength(arguments.length, 1); var entries = state.entries; var key = $toString(name); var $value = length < 2 ? undefined : arguments[1]; var value = $value === undefined ? $value : $toString($value); var index = 0; while (index < entries.length) { var entry = entries[index]; if (entry.key === key && (value === undefined || entry.value === value)) { splice(entries, index, 1); if (value !== undefined) break; } else index++; } if (!DESCRIPTORS) this.size = entries.length; state.updateURL(); }, // `URLSearchParams.prototype.get` method // https://url.spec.whatwg.org/#dom-urlsearchparams-get get: function get(name) { var entries = getInternalParamsState(this).entries; validateArgumentsLength(arguments.length, 1); var key = $toString(name); var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) return entries[index].value; } return null; }, // `URLSearchParams.prototype.getAll` method // https://url.spec.whatwg.org/#dom-urlsearchparams-getall getAll: function getAll(name) { var entries = getInternalParamsState(this).entries; validateArgumentsLength(arguments.length, 1); var key = $toString(name); var result = []; var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) push(result, entries[index].value); } return result; }, // `URLSearchParams.prototype.has` method // https://url.spec.whatwg.org/#dom-urlsearchparams-has has: function has(name /* , value */) { var entries = getInternalParamsState(this).entries; var length = validateArgumentsLength(arguments.length, 1); var key = $toString(name); var $value = length < 2 ? undefined : arguments[1]; var value = $value === undefined ? $value : $toString($value); var index = 0; while (index < entries.length) { var entry = entries[index++]; if (entry.key === key && (value === undefined || entry.value === value)) return true; } return false; }, // `URLSearchParams.prototype.set` method // https://url.spec.whatwg.org/#dom-urlsearchparams-set set: function set(name, value) { var state = getInternalParamsState(this); validateArgumentsLength(arguments.length, 1); var entries = state.entries; var found = false; var key = $toString(name); var val = $toString(value); var index = 0; var entry; for (; index < entries.length; index++) { entry = entries[index]; if (entry.key === key) { if (found) splice(entries, index--, 1); else { found = true; entry.value = val; } } } if (!found) push(entries, { key: key, value: val }); if (!DESCRIPTORS) this.size = entries.length; state.updateURL(); }, // `URLSearchParams.prototype.sort` method // https://url.spec.whatwg.org/#dom-urlsearchparams-sort sort: function sort() { var state = getInternalParamsState(this); arraySort(state.entries, function (a, b) { return a.key > b.key ? 1 : -1; }); state.updateURL(); }, // `URLSearchParams.prototype.forEach` method forEach: function forEach(callback /* , thisArg */) { var entries = getInternalParamsState(this).entries; var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined); var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; boundFunction(entry.value, entry.key, this); } }, // `URLSearchParams.prototype.keys` method keys: function keys() { return new URLSearchParamsIterator(this, 'keys'); }, // `URLSearchParams.prototype.values` method values: function values() { return new URLSearchParamsIterator(this, 'values'); }, // `URLSearchParams.prototype.entries` method entries: function entries() { return new URLSearchParamsIterator(this, 'entries'); } }, { enumerable: true }); // `URLSearchParams.prototype[@@iterator]` method defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' }); // `URLSearchParams.prototype.toString` method // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() { return getInternalParamsState(this).serialize(); }, { enumerable: true }); // `URLSearchParams.prototype.size` getter // https://github.com/whatwg/url/pull/734 if (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', { get: function size() { return getInternalParamsState(this).entries.length; }, configurable: true, enumerable: true }); setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); $({ global: true, constructor: true, forced: !USE_NATIVE_URL }, { URLSearchParams: URLSearchParamsConstructor }); // Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams` if (!USE_NATIVE_URL && isCallable(Headers)) { var headersHas = uncurryThis(HeadersPrototype.has); var headersSet = uncurryThis(HeadersPrototype.set); var wrapRequestOptions = function (init) { if (isObject(init)) { var body = init.body; var headers; if (classof(body) === URL_SEARCH_PARAMS) { headers = init.headers ? new Headers(init.headers) : new Headers(); if (!headersHas(headers, 'content-type')) { headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); } return create(init, { body: createPropertyDescriptor(0, $toString(body)), headers: createPropertyDescriptor(0, headers) }); } } return init; }; if (isCallable(nativeFetch)) { $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, { fetch: function fetch(input /* , init */) { return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); } }); } if (isCallable(NativeRequest)) { var RequestConstructor = function Request(input /* , init */) { anInstance(this, RequestPrototype); return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); }; RequestPrototype.constructor = RequestConstructor; RequestConstructor.prototype = RequestPrototype; $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, { Request: RequestConstructor }); } } module.exports = { URLSearchParams: URLSearchParamsConstructor, getState: getInternalParamsState }; /***/ }), /***/ 9307: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__(2625); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/nonce */ /******/ (() => { /******/ __webpack_require__.nc = undefined; /******/ })(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __webpack_require__(3607); /******/ /******/ })() ;