",a=a.replace("",e+""));a=a.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|");?\)/g,"url($2)").replace(/url\([^#]+#/g, "url(#").replace(/ ";R(S(b,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+z.btoa(unescape(encodeURIComponent(b))),this.getFilename()+".xls")}function q(b){var a="",g=this.getDataRows(),e=this.options.exporting.csv,x=A(e.decimalPoint,","!==e.itemDelimiter&&b?(1.1).toLocaleString()[1]:"."),d=A(e.itemDelimiter,","===x?";":","),c=e.lineDelimiter;g.forEach(function(b,e){for(var u,n=b.length;n--;)u=b[n],"string"===typeof u&&(u='"'+u+'"'),"number"===typeof u&&"."!==x&& (u=u.toString().replace(".",x)),b[n]=u;b.length=g.length?g[0].length:0;a+=b.join(d);e")};a=this.getTableAST(a);return b(a)}function ba(a){var b=0,c=[],e=this.options,f=a?(1.1).toLocaleString()[1]:".",d=A(e.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(d);var n=d?a.shift():null,h=a.shift(),m=function(a,b,c,e){var d=A(e,"");b="highcharts-text"+(b?" "+b:"");"number"===typeof d?(d=d.toString(),","===f&&(d=d.replace(".",f)),b="highcharts-number"): e||(b="highcharts-empty");c=U({"class":b},c);return{tagName:a,attributes:c,textContent:d}};!1!==e.exporting.tableCaption&&c.push({tagName:"caption",attributes:{"class":"highcharts-table-caption"},textContent:A(e.exporting.tableCaption,e.title.text?e.title.text:"Chart")});for(var t=0,q=a.length;tb&&(b=a[t].length);c.push(function(a,b,c){var u=[],g=0;c=c||b&&b.length;var f=0,k;if(k=d&&a&&b){a:if(k=a.length,b.length===k){for(;k--;)if(a[k]!==b[k]){k=!1;break a}k=!0}else k=!1;k=!k}if(k){for(k= [];gb.userAgent.indexOf("Chrome"),f=z.URL||z.webkitURL||z;try{if(b.msSaveOrOpenBlob&&z.MSBlobBuilder){var d=new z.MSBlobBuilder;d.append(a);return d.getBlob("image/svg+xml")}if(!e)return f.createObjectURL(new z.Blob(["\ufeff"+ a],{type:c}))}catch(n){}}function ha(){var a=this,c=a.dataTableDiv,g=document.querySelectorAll("thead")[0].querySelectorAll("tr")[0],e=function(a,b){return function(c,d){var e=(b?c:d).children[a].textContent;c=(b?d:c).children[a].textContent;return""===e||""===c||isNaN(e)||isNaN(c)?e.toString().localeCompare(c):e-c}};c&&g.childNodes.forEach(function(b){var d=b.closest("table");b.addEventListener("click",function(){var g=E([],c.querySelectorAll("tr:not(thead tr)"),!0),f=E([],b.parentNode.children, !0);g.sort(e(f.indexOf(b),a.ascendingOrderInTable=!a.ascendingOrderInTable)).forEach(function(a){d.appendChild(a)});f.forEach(function(a){["highcharts-sort-ascending","highcharts-sort-descending"].forEach(function(b){a.classList.contains(b)&&a.classList.remove(b)})});b.classList.add(a.ascendingOrderInTable?"highcharts-sort-ascending":"highcharts-sort-descending")})})}function ia(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&this.viewData()} var E=this&&this.__spreadArray||function(a,c,g){if(g||2===arguments.length)for(var b=0,f=c.length,d;b
  • element, and we see another //
  • tag, close the first so they become siblings if (!anchor && !canContain(lowerCaseName, remaining)) { closed = true; } else if (!anchor && (closingTag = readClosingTag(parser))) { // closing tag closed = true; var closingTagName = closingTag.e.toLowerCase(); // if this *isn't* the closing tag for the current element... if (closingTagName !== lowerCaseName) { // rewind parser parser.pos = pos; // if it doesn't close a parent tag, error if (!~parser.elementStack.indexOf(closingTagName)) { var errorMessage = 'Unexpected closing tag'; // add additional help for void elements, since component names // might clash with them if (voidElements[closingTagName.toLowerCase()]) { errorMessage += " (<" + closingTagName + "> is a void element - it cannot contain children)"; } parser.error(errorMessage); } } } else if (anchor && readAnchorClose(parser, element.n)) { closed = true; } else { // implicit close by closing section tag. TODO clean this up var tag = { open: parser.standardDelimiters[0], close: parser.standardDelimiters[1] }; if (readClosing(parser, tag) || readInline(parser, tag)) { closed = true; parser.pos = pos; } else if ((child = parser.read(PARTIAL_READERS))) { if (partials[child.n]) { parser.pos = pos; parser.error('Duplicate partial definition'); } cleanup( child.f, parser.stripComments, preserveWhitespace, !preserveWhitespace, !preserveWhitespace, parser.whiteSpaceElements ); partials[child.n] = child.f; hasPartials = true; } else { if ((child = parser.read(READERS))) { children.push(child); } else { closed = true; } } } } while (!closed); if (children.length) { element.f = children; } if (hasPartials) { element.p = partials; } parser.elementStack.pop(); } parser.inside = null; if (parser.sanitizeElements && parser.sanitizeElements.indexOf(lowerCaseName) !== -1) { return exclude; } if ( element.m && lowerCaseName !== 'input' && lowerCaseName !== 'select' && lowerCaseName !== 'textarea' && lowerCaseName !== 'option' ) { var attrs = element.m; var classes, styles, cls, style; var i = 0; var a; while (i < attrs.length) { a = attrs[i]; if (a.t !== ATTRIBUTE) { i++; continue; } if (a.n.indexOf('class-') === 0 && !a.f) { // static class directives (classes || (classes = [])).push(a.n.slice(6)); attrs.splice(i, 1); } else if (a.n.indexOf('style-') === 0 && isString(a.f)) { // static style directives (styles || (styles = [])).push(((hyphenateCamel(a.n.slice(6))) + ": " + (a.f) + ";")); attrs.splice(i, 1); } else if (a.n === 'class' && isString(a.f)) { // static class attrs (classes || (classes = [])).push(a.f); attrs.splice(i, 1); } else if (a.n === 'style' && isString(a.f)) { // static style attrs (styles || (styles = [])).push(a.f + (semiEnd.test(a.f) ? '' : ';')); attrs.splice(i, 1); } else if (a.n === 'class') { cls = a; i++; } else if (a.n === 'style') { style = a; i++; } else if ( !~a.n.indexOf(':') && a.n !== 'value' && a.n !== 'contenteditable' && isString(a.f) ) { a.g = 1; i++; } else { i++; } } if (classes) { if (!cls || !isString(cls.f)) { attrs.unshift({ t: ATTRIBUTE, n: 'class', f: classes.join(' '), g: 1 }); } else { cls.f += ' ' + classes.join(' '); } } else if (cls && isString(cls.f)) { cls.g = 1; } if (styles) { if (!style || !isString(style.f)) { attrs.unshift({ t: ATTRIBUTE, n: 'style', f: styles.join(' '), g: 1 }); } else { style.f += '; ' + styles.join(' '); } } else if (style && isString(style.f)) { style.g = 1; } } return element; } function canContain(name, remaining) { var match = /^<([a-zA-Z][a-zA-Z0-9]*)/.exec(remaining); var disallowed = disallowedContents[name]; if (!match || !disallowed) { return true; } return !~disallowed.indexOf(match[1].toLowerCase()); } function readAnchorClose(parser, name) { var pos = parser.pos; if (!parser.matchString('')) { parser.pos = pos; return null; } return true; } var inlines = /^\s*(elseif|else|then|catch)\s*/; function readInline(parser, tag) { var pos = parser.pos; if (!parser.matchString(tag.open)) { return; } if (parser.matchPattern(inlines)) { return true; } else { parser.pos = pos; } } function readText(parser) { var index, disallowed, barrier; var remaining = parser.remaining(); if (parser.textOnlyMode) { disallowed = parser.tags.map(function (t) { return t.open; }); disallowed = disallowed.concat(parser.tags.map(function (t) { return '\\' + t.open; })); index = getLowestIndex(remaining, disallowed); } else { barrier = parser.inside ? '", '`'); } else if (parser.inAttribute) { // quoted attribute value disallowed.push(parser.inAttribute); } else { disallowed.push(barrier); } index = getLowestIndex(remaining, disallowed); } } if (!index) { return null; } if (index === -1) { index = remaining.length; } parser.pos += index; if ((parser.inside && parser.inside !== 'textarea') || parser.textOnlyMode) { return remaining.substr(0, index); } else { return decodeCharacterReferences(remaining.substr(0, index)); } } var partialDefinitionSectionPattern = /^\s*#\s*partial\s+/; function readPartialDefinitionSection(parser) { var child, closed; var start = parser.pos; var delimiters = parser.standardDelimiters; if (!parser.matchString(delimiters[0])) { return null; } if (!parser.matchPattern(partialDefinitionSectionPattern)) { parser.pos = start; return null; } var name = parser.matchPattern(/^[a-zA-Z_$][a-zA-Z_$0-9\-\/]*/); if (!name) { parser.error('expected legal partial name'); } parser.sp(); if (!parser.matchString(delimiters[1])) { parser.error(("Expected closing delimiter '" + (delimiters[1]) + "'")); } var content = []; var open = delimiters[0]; var close = delimiters[1]; do { if ((child = readClosing(parser, { open: open, close: close }))) { if (child.r !== 'partial') { parser.error(("Expected " + open + "/partial" + close)); } closed = true; } else { child = parser.read(READERS); if (!child) { parser.error(("Expected " + open + "/partial" + close)); } content.push(child); } } while (!closed); return { t: INLINE_PARTIAL, n: name, f: content }; } function readTemplate(parser) { var fragment = []; var partials = create(null); var hasPartials = false; var preserveWhitespace = parser.preserveWhitespace; while (parser.pos < parser.str.length) { var pos = parser.pos; var item = (void 0), partial = (void 0); if ((partial = parser.read(PARTIAL_READERS))) { if (partials[partial.n]) { parser.pos = pos; parser.error('Duplicated partial definition'); } cleanup( partial.f, parser.stripComments, preserveWhitespace, !preserveWhitespace, !preserveWhitespace, parser.whiteSpaceElements ); partials[partial.n] = partial.f; hasPartials = true; } else if ((item = parser.read(READERS))) { fragment.push(item); } else { parser.error('Unexpected template content'); } } var result = { v: TEMPLATE_VERSION, t: fragment }; if (hasPartials) { result.p = partials; } return result; } function insertExpressions(obj, expr) { keys(obj).forEach(function (key) { if (isExpression(key, obj)) { return addTo(obj, expr); } var ref = obj[key]; if (hasChildren(ref)) { insertExpressions(ref, expr); } }); } function isExpression(key, obj) { return key === 's' && isArray(obj.r); } function addTo(obj, expr) { var s = obj.s; var r = obj.r; if (!expr[s]) { expr[s] = fromExpression(s, r.length); } } function hasChildren(ref) { return isArray(ref) || isObject(ref); } var shared = {}; // See https://github.com/ractivejs/template-spec for information // about the Ractive template specification var STANDARD_READERS = [ readPartial, readUnescaped, readSection, readInterpolator, readComment ]; var TRIPLE_READERS = [readTriple]; var READERS = [readMustache, readHtmlComment, readElement$1, readText]; var PARTIAL_READERS = [readPartialDefinitionSection]; var preserveWhitespaceElements = { pre: 1, script: 1, style: 1, textarea: 1 }; var defaultInterpolate = { textarea: true, script: true, style: true, template: true }; var StandardParser = Parser.extend({ init: function init(str, options) { var tripleDelimiters = options.tripleDelimiters || shared.defaults.tripleDelimiters; var staticDelimiters = options.staticDelimiters || shared.defaults.staticDelimiters; var staticTripleDelimiters = options.staticTripleDelimiters || shared.defaults.staticTripleDelimiters; this.standardDelimiters = options.delimiters || shared.defaults.delimiters; this.tags = [ { isStatic: false, isTriple: false, open: this.standardDelimiters[0], close: this.standardDelimiters[1], readers: STANDARD_READERS }, { isStatic: false, isTriple: true, open: tripleDelimiters[0], close: tripleDelimiters[1], readers: TRIPLE_READERS }, { isStatic: true, isTriple: false, open: staticDelimiters[0], close: staticDelimiters[1], readers: STANDARD_READERS }, { isStatic: true, isTriple: true, open: staticTripleDelimiters[0], close: staticTripleDelimiters[1], readers: TRIPLE_READERS } ]; this.contextLines = options.contextLines || shared.defaults.contextLines; this.sortMustacheTags(); this.sectionDepth = 0; this.elementStack = []; this.interpolate = assign( {}, defaultInterpolate, shared.defaults.interpolate, options.interpolate ); if (options.sanitize === true) { options.sanitize = { // blacklist from https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/lang/html/html4-elements-whitelist.json elements: 'applet base basefont body frame frameset head html isindex link meta noframes noscript object param script style title'.split( ' ' ), eventAttributes: true }; } this.stripComments = options.stripComments !== false; this.preserveWhitespace = isObjectType(options.preserveWhitespace) ? false : options.preserveWhitespace; this.sanitizeElements = options.sanitize && options.sanitize.elements; this.sanitizeEventAttributes = options.sanitize && options.sanitize.eventAttributes; this.includeLinePositions = options.includeLinePositions; this.textOnlyMode = options.textOnlyMode; this.csp = options.csp; this.allowExpressions = options.allowExpressions; this.preserveStandaloneSections = this.preserveWhitespace && options.preserveStandaloneSections; if (options.expression) { this.converters = [readExpression]; } if (options.attributes) { this.inTag = true; } // special whitespace handling requested for certain elements this.whiteSpaceElements = assign({}, options.preserveWhitespace, preserveWhitespaceElements); }, postProcess: function postProcess(result, options) { var parserResult = result[0]; if (options.expression) { var expr = flattenExpression(parserResult); expr.e = fromExpression(expr.s, expr.r.length); return expr; } else { // special case - empty string if (!result.length) { return { t: [], v: TEMPLATE_VERSION }; } if (this.sectionDepth > 0) { this.error('A section was left open'); } cleanup( parserResult.t, this.stripComments, this.preserveWhitespace, !this.preserveWhitespace, !this.preserveWhitespace, this.whiteSpaceElements, this.preserveStandaloneSections ); if (this.csp !== false) { var expr$1 = {}; insertExpressions(parserResult.t, expr$1); insertExpressions(parserResult.p || {}, expr$1); if (keys(expr$1).length) { parserResult.e = expr$1; } } return parserResult; } }, converters: [readTemplate], sortMustacheTags: function sortMustacheTags() { // Sort in order of descending opening delimiter length (longer first), // to protect against opening delimiters being substrings of each other this.tags.sort(function (a, b) { return b.open.length - a.open.length; }); } }); function parse(template, options) { return new StandardParser(template, options || {}).result; } var parseOptions = [ 'delimiters', 'tripleDelimiters', 'staticDelimiters', 'staticTripleDelimiters', 'csp', 'interpolate', 'preserveWhitespace', 'preserveStandaloneSections', 'sanitize', 'stripComments', 'contextLines', 'allowExpressions', 'attributes' ]; var TEMPLATE_INSTRUCTIONS = "Either preparse or use a ractive runtime source that includes the parser. "; var COMPUTATION_INSTRUCTIONS = "Either include a version of Ractive that can parse or convert your computation strings to functions."; function throwNoParse(method, error, instructions) { if (!method) { fatal(("Missing Ractive.parse - cannot parse " + error + ". " + instructions)); } } function createFunction(body, length) { throwNoParse(fromExpression, 'new expression function', TEMPLATE_INSTRUCTIONS); return fromExpression(body, length); } function createFunctionFromString(str, bindTo) { throwNoParse(parse, 'compution string "${str}"', COMPUTATION_INSTRUCTIONS); var tpl = parse(str, { expression: true }); return function() { return tpl.e.apply(bindTo, tpl.r.map(function (r) { return bindTo.get(r); })); }; } var parser = { fromId: function fromId(id, options) { if (!doc) { if (options && options.noThrow) { return; } throw new Error(("Cannot retrieve template #" + id + " as Ractive is not running in a browser.")); } if (id) { id = id.replace(/^#/, ''); } var template; if (!(template = doc.getElementById(id))) { if (options && options.noThrow) { return; } throw new Error(("Could not find template element with id #" + id)); } if (template.tagName.toUpperCase() !== 'SCRIPT') { if (options && options.noThrow) { return; } throw new Error(("Template element with id #" + id + ", must be a