From d5f9e7ec148bd353f38d50679803c6b8f49d8ba2 Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Fri, 6 Aug 2021 04:14:03 -0400 Subject: [PATCH] Update bulma tagsinput --- api/tags_autocomplete.php | 11 +- theme/bulma/js/bulma-tagsinput.min.js | 1399 +------------------------ theme/bulma/main.php | 6 - 3 files changed, 10 insertions(+), 1406 deletions(-) diff --git a/api/tags_autocomplete.php b/api/tags_autocomplete.php index d07cb2f..d25097b 100644 --- a/api/tags_autocomplete.php +++ b/api/tags_autocomplete.php @@ -4,6 +4,11 @@ define('IN_PONEPASTE', 1); require_once(__DIR__ . '/../includes/common.php'); require_once(__DIR__ . '/../includes/Tag.class.php'); +/* get rid of unintended wildcards in a parameter to LIKE queries; not a security issue, just unexpected behaviour. */ +function escapeLikeQuery(string $query) : string { + return str_replace(['\\', '_', '%'], ['\\\\', '\\_', '\\%'], $query); +} + header('Content-Type: application/json'); if (empty($_GET['tag'])) { @@ -11,11 +16,11 @@ if (empty($_GET['tag'])) { } $tag_name = Tag::cleanTagName($_GET['tag']); -$tag_name = str_replace('%', '', $tag_name); /* get rid of MySQL LIKE wildcards */ -$results = $conn->query('SELECT name FROM tags WHERE name LIKE ? AND name != ?', [$tag_name . '%', $tag_name]); -$tags = $results->fetchAll(); +$results = $conn->query('SELECT name FROM tags WHERE name LIKE ? AND name != ?', [escapeLikeQuery($tag_name) . '%', $tag_name]); +$tags = $results->fetchAll(PDO::FETCH_ASSOC); array_push($tags, ['name' => $tag_name]); + echo json_encode($tags); diff --git a/theme/bulma/js/bulma-tagsinput.min.js b/theme/bulma/js/bulma-tagsinput.min.js index b511be9..3f6e08c 100644 --- a/theme/bulma/js/bulma-tagsinput.min.js +++ b/theme/bulma/js/bulma-tagsinput.min.js @@ -1,1397 +1,2 @@ -/*! @creativebulma/bulma-tagsinput v1.0.1 | (c) 2020 Gaetan | MIT License | https://github.com/CreativeBulma/bulma-tagsinput */ -!(function webpackUniversalModuleDefinition(t, e) { - "object" == typeof exports && "object" == typeof module - ? (module.exports = e()) - : "function" == typeof define && define.amd - ? define("BulmaTagsInput", [], e) - : "object" == typeof exports - ? (exports.BulmaTagsInput = e()) - : (t.BulmaTagsInput = e()); -})(window, function () { - return (function (t) { - var e = {}; - function __webpack_require__(n) { - if (e[n]) return e[n].exports; - var i = (e[n] = { i: n, l: !1, exports: {} }); - return t[n].call(i.exports, i, i.exports, __webpack_require__), (i.l = !0), i.exports; - } - return ( - (__webpack_require__.m = t), - (__webpack_require__.c = e), - (__webpack_require__.d = function (t, e, n) { - __webpack_require__.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n }); - }), - (__webpack_require__.r = function (t) { - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }); - }), - (__webpack_require__.t = function (t, e) { - if ((1 & e && (t = __webpack_require__(t)), 8 & e)) return t; - if (4 & e && "object" == typeof t && t && t.__esModule) return t; - var n = Object.create(null); - if ((__webpack_require__.r(n), Object.defineProperty(n, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t)) - for (var i in t) - __webpack_require__.d( - n, - i, - function (e) { - return t[e]; - }.bind(null, i) - ); - return n; - }), - (__webpack_require__.n = function (t) { - var e = - t && t.__esModule - ? function getDefault() { - return t.default; - } - : function getModuleExports() { - return t; - }; - return __webpack_require__.d(e, "a", e), e; - }), - (__webpack_require__.o = function (t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - }), - (__webpack_require__.p = ""), - __webpack_require__((__webpack_require__.s = 13)) - ); - })([ - function (t, e) { - t.exports = function _interopRequireDefault(t) { - return t && t.__esModule ? t : { default: t }; - }; - }, - function (t, e) { - t.exports = function _classCallCheck(t, e) { - if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); - }; - }, - function (t, e) { - function _defineProperties(t, e) { - for (var n = 0; n < e.length; n++) { - var i = e[n]; - (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i); - } - } - t.exports = function _createClass(t, e, n) { - return e && _defineProperties(t.prototype, e), n && _defineProperties(t, n), t; - }; - }, - function (t, e) { - t.exports = function _assertThisInitialized(t) { - if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return t; - }; - }, - function (t, e) { - function _getPrototypeOf(e) { - return ( - (t.exports = _getPrototypeOf = Object.setPrototypeOf - ? Object.getPrototypeOf - : function _getPrototypeOf(t) { - return t.__proto__ || Object.getPrototypeOf(t); - }), - _getPrototypeOf(e) - ); - } - t.exports = _getPrototypeOf; - }, - function (t, e, n) { - var i = n(16); - t.exports = 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 } })), e && i(t, e); - }; - }, - function (t, e, n) { - var i = n(7), - o = n(3); - t.exports = function _possibleConstructorReturn(t, e) { - return !e || ("object" !== i(e) && "function" != typeof e) ? o(t) : e; - }; - }, - function (t, e) { - function _typeof(e) { - return ( - "function" == typeof Symbol && "symbol" == typeof Symbol.iterator - ? (t.exports = _typeof = function _typeof(t) { - return typeof t; - }) - : (t.exports = _typeof = function _typeof(t) { - return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; - }), - _typeof(e) - ); - } - t.exports = _typeof; - }, - function (t, e) { - t.exports = function _defineProperty(t, e, n) { - return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t; - }; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.cloneAttributes = e.optionsFromDataset = e.querySelectorAll = e.querySelector = void 0); - var o = i(n(19)), - r = i(n(8)), - s = n(11); - function ownKeys(t, e) { - var n = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - n.push.apply(n, i); - } - return n; - } - function _objectSpread(t) { - for (var e, n = 1; n < arguments.length; n++) - (e = null == arguments[n] ? {} : arguments[n]), - n % 2 - ? ownKeys(Object(e), !0).forEach(function (n) { - (0, r.default)(t, n, e[n]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) - : ownKeys(Object(e)).forEach(function (n) { - Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n)); - }); - return t; - } - e.querySelector = function querySelector(t, e) { - return (0, s.isFunction)(t) - ? t(e) - : (0, s.isNode)(t) - ? t - : (0, s.isString)(t) - ? ((e && (0, s.isNode)(e) && 1 === e.nodeType) || (e = document), e.querySelector(t)) - : Array.isArray(t) || ("undefined" != typeof NodeList && NodeList.prototype.isPrototypeOf(t)) - ? t[0] - : void 0; - }; - e.querySelectorAll = function querySelectorAll(t, e) { - return (0, s.isFunction)(t) - ? t(e) - : (0, s.isNode)(t) - ? [t] - : (0, s.isString)(t) - ? ((e && (0, s.isNode)(e) && 1 === e.nodeType) || (e = document), e.querySelectorAll(t)) - : "undefined" != typeof NodeList && NodeList.prototype.isPrototypeOf(t) - ? t - : []; - }; - e.optionsFromDataset = function optionsFromDataset(t) { - var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; - return (0, s.isNode)(t) && t.dataset - ? Object.keys(t.dataset) - .filter(function (t) { - return Object.keys(e).includes(t); - }) - .reduce(function (e, n) { - return _objectSpread({}, e, (0, r.default)({}, n, t.dataset[n])); - }, {}) - : {}; - }; - e.cloneAttributes = function cloneAttributes(t, e) { - var n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; - null !== n && (n = n.split(" ")), - (0, o.default)(e.attributes).forEach(function (e) { - n.includes(e.nodeName) || t.setAttribute("id" === e.nodeName ? "data-id" : e.nodeName, e.nodeValue); - }); - }; - }, - function (t, e) { - t.exports = function _arrayLikeToArray(t, e) { - (null == e || e > t.length) && (e = t.length); - for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; - return i; - }; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.isSelectorValid = e.BooleanParse = e.isNode = e.isPromise = e.isObject = e.isString = e.isFunction = void 0); - var o = i(n(7)); - e.isFunction = function isFunction(t) { - return "function" == typeof t; - }; - e.isString = function isString(t) { - return "string" == typeof t || (!!t && "object" === (0, o.default)(t) && "[object String]" === Object.prototype.toString.call(t)); - }; - e.isObject = function isObject(t) { - return ("function" == typeof t || ("object" === (0, o.default)(t) && !!t)) && !Array.isArray(t); - }; - e.isPromise = function isPromise(t) { - return !(!t || "function" != typeof t.then); - }; - e.isNode = function isNode(t) { - try { - return Node.prototype.cloneNode.call(t, !1), !0; - } catch (t) { - return !1; - } - }; - e.BooleanParse = function BooleanParse(t) { - return !/^(?:f(?:alse)?|no?|0+)$/i.test(t) && !!t; - }; - e.isSelectorValid = function isSelectorValid(t) { - try { - !(function queryCheck(t) { - document.createDocumentFragment().querySelector(t); - })(t); - } catch (t) { - return !1; - } - return !0; - }; - }, - function (t, e, n) { - "use strict"; - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - e.default = function _default(t) { - return '\n ') - .concat(t.text, "\n ") - .concat(t.removable ? '' : "", "\n "); - }; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - var o = i(n(1)), - r = i(n(2)), - s = i(n(3)), - a = i(n(14)), - l = i(n(5)), - u = i(n(6)), - c = i(n(4)), - h = i(n(17)), - d = n(9), - p = n(11), - f = i(n(25)), - m = i(n(12)), - v = i(n(26)), - _ = i(n(27)); - function _isNativeReflectConstruct() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; - } catch (t) { - return !1; - } - } - var y = (function (t) { - function BulmaTagsInput(t) { - var n, - i = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; - return ( - (0, o.default)(this, BulmaTagsInput), - ((n = e.call(this, t, i, f.default)).options.allowDuplicates = (0, p.BooleanParse)(n.options.allowDuplicates)), - (n.options.caseSensitive = (0, p.BooleanParse)(n.options.caseSensitive)), - (n.options.clearSelectionOnTyping = (0, p.BooleanParse)(n.options.clearSelectionOnTyping)), - (n.options.closeDropdownOnItemSelect = (0, p.BooleanParse)(n.options.closeDropdownOnItemSelect)), - (n.options.freeInput = (0, p.BooleanParse)(n.options.freeInput)), - (n.options.highlightDuplicate = (0, p.BooleanParse)(n.options.highlightDuplicate)), - (n.options.highlightMatchesString = (0, p.BooleanParse)(n.options.highlightMatchesString)), - (n.options.removable = (0, p.BooleanParse)(n.options.removable)), - (n.options.searchOn = n.options.searchOn.toLowerCase()), - (n.options.selectable = (0, p.BooleanParse)(n.options.selectable)), - (n.options.trim = (0, p.BooleanParse)(n.options.trim)), - (n._onDocumentClick = n._onDocumentClick.bind((0, s.default)(n))), - (n._onInputChange = n._onInputChange.bind((0, s.default)(n))), - (n._onInputClick = n._onInputClick.bind((0, s.default)(n))), - (n._onInputFocusOut = n._onInputFocusOut.bind((0, s.default)(n))), - (n._onInputFocusIn = n._onInputFocusIn.bind((0, s.default)(n))), - (n._onInputKeyDown = n._onInputKeyDown.bind((0, s.default)(n))), - (n._onInputKeyPress = n._onInputKeyPress.bind((0, s.default)(n))), - (n._onOriginalInputChange = n._onOriginalInputChange.bind((0, s.default)(n))), - (n._onTagDeleteClick = n._onTagDeleteClick.bind((0, s.default)(n))), - (n._onTagClick = n._onTagClick.bind((0, s.default)(n))), - (n._onDropdownItemClick = n._onDropdownItemClick.bind((0, s.default)(n))), - (n.items = []), - (n._selected = -1), - n._init(), - n - ); - } - (0, l.default)(BulmaTagsInput, t); - var e = (function _createSuper(t) { - return function () { - var e, - n = (0, c.default)(t); - if (_isNativeReflectConstruct()) { - var i = (0, c.default)(this).constructor; - e = Reflect.construct(n, arguments, i); - } else e = n.apply(this, arguments); - return (0, u.default)(this, e); - }; - })(BulmaTagsInput); - return ( - (0, r.default)( - BulmaTagsInput, - [ - { - key: "_init", - value: function _init() { - var t = this; - (this._isSelect = "SELECT" === this.element.tagName), - (this._isMultiple = this._isSelect && this.element.hasAttribute("multiple")), - (this._objectItems = void 0 !== this.options.itemValue || this._isSelect), - (this.options.itemValue = this.options.itemValue ? this.options.itemValue : this._isSelect ? "value" : void 0), - (this.options.itemText = this.options.itemText ? this.options.itemText : this._isSelect ? "text" : void 0), - void 0 === this.options.itemText && (this.options.itemText = this.options.itemValue), - (this.options.freeInput = !this._objectItems && this.options.freeInput), - (this.source = null), - void 0 !== this.options.source && - (!["value", "text"].includes(this.options.searchOn) && (this.options.searchOn = f.default.searchOn), - (0, p.isPromise)(this.options.source) - ? (this.source = this.options.source) - : (0, p.isFunction)(this.options.source) - ? (this.source = function (e) { - return Promise.resolve(t.options.source(e)); - }) - : Array.isArray(this.options.source) && - (this.source = function (e) { - return Promise.resolve( - t.options.source.filter(function (n) { - var i = t._objectItems ? n[t.options.itemValue] : n; - return t.options.caseSensitive ? i.includes(e) : i.toLowerCase().includes(e.toLowerCase()); - }) - ); - })), - (this._manualInputAllowed = !this._isSelect && this.options.freeInput), - (this._filterInputAllowed = this._isSelect || this.source), - this._build(); - }, - }, - { - key: "_build", - value: function _build() { - var t = this, - e = document - .createRange() - .createContextualFragment( - (0, v.default)({ - emptyTitle: void 0 === this.options.noResultsLabel ? "No results found" : this.options.noResultsLabel, - placeholder: this.element.placeholder ? this.element.placeholder : this.options.placeholder, - uuid: this.id, - }) - ); - (this.container = e.firstElementChild), - (this.input = this.container.querySelector("input")), - (this.dropdown = this.container.querySelector("#".concat(this.id, "-list .dropdown-content"))), - (this.dropdownEmptyOption = this.dropdown.querySelector(".empty-title")), - (0, d.cloneAttributes)(this.input, this.element, "data-type multiple name type value"), - this.element.disabled && (this.container.setAttribute("disabled", "disabled"), (this.options.removable = !1), (this.options.selectable = !1)), - (this.input.getAttribute("disabled") || this.input.classList.contains("is-disabled")) && this.container.setAttribute("disabled", "disabled"), - this._manualInputAllowed || this.container.classList.add(this._filterInputAllowed ? "is-filter" : "no-input"), - this._isSelect || void 0 !== this.options.source || (this.dropdown.remove(), (this.dropdown = null), this.input.setAttribute("list", null)), - this._isSelect - ? Array.from(this.element.options).forEach(function (e) { - e.selected && t.add(e.value ? e : { value: e.text, text: e.text }, !0), t._createDropdownItem(e); - }) - : this.element.value.length && this.add(this._objectItems ? JSON.parse(this.element.value) : this.element.value, !0), - this._bindEvents(), - this.element.parentNode.insertBefore(this.container, this.element), - (this.element.style.display = "none"); - }, - }, - { - key: "_bindEvents", - value: function _bindEvents() { - document.addEventListener("click", this._onDocumentClick), - this.element.addEventListener("change", this._onOriginalInputChange), - this.input.addEventListener("input", this._onInputChange), - this.input.addEventListener("click", this._onInputClick), - this.input.addEventListener("keydown", this._onInputKeyDown), - this.input.addEventListener("keypress", this._onInputKeyPress), - this.input.addEventListener("focusout", this._onInputFocusOut), - this.input.addEventListener("focusin", this._onInputFocusIn); - }, - }, - { - key: "_caretAtStart", - value: function _caretAtStart() { - try { - return 0 === this.input.selectionStart && 0 === this.input.selectionEnd; - } catch (t) { - return "" === this.input.value; - } - }, - }, - { - key: "_checkLength", - value: function _checkLength(t) { - var e = this._objectItems ? t[this.options.itemValue] : t; - return !(0, p.isString)(e) || (e.length >= this.options.minChars && (void 0 === this.options.maxChars || e.length <= this.options.maxChars)); - }, - }, - { - key: "_closeDropdown", - value: function _closeDropdown() { - this.dropdown && (this.emit("before.dropdown.close", this), this.container.classList.remove("is-active"), this.emit("after.dropdown.close", this)); - }, - }, - { - key: "_createDropdownItem", - value: function _createDropdownItem(t) { - if (this.dropdown) { - var e = document.createRange().createContextualFragment((0, _.default)({ text: t.text, value: t.value })).firstElementChild; - (e.dataset.value = t.value), (e.dataset.text = t.text), e.addEventListener("click", this._onDropdownItemClick), this.dropdown.append(e); - } - }, - }, - { - key: "_createTag", - value: function _createTag(t) { - var e = document.createRange().createContextualFragment((0, m.default)({ removable: this.options.removable, style: this.options.tagClass, text: t.text, value: t.value })).firstElementChild; - if ((e.addEventListener("click", this._onTagClick), this.options.removable)) { - var n = e.querySelector(".delete"); - n && n.addEventListener("click", this._onTagDeleteClick); - } - this.container.insertBefore(e, this.input); - }, - }, - { - key: "_emptyDropdown", - value: function _emptyDropdown() { - this.dropdown && - Array.from(this.dropdown.children) - .filter(function (t) { - return !t.classList.contains("empty-title"); - }) - .forEach(function (t) { - t.remove(); - }); - }, - }, - { - key: "_highlightMatchesInString", - value: function _highlightMatchesInString(t, e) { - var n = new RegExp("(" + e + ")(?![^<]*>|[^<>]*)", "i"); - if (!t.match(n)) return t; - var i = t.match(n).index, - o = i + t.match(n)[0].toString().length, - r = t.substring(i, o); - return (t = t.replace(n, ''.concat(r, ""))); - }, - }, - { - key: "_openDropdown", - value: function _openDropdown() { - this.dropdown && this.container.classList.add("is-active"); - }, - }, - { - key: "_propagateChange", - value: function _propagateChange() { - var t = this; - this._isSelect - ? (Array.from(this.element.options).forEach(function (t) { - t.setAttribute("selected", void 0), (t.selected = !1), void 0 !== t.dataset.source && t.remove(); - }), - this.items.forEach(function (e) { - t._updateSelectOptions({ value: t._objectItems ? e[t.options.itemValue] : e, text: t._objectItems ? e[t.options.itemText] : e }); - })) - : (this.element.value = this.value); - var e = new CustomEvent("change", { detail: this.constructor.name }); - this.element.dispatchEvent(e); - }, - }, - { - key: "_trim", - value: function _trim(t) { - return ( - this.options.trim && - (this._objectItems - ? ((0, p.isString)(t[this.options.itemValue]) && (t[this.options.itemValue] = t[this.options.itemValue].trim()), - (0, p.isString)(t[this.options.itemText]) && (t[this.options.itemText] = t[this.options.itemText].trim())) - : (t = t.trim())), - t - ); - }, - }, - { - key: "_filterDropdownItems", - value: function _filterDropdownItems() { - var t = this, - e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null; - if (this.dropdown && this.emit("before.dropdown.filter", this)) { - Array.from(this.dropdown.children) - .filter(function (t) { - return !t.classList.contains("empty-title"); - }) - .forEach(function (n) { - var i = n.dataset[t.options.searchOn]; - if ( - (t.options.highlightMatchesString && (n.textContent = n.textContent.replace(/<\/?(mark\s?(class="is\-highlighted")?)?>]*>?/gm, "")), - e && e.length - ? ((n.style.display = t.options.caseSensitive ? (i.includes(e) ? "block" : "none") : i.toLowerCase().includes(e.toLowerCase()) ? "block" : "none"), - t.options.highlightMatchesString && (n.innerHTML = t._highlightMatchesInString(n.innerHTML, e))) - : (n.style.display = "block"), - !t.options.allowDuplicates || (t._isSelect && !t._isMultiple)) - ) { - var o = "value" === t.options.searchOn ? t.hasValue(i) : t.hasText(i); - n.style.display = o ? "none" : n.style.display; - } - }); - var n = Array.from(this.dropdown.children) - .filter(function (t) { - return !t.classList.contains("empty-title"); - }) - .some(function (t) { - return "none" !== t.style.display; - }); - return (this.dropdownEmptyOption.style.display = n ? "none" : "block"), this.emit("after.dropdown.filter", this), n; - } - return !0; - }, - }, - { - key: "_updateSelectOptions", - value: function _updateSelectOptions(t) { - if (this._isSelect) { - var e = this.element.querySelector('option[value="'.concat(encodeURIComponent(t.value), '"]')) || this.element.querySelector('option[value="'.concat(t.value, '"]')); - if (!e) - (e = document.createRange().createContextualFragment('")).firstElementChild), - this.element.add(e); - e.setAttribute("selected", "selected"), (e.selected = !0); - } - }, - }, - { - key: "add", - value: function add(t) { - var e = this, - n = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1]; - if (void 0 !== this.options.maxTags && this.items.length >= this.options.maxTags) return this; - if ( - ((t = Array.isArray(t) ? t : (0, p.isObject)(t) ? [t] : t.split(this.options.delimiter)), - !this._objectItems && - t.filter(function (t) { - return (0, p.isString)(t); - }).length !== t.length) - ) - throw "Item must be a string or an array of strings"; - if ( - this._objectItems && - t.filter(function (t) { - return (0, p.isObject)(t); - }).length !== t.length - ) - throw "Item must be an object or an array of objects"; - return ( - t.forEach(function (t) { - if ( - ((t = e._trim(t)), e._checkLength(t) && (e._isSelect && !e._isMultiple && 0 < e.items.length && (e.removeAtIndex(0), e.element.remove(e.element.selectedIndex)), (t = e.emit("before.add", t)))) - ) - if (e.options.allowDuplicates || !e.has(t)) { - var i = { value: e._objectItems ? t[e.options.itemValue] : t, text: e._objectItems ? t[e.options.itemText] : t }, - o = e._createTag(i); - e.items.push(t), n || (e._propagateChange(), e.emit("after.add", { item: t, tag: o })); - } else { - if (e.options.highlightDuplicate) { - var r = Array.from(e.container.children).filter(function (t) { - return t.classList.contains("tag"); - })[e.indexOf(t)]; - r && - (r.classList.add("is-duplicate"), - setTimeout(function () { - r.classList.remove("is-duplicate"); - }, 1250)); - } - e.emit("item.duplicate", t); - } - }), - this - ); - }, - }, - { - key: "clearSelection", - value: function clearSelection() { - if (0 <= this._selected) { - var t = this.items[this._selected], - e = Array.from(this.container.children).filter(function (t) { - return t.classList.contains("tag"); - })[this._selected]; - this.emit("before.unselect", { item: t, tag: e }) && (e && e.classList.remove("is-selected"), (this._selected = -1), this.emit("after.unselect", { item: t, tag: e })); - } - return this; - }, - }, - { - key: "flush", - value: function flush() { - return this.removeAll(); - }, - }, - { - key: "focus", - value: function focus() { - return this.container.classList.add("is-focused"), this.input.focus(), this; - }, - }, - { - key: "has", - value: function has(t) { - var e = this; - return ( - (t = this._trim(t)), - this._objectItems - ? this.items.some(function (n) { - return e.options.caseSensitive ? n[e.options.itemValue] === t[e.options.itemValue] : n[e.options.itemValue].toLowerCase() === t[e.options.itemValue].toLowerCase(); - }) - : this.hasValue(t) - ); - }, - }, - { - key: "hasText", - value: function hasText(t) { - var e = this; - return ( - this.options.trim && (t = t.trim()), - this.items.some(function (n) { - var i = e._objectItems ? n[e.options.itemText] : n; - return e.options.caseSensitive ? i === t : i.toLowerCase() === t.toLowerCase(); - }) - ); - }, - }, - { - key: "hasValue", - value: function hasValue(t) { - var e = this; - return ( - this.options.trim && (t = t.trim()), - this.items.some(function (n) { - var i = e._objectItems ? n[e.options.itemValue] : n; - return e.options.caseSensitive ? i === t : i.toLowerCase() === t.toLowerCase(); - }) - ); - }, - }, - { - key: "indexOf", - value: function indexOf(t) { - if (((t = this._trim(t)), this._objectItems)) { - if (!(0, p.isObject)(t)) throw "Item must be an object"; - return this.items - .map(function (t) { - return t.value; - }) - .indexOf(t.value); - } - return this.items.indexOf(t); - }, - }, - { - key: "input", - value: function input() { - return this.input; - }, - }, - { - key: "items", - value: function items() { - return this.items; - }, - }, - { - key: "remove", - value: function remove(t) { - var e = this; - if (this.options.removable) { - if ( - ((t = Array.isArray(t) ? t : (0, p.isObject)(t) ? [t] : t.split(this.options.delimiter)), - !this._objectItems && - t.filter(function (t) { - return (0, p.isString)(t); - }).length !== t.length) - ) - throw "Item must be a string or an array of strings"; - if ( - this._objectItems && - t.filter(function (t) { - return (0, p.isObject)(t); - }).length !== t.length - ) - throw "Item must be an object or an array of objects"; - t.forEach(function (t) { - for (var n = e.indexOf(t); 0 <= n; ) e.removeAtIndex(n), (n = e.indexOf(t)); - }); - } - return this; - }, - }, - { - key: "removeAll", - value: function removeAll() { - return ( - this.options.removable && - this.emit("before.flush", this.items) && - (this.clearSelection(), - Array.from(this.container.children) - .filter(function (t) { - return t.classList.contains("tag"); - }) - .forEach(function (t) { - return t.remove(); - }), - (this.items = []), - this._filterDropdownItems(), - this._propagateChange(), - this.emit("after.flush", this.items)), - this - ); - }, - }, - { - key: "removeAtIndex", - value: function removeAtIndex(t) { - var e = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1]; - if (this.options.removable && !isNaN(t) && 0 <= t && t < this.items.length) { - var n = Array.from(this.container.children).filter(function (t) { - return t.classList.contains("tag"); - })[t], - i = this.items[t]; - this.emit("before.remove", i) && - (e && this.clearSelection(), - n && n.remove(), - this._isSelect && (this.element.options[t].selected = !1), - this._selected == t ? (this._selected = -1) : 0 <= this._selected && (this._selected -= 1), - this.items.splice(t, 1), - this._filterDropdownItems(), - this._propagateChange(), - this.emit("after.remove", i)); - } - return this; - }, - }, - { - key: "select", - value: function select(t) { - var e = this; - if (this.options.selectable) { - if ( - ((t = Array.isArray(t) ? t : (0, p.isObject)(t) ? [t] : t.split(this.options.delimiter)), - !this._objectItems && - t.filter(function (t) { - return (0, p.isString)(t); - }).length !== t.length) - ) - throw "Item must be a string or an array of strings"; - if ( - this._objectItems && - t.filter(function (t) { - return (0, p.isObject)(t); - }).length !== t.length - ) - throw "Item must be an object or an array of objects"; - t.forEach(function (t) { - e.selectAtIndex(e.indexOf(t)); - }); - } - return this; - }, - }, - { - key: "selectAtIndex", - value: function selectAtIndex(t) { - if (this.options.selectable && (this.clearSelection(), !isNaN(t) && 0 <= t && t < this.items.length)) { - var e = Array.from(this.container.children).filter(function (t) { - return t.classList.contains("tag"); - })[t], - n = this.items[t]; - this.emit("before.select", { item: n, tag: e }) && (e && e.classList.add("is-selected"), (this._selected = t), this.emit("after.select", { item: n, tag: e })); - } - return this; - }, - }, - { - key: "_onDocumentClick", - value: function _onDocumentClick(t) { - if (this.dropdown) { - if (this.container.contains(t.target)) return; - if (t.target.dataset.tag && "delete" === t.target.dataset.tag) return; - this._closeDropdown(); - } - }, - }, - { - key: "_onDropdownItemClick", - value: function _onDropdownItemClick(t) { - if ((t.preventDefault(), this.dropdown)) { - if (this._objectItems) { - var e = {}; - (e[this.options.itemText] = t.currentTarget.dataset.text), (e[this.options.itemValue] = t.currentTarget.dataset.value), this.add(e); - } else this.add(t.currentTarget.dataset.value); - this._filterDropdownItems(), (this.input.value = ""), this.input.focus(), this.options.closeDropdownOnItemSelect && this._closeDropdown(); - } - }, - }, - { - key: "_onInputChange", - value: function _onInputChange() { - this._filterDropdownItems(this.input.value); - }, - }, - { - key: "_onInputClick", - value: function _onInputClick(t) { - t.preventDefault(), (!this.source || this.input.value.length >= this.options.searchMinChars) && (this._openDropdown(), this._filterDropdownItems()); - }, - }, - { - key: "_onInputFocusIn", - value: function _onInputFocusIn(t) { - return t.preventDefault(), null !== this.container.getAttribute("disabled") || this.container.classList.contains("is-disabled") ? (this.input.blur(), !1) : void this.container.classList.add("is-focused"); - }, - }, - { - key: "_onInputFocusOut", - value: function _onInputFocusOut(t) { - t.preventDefault(), this.container.classList.remove("is-focused"); - }, - }, - { - key: "_onInputKeyDown", - value: function _onInputKeyDown(t) { - switch (t.charCode || t.keyCode || t.which) { - case 8: - if (this.options.removable && this._caretAtStart() && 0 <= this._selected) { - var e = this._selected; - 0 <= e && this.selectAtIndex(e + 1 < this.items.length ? e + 1 : e - 1), this.removeAtIndex(e, !1); - } - this.source && this.input.value.length < this.options.searchMinChars && this._closeDropdown(); - break; - case 27: - 0 <= this._selected && this.clearSelection(), this._closeDropdown(); - break; - case 46: - if (this.options.removable && this._caretAtStart() && 0 <= this._selected) { - var n = this._selected; - 0 <= n && this.selectAtIndex(n + 1 < this.items.length ? n + 1 : n - 1), this.removeAtIndex(n, !1); - } - this.source && this.input.value.length < this.options.searchMinChars && this._closeDropdown(); - break; - case 37: - this.input.value.length || (0 > this._selected ? this.selectAtIndex(this.items.length - 1) : this.selectAtIndex(0 <= this._selected - 1 ? this._selected - 1 : this.items.length - 1)); - break; - case 39: - this.input.value.length || (0 > this._selected ? this.selectAtIndex(0) : this.selectAtIndex(this._selected + 1 >= this.items.length ? 0 : this._selected + 1)); - break; - default: - this.options.clearSelectionOnTyping && this.clearSelection(); - } - }, - }, - { - key: "_onInputKeyPress", - value: function _onInputKeyPress(t) { - var e = this, - n = t.charCode || t.keyCode || t.which, - i = this._trim(this.input.value) + String.fromCharCode(n); - return this._manualInputAllowed || this._filterInputAllowed - ? !(!i.length && 13 !== n) && - (this._filterInputAllowed && this._filterDropdownItems(i), - this._filterInputAllowed && - this.source && - i.length >= this.options.searchMinChars && - 13 !== n && - (this._openDropdown(), - this.dropdown.classList.add("is-loading"), - this._emptyDropdown(), - this.source(i).then(function (t) { - (t = e.emit("on.results.received", t)).length && - t.forEach(function (t) { - var n = { value: null, text: null }; - (0, p.isObject)(t) ? ((n.value = t[e.options.itemValue]), (n.text = t[e.options.itemText])) : ((n.value = t), (n.text = t)), e._createDropdownItem(n); - }), - e._filterDropdownItems(i), - e.dropdown.classList.remove("is-loading"); - })), - this._manualInputAllowed && (i.includes(this.options.delimiter) || 13 == n) - ? (t.preventDefault(), - i.split(this.options.delimiter).forEach(function (t) { - "" != (t = t.replace(e.options.delimiter, "")) && e.add(t); - }), - (i = ""), - (this.input.value = ""), - this._closeDropdown(), - !1) - : void 0) - : (t.preventDefault(), !1); - }, - }, - { - key: "_onOriginalInputChange", - value: function _onOriginalInputChange(t) { - (!t.detail || ((0, p.isString)(t.detail) && t.detail !== this.constructor.name)) && (this.value = t.currentTarget.value); - }, - }, - { - key: "_onTagClick", - value: function _onTagClick(t) { - if ((t.preventDefault(), t.currentTarget.classList.contains("delete"))) return !1; - if (null !== this.container.getAttribute("disabled") || this.container.classList.contains("is-disabled")) return !1; - if ((this.input.focus(), this.options.selectable)) { - var e = t.currentTarget.closest(".tag"); - if (e) { - var n = Array.from(this.container.children).indexOf(e); - n === this._selected ? this.clearSelection() : this.selectAtIndex(n); - } - } - }, - }, - { - key: "_onTagDeleteClick", - value: function _onTagDeleteClick(t) { - if ((t.preventDefault(), null !== this.container.getAttribute("disabled") || this.container.classList.contains("is-disabled"))) return !1; - var e = t.currentTarget.closest(".tag"); - e && this.removeAtIndex(Array.from(this.container.children).indexOf(e)); - }, - }, - { - key: "selected", - get: function get() { - return 0 <= this._selected ? this.items[this._selected] : null; - }, - }, - { - key: "selectedIndex", - get: function get() { - return this._selected; - }, - }, - { - key: "value", - get: function get() { - return this._isSelect - ? Array.from(this.element.options) - .filter(function (t) { - return t.selected; - }) - .map(function (t) { - return t.value; - }) - : this._objectItems - ? this.items - .map(function (t) { - return t.value; - }) - .join(this.options.delimiter) - : this.items.join(this.options.delimiter); - }, - set: function set(t) { - this.removeAll(), this.add(t); - }, - }, - ], - [ - { - key: "attach", - value: function attach() { - var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 'input[data-type="tags"], input[type="tags"], select[data-type="tags"], select[type="tags"]', - e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, - n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; - return (0, a.default)((0, c.default)(BulmaTagsInput), "attach", this).call(this, t, e, n); - }, - }, - ] - ), - BulmaTagsInput - ); - })(h.default); - e.default = y; - }, - function (t, e, n) { - var i = n(15); - function _get(e, n, o) { - return ( - "undefined" != typeof Reflect && Reflect.get - ? (t.exports = _get = Reflect.get) - : (t.exports = _get = function _get(t, e, n) { - var o = i(t, e); - if (o) { - var r = Object.getOwnPropertyDescriptor(o, e); - return r.get ? r.get.call(n) : r.value; - } - }), - _get(e, n, o || e) - ); - } - t.exports = _get; - }, - function (t, e, n) { - var i = n(4); - t.exports = function _superPropBase(t, e) { - for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = i(t)); ); - return t; - }; - }, - function (t, e) { - function _setPrototypeOf(e, n) { - return ( - (t.exports = _setPrototypeOf = - Object.setPrototypeOf || - function _setPrototypeOf(t, e) { - return (t.__proto__ = e), t; - }), - _setPrototypeOf(e, n) - ); - } - t.exports = _setPrototypeOf; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - var o = i(n(8)), - r = i(n(1)), - s = i(n(2)), - a = i(n(3)), - l = i(n(5)), - u = i(n(6)), - c = i(n(4)), - h = i(n(18)), - d = n(9), - p = i(n(24)); - function ownKeys(t, e) { - var n = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - n.push.apply(n, i); - } - return n; - } - function _objectSpread(t) { - for (var e, n = 1; n < arguments.length; n++) - (e = null == arguments[n] ? {} : arguments[n]), - n % 2 - ? ownKeys(Object(e), !0).forEach(function (n) { - (0, o.default)(t, n, e[n]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) - : ownKeys(Object(e)).forEach(function (n) { - Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n)); - }); - return t; - } - function _isNativeReflectConstruct() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; - } catch (t) { - return !1; - } - } - var f = (function (t) { - function Component(t) { - var n, - i = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, - o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; - if (((0, r.default)(this, Component), ((n = e.call(this)).element = (0, d.querySelector)(t, document)), !n.element)) - throw new Error("An invalid selector or non-DOM node has been provided for ".concat(n.constructor.name, ".")); - return ( - (n.element[n.constructor.name] = n.constructor._interface.bind((0, a.default)(n))), - (n.element[n.constructor.name].Constructor = n.constructor.name), - (n.id = (0, p.default)(n.constructor.name + "-")), - (n.options = _objectSpread({}, o, {}, i, {}, (0, d.optionsFromDataset)(n.element, o))), - n - ); - } - (0, l.default)(Component, t); - var e = (function _createSuper(t) { - return function () { - var e, - n = (0, c.default)(t); - if (_isNativeReflectConstruct()) { - var i = (0, c.default)(this).constructor; - e = Reflect.construct(n, arguments, i); - } else e = n.apply(this, arguments); - return (0, u.default)(this, e); - }; - })(Component); - return ( - (0, s.default)(Component, null, [ - { - key: "attach", - value: function attach() { - var t = this, - e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null, - n = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, - i = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null, - o = []; - return ( - null !== e && - ((0, d.querySelectorAll)(e, i).forEach(function (i) { - void 0 === i[t.name] ? o.push(new t(i, _objectSpread({ selector: e }, n))) : o.push(i[t.name]); - }), - void 0 === window[this.name] && (window[this.name] = { observers: [] }), - window[this.name].observers && !window[this.name].observers.includes(e) && (this.observeDom(e, n), window[this.name].observers.push(e))), - o - ); - }, - }, - { - key: "observeDom", - value: function observeDom(t, e) { - var n = this, - i = new MutationObserver(function (i) { - i.forEach(function (i) { - for (var o = 0; o < i.addedNodes.length; o++) void 0 !== window[n.name] && n.attach(t, e, i.addedNodes[o]); - }); - }); - "undefined" != typeof document && i.observe(document, { childList: !0, subtree: !0 }); - }, - }, - { - key: "_interface", - value: function _interface() { - var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null, - e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; - if ("string" == typeof t) { - if (void 0 === this[t]) throw new TypeError('No method named "'.concat(t, '"')); - return this[t](e); - } - return this; - }, - }, - ]), - Component - ); - })(h.default); - e.default = f; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - var o = i(n(1)), - r = i(n(2)), - s = (function () { - function EventEmitter() { - var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []; - (0, o.default)(this, EventEmitter), (this._listeners = new Map(t)), (this._events = new Map()); - } - return ( - (0, r.default)(EventEmitter, [ - { - key: "destroy", - value: function destroy() { - (this._listeners = {}), (this.events = []); - }, - }, - { - key: "listenerCount", - value: function listenerCount(t) { - return this._listeners.has(t) ? this._listeners.get(t).length : 0; - }, - }, - { - key: "on", - value: function on(t, e) { - this._addListener(t, e, !1); - }, - }, - { - key: "once", - value: function once(t, e) { - this._addListener(t, e, !0); - }, - }, - { - key: "off", - value: function off(t) { - this._removeListeners(t); - }, - }, - { - key: "emit", - value: function emit(t) { - for (var e = arguments.length, n = Array(1 < e ? e - 1 : 0), i = 1; i < e; i++) n[i - 1] = arguments[i]; - return this._applyEvents(t, n); - }, - }, - { - key: "_addListener", - value: function _addListener(t, e) { - var n = this, - i = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2]; - if (Array.isArray(t)) - t.forEach(function (t) { - return n._addListener(t, e, i); - }); - else { - var o = (t = t.toString()).split(/,|, | /); - 1 < o.length - ? o.forEach(function (t) { - return n._addListener(t, e, i); - }) - : (!Array.isArray(this._listeners.get(t)) && this._listeners.set(t, []), this._listeners.get(t).push({ once: i, fn: e })); - } - }, - }, - { - key: "_removeListeners", - value: function _removeListeners() { - var t = this, - e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null; - if (null === e) this._listeners = new Map(); - else if (Array.isArray(e)) - name.forEach(function (e) { - return t.removeListeners(e); - }); - else { - var n = (e = e.toString()).split(/,|, | /); - 1 < n.length - ? n.forEach(function (e) { - return t.removeListeners(e); - }) - : this._listeners.delete(e); - } - }, - }, - { - key: "_applyEvents", - value: function _applyEvents(t, e) { - var n = e; - if (this._listeners.has(t)) { - var i = this._listeners.get(t), - o = []; - return ( - i.forEach(function (t, i) { - (n = t.fn.apply(null, e)) && t.once && o.unshift(i); - }), - o.forEach(function (t) { - i.splice(t, 1); - }), - n - ); - } - return n[0]; - }, - }, - ]), - EventEmitter - ); - })(); - e.default = s; - }, - function (t, e, n) { - var i = n(20), - o = n(21), - r = n(22), - s = n(23); - t.exports = function _toConsumableArray(t) { - return i(t) || o(t) || r(t) || s(); - }; - }, - function (t, e, n) { - var i = n(10); - t.exports = function _arrayWithoutHoles(t) { - if (Array.isArray(t)) return i(t); - }; - }, - function (t, e) { - t.exports = function _iterableToArray(t) { - if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t); - }; - }, - function (t, e, n) { - var i = n(10); - t.exports = function _unsupportedIterableToArray(t, e) { - if (t) { - if ("string" == typeof t) return i(t, e); - var n = Object.prototype.toString.call(t).slice(8, -1); - return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(n) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? i(t, e) : void 0; - } - }; - }, - function (t, e) { - t.exports = 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 (t, e, n) { - "use strict"; - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - e.default = function _default() { - var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : ""; - return ( - t + - "10000000-1000-4000-8000-100000000000".replace(/[018]/g, function (t) { - return (t ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (t / 4)))).toString(16); - }) - ); - }; - }, - function (t, e, n) { - "use strict"; - var i = n(0); - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - i(n(12)); - var o = { - allowDuplicates: !1, - caseSensitive: !0, - clearSelectionOnTyping: !1, - closeDropdownOnItemSelect: !0, - delimiter: ",", - freeInput: !0, - highlightDuplicate: !0, - highlightMatchesString: !0, - itemValue: void 0, - itemText: void 0, - maxTags: void 0, - maxChars: void 0, - minChars: 1, - noResultsLabel: "No results found", - placeholder: "", - removable: !0, - searchMinChars: 1, - searchOn: "text", - selectable: !0, - source: void 0, - tagClass: "is-info", - trim: !0, - }; - e.default = o; - }, - function (t, e, n) { - "use strict"; - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - e.default = function _default(t) { - return '
"); - }; - }, - function (t, e, n) { - "use strict"; - Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0); - e.default = function _default(t) { - return '').concat(t.text, ""); - }; - }, - ]).default; -}); +/*! @creativebulma/bulma-tagsinput v1.0.3 | (c) 2020 Gaetan | MIT License | https://github.com/CreativeBulma/bulma-tagsinput */ +!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("BulmaTagsInput",[],t):"object"==typeof exports?exports.BulmaTagsInput=t():e.BulmaTagsInput=t()}(window,(function(){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)__webpack_require__.d(n,i,function(t){return e[t]}.bind(null,i));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=13)}([function(e,t){e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";var i=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.escape=t.cloneAttributes=t.optionsFromDataset=t.querySelectorAll=t.querySelector=void 0;var o=i(n(19)),r=i(n(9)),s=n(11);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t,n=1;n