Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-inclu.../js
File: clipboard.js
/*!
[0] Fix | Delete
* clipboard.js v2.0.11
[1] Fix | Delete
* https://clipboardjs.com/
[2] Fix | Delete
*
[3] Fix | Delete
* Licensed MIT © Zeno Rocha
[4] Fix | Delete
*/
[5] Fix | Delete
(function webpackUniversalModuleDefinition(root, factory) {
[6] Fix | Delete
if(typeof exports === 'object' && typeof module === 'object')
[7] Fix | Delete
module.exports = factory();
[8] Fix | Delete
else if(typeof define === 'function' && define.amd)
[9] Fix | Delete
define([], factory);
[10] Fix | Delete
else if(typeof exports === 'object')
[11] Fix | Delete
exports["ClipboardJS"] = factory();
[12] Fix | Delete
else
[13] Fix | Delete
root["ClipboardJS"] = factory();
[14] Fix | Delete
})(this, function() {
[15] Fix | Delete
return /******/ (function() { // webpackBootstrap
[16] Fix | Delete
/******/ var __webpack_modules__ = ({
[17] Fix | Delete
[18] Fix | Delete
/***/ 686:
[19] Fix | Delete
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
[20] Fix | Delete
[21] Fix | Delete
"use strict";
[22] Fix | Delete
[23] Fix | Delete
// EXPORTS
[24] Fix | Delete
__webpack_require__.d(__webpack_exports__, {
[25] Fix | Delete
"default": function() { return /* binding */ clipboard; }
[26] Fix | Delete
});
[27] Fix | Delete
[28] Fix | Delete
// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
[29] Fix | Delete
var tiny_emitter = __webpack_require__(279);
[30] Fix | Delete
var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);
[31] Fix | Delete
// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
[32] Fix | Delete
var listen = __webpack_require__(370);
[33] Fix | Delete
var listen_default = /*#__PURE__*/__webpack_require__.n(listen);
[34] Fix | Delete
// EXTERNAL MODULE: ./node_modules/select/src/select.js
[35] Fix | Delete
var src_select = __webpack_require__(817);
[36] Fix | Delete
var select_default = /*#__PURE__*/__webpack_require__.n(src_select);
[37] Fix | Delete
;// CONCATENATED MODULE: ./src/common/command.js
[38] Fix | Delete
/**
[39] Fix | Delete
* Executes a given operation type.
[40] Fix | Delete
* @param {String} type
[41] Fix | Delete
* @return {Boolean}
[42] Fix | Delete
*/
[43] Fix | Delete
function command(type) {
[44] Fix | Delete
try {
[45] Fix | Delete
return document.execCommand(type);
[46] Fix | Delete
} catch (err) {
[47] Fix | Delete
return false;
[48] Fix | Delete
}
[49] Fix | Delete
}
[50] Fix | Delete
;// CONCATENATED MODULE: ./src/actions/cut.js
[51] Fix | Delete
[52] Fix | Delete
[53] Fix | Delete
/**
[54] Fix | Delete
* Cut action wrapper.
[55] Fix | Delete
* @param {String|HTMLElement} target
[56] Fix | Delete
* @return {String}
[57] Fix | Delete
*/
[58] Fix | Delete
[59] Fix | Delete
var ClipboardActionCut = function ClipboardActionCut(target) {
[60] Fix | Delete
var selectedText = select_default()(target);
[61] Fix | Delete
command('cut');
[62] Fix | Delete
return selectedText;
[63] Fix | Delete
};
[64] Fix | Delete
[65] Fix | Delete
/* harmony default export */ var actions_cut = (ClipboardActionCut);
[66] Fix | Delete
;// CONCATENATED MODULE: ./src/common/create-fake-element.js
[67] Fix | Delete
/**
[68] Fix | Delete
* Creates a fake textarea element with a value.
[69] Fix | Delete
* @param {String} value
[70] Fix | Delete
* @return {HTMLElement}
[71] Fix | Delete
*/
[72] Fix | Delete
function createFakeElement(value) {
[73] Fix | Delete
var isRTL = document.documentElement.getAttribute('dir') === 'rtl';
[74] Fix | Delete
var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS
[75] Fix | Delete
[76] Fix | Delete
fakeElement.style.fontSize = '12pt'; // Reset box model
[77] Fix | Delete
[78] Fix | Delete
fakeElement.style.border = '0';
[79] Fix | Delete
fakeElement.style.padding = '0';
[80] Fix | Delete
fakeElement.style.margin = '0'; // Move element out of screen horizontally
[81] Fix | Delete
[82] Fix | Delete
fakeElement.style.position = 'absolute';
[83] Fix | Delete
fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically
[84] Fix | Delete
[85] Fix | Delete
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
[86] Fix | Delete
fakeElement.style.top = "".concat(yPosition, "px");
[87] Fix | Delete
fakeElement.setAttribute('readonly', '');
[88] Fix | Delete
fakeElement.value = value;
[89] Fix | Delete
return fakeElement;
[90] Fix | Delete
}
[91] Fix | Delete
;// CONCATENATED MODULE: ./src/actions/copy.js
[92] Fix | Delete
[93] Fix | Delete
[94] Fix | Delete
[95] Fix | Delete
/**
[96] Fix | Delete
* Create fake copy action wrapper using a fake element.
[97] Fix | Delete
* @param {String} target
[98] Fix | Delete
* @param {Object} options
[99] Fix | Delete
* @return {String}
[100] Fix | Delete
*/
[101] Fix | Delete
[102] Fix | Delete
var fakeCopyAction = function fakeCopyAction(value, options) {
[103] Fix | Delete
var fakeElement = createFakeElement(value);
[104] Fix | Delete
options.container.appendChild(fakeElement);
[105] Fix | Delete
var selectedText = select_default()(fakeElement);
[106] Fix | Delete
command('copy');
[107] Fix | Delete
fakeElement.remove();
[108] Fix | Delete
return selectedText;
[109] Fix | Delete
};
[110] Fix | Delete
/**
[111] Fix | Delete
* Copy action wrapper.
[112] Fix | Delete
* @param {String|HTMLElement} target
[113] Fix | Delete
* @param {Object} options
[114] Fix | Delete
* @return {String}
[115] Fix | Delete
*/
[116] Fix | Delete
[117] Fix | Delete
[118] Fix | Delete
var ClipboardActionCopy = function ClipboardActionCopy(target) {
[119] Fix | Delete
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
[120] Fix | Delete
container: document.body
[121] Fix | Delete
};
[122] Fix | Delete
var selectedText = '';
[123] Fix | Delete
[124] Fix | Delete
if (typeof target === 'string') {
[125] Fix | Delete
selectedText = fakeCopyAction(target, options);
[126] Fix | Delete
} else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
[127] Fix | Delete
// If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
[128] Fix | Delete
selectedText = fakeCopyAction(target.value, options);
[129] Fix | Delete
} else {
[130] Fix | Delete
selectedText = select_default()(target);
[131] Fix | Delete
command('copy');
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
return selectedText;
[135] Fix | Delete
};
[136] Fix | Delete
[137] Fix | Delete
/* harmony default export */ var actions_copy = (ClipboardActionCopy);
[138] Fix | Delete
;// CONCATENATED MODULE: ./src/actions/default.js
[139] Fix | Delete
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
[140] Fix | Delete
[141] Fix | Delete
[142] Fix | Delete
[143] Fix | Delete
/**
[144] Fix | Delete
* Inner function which performs selection from either `text` or `target`
[145] Fix | Delete
* properties and then executes copy or cut operations.
[146] Fix | Delete
* @param {Object} options
[147] Fix | Delete
*/
[148] Fix | Delete
[149] Fix | Delete
var ClipboardActionDefault = function ClipboardActionDefault() {
[150] Fix | Delete
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
[151] Fix | Delete
// Defines base properties passed from constructor.
[152] Fix | Delete
var _options$action = options.action,
[153] Fix | Delete
action = _options$action === void 0 ? 'copy' : _options$action,
[154] Fix | Delete
container = options.container,
[155] Fix | Delete
target = options.target,
[156] Fix | Delete
text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.
[157] Fix | Delete
[158] Fix | Delete
if (action !== 'copy' && action !== 'cut') {
[159] Fix | Delete
throw new Error('Invalid "action" value, use either "copy" or "cut"');
[160] Fix | Delete
} // Sets the `target` property using an element that will be have its content copied.
[161] Fix | Delete
[162] Fix | Delete
[163] Fix | Delete
if (target !== undefined) {
[164] Fix | Delete
if (target && _typeof(target) === 'object' && target.nodeType === 1) {
[165] Fix | Delete
if (action === 'copy' && target.hasAttribute('disabled')) {
[166] Fix | Delete
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
[170] Fix | Delete
throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
[171] Fix | Delete
}
[172] Fix | Delete
} else {
[173] Fix | Delete
throw new Error('Invalid "target" value, use a valid Element');
[174] Fix | Delete
}
[175] Fix | Delete
} // Define selection strategy based on `text` property.
[176] Fix | Delete
[177] Fix | Delete
[178] Fix | Delete
if (text) {
[179] Fix | Delete
return actions_copy(text, {
[180] Fix | Delete
container: container
[181] Fix | Delete
});
[182] Fix | Delete
} // Defines which selection strategy based on `target` property.
[183] Fix | Delete
[184] Fix | Delete
[185] Fix | Delete
if (target) {
[186] Fix | Delete
return action === 'cut' ? actions_cut(target) : actions_copy(target, {
[187] Fix | Delete
container: container
[188] Fix | Delete
});
[189] Fix | Delete
}
[190] Fix | Delete
};
[191] Fix | Delete
[192] Fix | Delete
/* harmony default export */ var actions_default = (ClipboardActionDefault);
[193] Fix | Delete
;// CONCATENATED MODULE: ./src/clipboard.js
[194] Fix | Delete
function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); }
[195] Fix | Delete
[196] Fix | Delete
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
[197] Fix | Delete
[198] Fix | Delete
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); } }
[199] Fix | Delete
[200] Fix | Delete
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
[201] Fix | Delete
[202] Fix | Delete
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
[203] Fix | Delete
[204] Fix | Delete
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
[205] Fix | Delete
[206] Fix | Delete
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
[207] Fix | Delete
[208] Fix | Delete
function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
[209] Fix | Delete
[210] Fix | Delete
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
[211] Fix | Delete
[212] Fix | Delete
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[213] Fix | Delete
[214] Fix | Delete
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
[215] Fix | Delete
[216] Fix | Delete
[217] Fix | Delete
[218] Fix | Delete
[219] Fix | Delete
[220] Fix | Delete
[221] Fix | Delete
/**
[222] Fix | Delete
* Helper function to retrieve attribute value.
[223] Fix | Delete
* @param {String} suffix
[224] Fix | Delete
* @param {Element} element
[225] Fix | Delete
*/
[226] Fix | Delete
[227] Fix | Delete
function getAttributeValue(suffix, element) {
[228] Fix | Delete
var attribute = "data-clipboard-".concat(suffix);
[229] Fix | Delete
[230] Fix | Delete
if (!element.hasAttribute(attribute)) {
[231] Fix | Delete
return;
[232] Fix | Delete
}
[233] Fix | Delete
[234] Fix | Delete
return element.getAttribute(attribute);
[235] Fix | Delete
}
[236] Fix | Delete
/**
[237] Fix | Delete
* Base class which takes one or more elements, adds event listeners to them,
[238] Fix | Delete
* and instantiates a new `ClipboardAction` on each click.
[239] Fix | Delete
*/
[240] Fix | Delete
[241] Fix | Delete
[242] Fix | Delete
var Clipboard = /*#__PURE__*/function (_Emitter) {
[243] Fix | Delete
_inherits(Clipboard, _Emitter);
[244] Fix | Delete
[245] Fix | Delete
var _super = _createSuper(Clipboard);
[246] Fix | Delete
[247] Fix | Delete
/**
[248] Fix | Delete
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
[249] Fix | Delete
* @param {Object} options
[250] Fix | Delete
*/
[251] Fix | Delete
function Clipboard(trigger, options) {
[252] Fix | Delete
var _this;
[253] Fix | Delete
[254] Fix | Delete
_classCallCheck(this, Clipboard);
[255] Fix | Delete
[256] Fix | Delete
_this = _super.call(this);
[257] Fix | Delete
[258] Fix | Delete
_this.resolveOptions(options);
[259] Fix | Delete
[260] Fix | Delete
_this.listenClick(trigger);
[261] Fix | Delete
[262] Fix | Delete
return _this;
[263] Fix | Delete
}
[264] Fix | Delete
/**
[265] Fix | Delete
* Defines if attributes would be resolved using internal setter functions
[266] Fix | Delete
* or custom functions that were passed in the constructor.
[267] Fix | Delete
* @param {Object} options
[268] Fix | Delete
*/
[269] Fix | Delete
[270] Fix | Delete
[271] Fix | Delete
_createClass(Clipboard, [{
[272] Fix | Delete
key: "resolveOptions",
[273] Fix | Delete
value: function resolveOptions() {
[274] Fix | Delete
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
[275] Fix | Delete
this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
[276] Fix | Delete
this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
[277] Fix | Delete
this.text = typeof options.text === 'function' ? options.text : this.defaultText;
[278] Fix | Delete
this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
[279] Fix | Delete
}
[280] Fix | Delete
/**
[281] Fix | Delete
* Adds a click event listener to the passed trigger.
[282] Fix | Delete
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
[283] Fix | Delete
*/
[284] Fix | Delete
[285] Fix | Delete
}, {
[286] Fix | Delete
key: "listenClick",
[287] Fix | Delete
value: function listenClick(trigger) {
[288] Fix | Delete
var _this2 = this;
[289] Fix | Delete
[290] Fix | Delete
this.listener = listen_default()(trigger, 'click', function (e) {
[291] Fix | Delete
return _this2.onClick(e);
[292] Fix | Delete
});
[293] Fix | Delete
}
[294] Fix | Delete
/**
[295] Fix | Delete
* Defines a new `ClipboardAction` on each click event.
[296] Fix | Delete
* @param {Event} e
[297] Fix | Delete
*/
[298] Fix | Delete
[299] Fix | Delete
}, {
[300] Fix | Delete
key: "onClick",
[301] Fix | Delete
value: function onClick(e) {
[302] Fix | Delete
var trigger = e.delegateTarget || e.currentTarget;
[303] Fix | Delete
var action = this.action(trigger) || 'copy';
[304] Fix | Delete
var text = actions_default({
[305] Fix | Delete
action: action,
[306] Fix | Delete
container: this.container,
[307] Fix | Delete
target: this.target(trigger),
[308] Fix | Delete
text: this.text(trigger)
[309] Fix | Delete
}); // Fires an event based on the copy operation result.
[310] Fix | Delete
[311] Fix | Delete
this.emit(text ? 'success' : 'error', {
[312] Fix | Delete
action: action,
[313] Fix | Delete
text: text,
[314] Fix | Delete
trigger: trigger,
[315] Fix | Delete
clearSelection: function clearSelection() {
[316] Fix | Delete
if (trigger) {
[317] Fix | Delete
trigger.focus();
[318] Fix | Delete
}
[319] Fix | Delete
[320] Fix | Delete
window.getSelection().removeAllRanges();
[321] Fix | Delete
}
[322] Fix | Delete
});
[323] Fix | Delete
}
[324] Fix | Delete
/**
[325] Fix | Delete
* Default `action` lookup function.
[326] Fix | Delete
* @param {Element} trigger
[327] Fix | Delete
*/
[328] Fix | Delete
[329] Fix | Delete
}, {
[330] Fix | Delete
key: "defaultAction",
[331] Fix | Delete
value: function defaultAction(trigger) {
[332] Fix | Delete
return getAttributeValue('action', trigger);
[333] Fix | Delete
}
[334] Fix | Delete
/**
[335] Fix | Delete
* Default `target` lookup function.
[336] Fix | Delete
* @param {Element} trigger
[337] Fix | Delete
*/
[338] Fix | Delete
[339] Fix | Delete
}, {
[340] Fix | Delete
key: "defaultTarget",
[341] Fix | Delete
value: function defaultTarget(trigger) {
[342] Fix | Delete
var selector = getAttributeValue('target', trigger);
[343] Fix | Delete
[344] Fix | Delete
if (selector) {
[345] Fix | Delete
return document.querySelector(selector);
[346] Fix | Delete
}
[347] Fix | Delete
}
[348] Fix | Delete
/**
[349] Fix | Delete
* Allow fire programmatically a copy action
[350] Fix | Delete
* @param {String|HTMLElement} target
[351] Fix | Delete
* @param {Object} options
[352] Fix | Delete
* @returns Text copied.
[353] Fix | Delete
*/
[354] Fix | Delete
[355] Fix | Delete
}, {
[356] Fix | Delete
key: "defaultText",
[357] Fix | Delete
[358] Fix | Delete
/**
[359] Fix | Delete
* Default `text` lookup function.
[360] Fix | Delete
* @param {Element} trigger
[361] Fix | Delete
*/
[362] Fix | Delete
value: function defaultText(trigger) {
[363] Fix | Delete
return getAttributeValue('text', trigger);
[364] Fix | Delete
}
[365] Fix | Delete
/**
[366] Fix | Delete
* Destroy lifecycle.
[367] Fix | Delete
*/
[368] Fix | Delete
[369] Fix | Delete
}, {
[370] Fix | Delete
key: "destroy",
[371] Fix | Delete
value: function destroy() {
[372] Fix | Delete
this.listener.destroy();
[373] Fix | Delete
}
[374] Fix | Delete
}], [{
[375] Fix | Delete
key: "copy",
[376] Fix | Delete
value: function copy(target) {
[377] Fix | Delete
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
[378] Fix | Delete
container: document.body
[379] Fix | Delete
};
[380] Fix | Delete
return actions_copy(target, options);
[381] Fix | Delete
}
[382] Fix | Delete
/**
[383] Fix | Delete
* Allow fire programmatically a cut action
[384] Fix | Delete
* @param {String|HTMLElement} target
[385] Fix | Delete
* @returns Text cutted.
[386] Fix | Delete
*/
[387] Fix | Delete
[388] Fix | Delete
}, {
[389] Fix | Delete
key: "cut",
[390] Fix | Delete
value: function cut(target) {
[391] Fix | Delete
return actions_cut(target);
[392] Fix | Delete
}
[393] Fix | Delete
/**
[394] Fix | Delete
* Returns the support of the given action, or all actions if no action is
[395] Fix | Delete
* given.
[396] Fix | Delete
* @param {String} [action]
[397] Fix | Delete
*/
[398] Fix | Delete
[399] Fix | Delete
}, {
[400] Fix | Delete
key: "isSupported",
[401] Fix | Delete
value: function isSupported() {
[402] Fix | Delete
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
[403] Fix | Delete
var actions = typeof action === 'string' ? [action] : action;
[404] Fix | Delete
var support = !!document.queryCommandSupported;
[405] Fix | Delete
actions.forEach(function (action) {
[406] Fix | Delete
support = support && !!document.queryCommandSupported(action);
[407] Fix | Delete
});
[408] Fix | Delete
return support;
[409] Fix | Delete
}
[410] Fix | Delete
}]);
[411] Fix | Delete
[412] Fix | Delete
return Clipboard;
[413] Fix | Delete
}((tiny_emitter_default()));
[414] Fix | Delete
[415] Fix | Delete
/* harmony default export */ var clipboard = (Clipboard);
[416] Fix | Delete
[417] Fix | Delete
/***/ }),
[418] Fix | Delete
[419] Fix | Delete
/***/ 828:
[420] Fix | Delete
/***/ (function(module) {
[421] Fix | Delete
[422] Fix | Delete
var DOCUMENT_NODE_TYPE = 9;
[423] Fix | Delete
[424] Fix | Delete
/**
[425] Fix | Delete
* A polyfill for Element.matches()
[426] Fix | Delete
*/
[427] Fix | Delete
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
[428] Fix | Delete
var proto = Element.prototype;
[429] Fix | Delete
[430] Fix | Delete
proto.matches = proto.matchesSelector ||
[431] Fix | Delete
proto.mozMatchesSelector ||
[432] Fix | Delete
proto.msMatchesSelector ||
[433] Fix | Delete
proto.oMatchesSelector ||
[434] Fix | Delete
proto.webkitMatchesSelector;
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
/**
[438] Fix | Delete
* Finds the closest parent that matches a selector.
[439] Fix | Delete
*
[440] Fix | Delete
* @param {Element} element
[441] Fix | Delete
* @param {String} selector
[442] Fix | Delete
* @return {Function}
[443] Fix | Delete
*/
[444] Fix | Delete
function closest (element, selector) {
[445] Fix | Delete
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
[446] Fix | Delete
if (typeof element.matches === 'function' &&
[447] Fix | Delete
element.matches(selector)) {
[448] Fix | Delete
return element;
[449] Fix | Delete
}
[450] Fix | Delete
element = element.parentNode;
[451] Fix | Delete
}
[452] Fix | Delete
}
[453] Fix | Delete
[454] Fix | Delete
module.exports = closest;
[455] Fix | Delete
[456] Fix | Delete
[457] Fix | Delete
/***/ }),
[458] Fix | Delete
[459] Fix | Delete
/***/ 438:
[460] Fix | Delete
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
[461] Fix | Delete
[462] Fix | Delete
var closest = __webpack_require__(828);
[463] Fix | Delete
[464] Fix | Delete
/**
[465] Fix | Delete
* Delegates event to a selector.
[466] Fix | Delete
*
[467] Fix | Delete
* @param {Element} element
[468] Fix | Delete
* @param {String} selector
[469] Fix | Delete
* @param {String} type
[470] Fix | Delete
* @param {Function} callback
[471] Fix | Delete
* @param {Boolean} useCapture
[472] Fix | Delete
* @return {Object}
[473] Fix | Delete
*/
[474] Fix | Delete
function _delegate(element, selector, type, callback, useCapture) {
[475] Fix | Delete
var listenerFn = listener.apply(this, arguments);
[476] Fix | Delete
[477] Fix | Delete
element.addEventListener(type, listenerFn, useCapture);
[478] Fix | Delete
[479] Fix | Delete
return {
[480] Fix | Delete
destroy: function() {
[481] Fix | Delete
element.removeEventListener(type, listenerFn, useCapture);
[482] Fix | Delete
}
[483] Fix | Delete
}
[484] Fix | Delete
}
[485] Fix | Delete
[486] Fix | Delete
/**
[487] Fix | Delete
* Delegates event to a selector.
[488] Fix | Delete
*
[489] Fix | Delete
* @param {Element|String|Array} [elements]
[490] Fix | Delete
* @param {String} selector
[491] Fix | Delete
* @param {String} type
[492] Fix | Delete
* @param {Function} callback
[493] Fix | Delete
* @param {Boolean} useCapture
[494] Fix | Delete
* @return {Object}
[495] Fix | Delete
*/
[496] Fix | Delete
function delegate(elements, selector, type, callback, useCapture) {
[497] Fix | Delete
// Handle the regular Element usage
[498] Fix | Delete
if (typeof elements.addEventListener === 'function') {
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function