/*! DataTables 3.1.3 * Copyright (c) SpryMedia Ltd - datatables.net/license */ (function(factory){ if (typeof define === 'function' && define.amd) { // AMD define([], function () { return factory(window, document); }); } else if (typeof exports === 'object') { // CommonJS var cjsRequires = function (root) { }; if (typeof window === 'undefined') { module.exports = function (root) { if (! root) { // CommonJS environments without a window global must pass a // root. This will give an error otherwise root = window; } cjsRequires(root); return factory(root, root.document); }; } else { cjsRequires(window); module.exports = factory(window, window.document); } } else { // Browser window.DataTable = factory(window, document); } }(function(window, document) { 'use strict'; // A collection of the regular expressions used throughout the code base. Not all are here // just the ones that need to be reused - no need to dump single use expressions here. // https://en.wikipedia.org/wiki/Foreign_exchange_market // - \u20BD - Russian ruble. // - \u20a9 - South Korean Won // - \u20BA - Turkish Lira // - \u20B9 - Indian Rupee // - R - Brazil (R$) and South Africa // - fr - Swiss Franc // - kr - Swedish krona, Norwegian krone and Danish krone // - \u2009 is thin space and \u202F is narrow no-break space, both used in many // - Ƀ - Bitcoin // - Ξ - Ethereum // standards as thousands separators. const reFormattedNumeric = /['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi; const reHtml = /<([^>]*>)/g; // Escape regular expression special characters const reRegexCharacters = new RegExp('(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-', ].join('|\\') + ')', 'g'); // This is not strict ISO8601 - Date.parse() is quite lax, although // implementations differ between browsers. const reDate = /^\d{2,4}[./-]\d{1,2}[./-]\d{1,2}([T ]{1}\d{1,2}[:.]\d{2}([.:]\d{2})?)?$/; const reNewLines = /[\r\n\u2028]/g; const isoTimezone = /[T\s]\d{2}.*?(Z|[+-]\d{2}(?::?\d{2})?)$/; var regex = /*#__PURE__*/Object.freeze({ __proto__: null, isoTimezone: isoTimezone, reDate: reDate, reFormattedNumeric: reFormattedNumeric, reHtml: reHtml, reNewLines: reNewLines, reRegexCharacters: reRegexCharacters }); const maxStrLen = Math.pow(2, 28); /** * DataTables default string normalisation. Remove diacritics from a string by * decomposing it and then removing non-ascii characters. * * This function is replaceable if the user wishes to use a different library * for normalising a string. * * @param val Value to normalise (if a string) * @param both Include both the normalised and original in the return * @returns Normalised string, or original value if not a string */ let _normalize = function (val, both) { if (typeof val !== 'string') { return val; } // It is faster to just run `normalize` than it is to check if // we need to with a regex! (Check as it isn't available in old // Safari) var res = val.normalize ? val.normalize('NFD') : val; // Equally, here we check if a regex is needed or not return res.length !== val.length ? (both === true ? val + ' ' : '') + res.replace(/[\u0300-\u036f]/g, '') : res; }; /** * DataTables default string HTML stripping from a string * * This function is replaceable if the user wishes to use a different library * for stripping HTML from a string. * * @param input Value to strip HTML from * @param replacement Value to replace the tags with * @returns Stripped value */ let _stripHtml = function (input, replacement = '') { if (!input || typeof input !== 'string') { return input; } // Irrelevant check to workaround CodeQL's false positive on the regex if (input.length > maxStrLen) { throw new Error('Exceeded max str len'); } let previous; let next = input.replace(reHtml, replacement); // Complete tags // Safety for incomplete script tag - use do / while to ensure that // we get all instances do { previous = next; next = next.replace(/