@progress/telerik-angular-report-viewer 26.25.521 → 27.25.813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -1
- package/README.md +21 -10
- package/dist/dependencies/telerikReportViewer.js +1802 -400
- package/dist/dependencies/telerikReportViewerTemplate.html +11 -14
- package/package.json +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
var $ = require("jquery");
|
2
2
|
/*
|
3
|
-
* TelerikReporting v19.
|
3
|
+
* TelerikReporting v19.2.25.813 (https://www.telerik.com/products/reporting.aspx)
|
4
4
|
* Copyright 2025 Progress Software EAD. All rights reserved.
|
5
5
|
*
|
6
6
|
* Telerik Reporting commercial licenses may be obtained at
|
@@ -14,12 +14,1372 @@ var telerikReportViewer = (function (exports) {
|
|
14
14
|
|
15
15
|
var dist = {exports: {}};
|
16
16
|
|
17
|
+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
18
|
+
|
19
|
+
var purify_cjs;
|
20
|
+
var hasRequiredPurify_cjs;
|
21
|
+
|
22
|
+
function requirePurify_cjs () {
|
23
|
+
if (hasRequiredPurify_cjs) return purify_cjs;
|
24
|
+
hasRequiredPurify_cjs = 1;
|
25
|
+
|
26
|
+
const {
|
27
|
+
entries,
|
28
|
+
setPrototypeOf,
|
29
|
+
isFrozen,
|
30
|
+
getPrototypeOf,
|
31
|
+
getOwnPropertyDescriptor
|
32
|
+
} = Object;
|
33
|
+
let {
|
34
|
+
freeze,
|
35
|
+
seal,
|
36
|
+
create
|
37
|
+
} = Object; // eslint-disable-line import/no-mutable-exports
|
38
|
+
let {
|
39
|
+
apply,
|
40
|
+
construct
|
41
|
+
} = typeof Reflect !== 'undefined' && Reflect;
|
42
|
+
if (!freeze) {
|
43
|
+
freeze = function freeze(x) {
|
44
|
+
return x;
|
45
|
+
};
|
46
|
+
}
|
47
|
+
if (!seal) {
|
48
|
+
seal = function seal(x) {
|
49
|
+
return x;
|
50
|
+
};
|
51
|
+
}
|
52
|
+
if (!apply) {
|
53
|
+
apply = function apply(fun, thisValue, args) {
|
54
|
+
return fun.apply(thisValue, args);
|
55
|
+
};
|
56
|
+
}
|
57
|
+
if (!construct) {
|
58
|
+
construct = function construct(Func, args) {
|
59
|
+
return new Func(...args);
|
60
|
+
};
|
61
|
+
}
|
62
|
+
const arrayForEach = unapply(Array.prototype.forEach);
|
63
|
+
const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
64
|
+
const arrayPop = unapply(Array.prototype.pop);
|
65
|
+
const arrayPush = unapply(Array.prototype.push);
|
66
|
+
const arraySplice = unapply(Array.prototype.splice);
|
67
|
+
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
68
|
+
const stringToString = unapply(String.prototype.toString);
|
69
|
+
const stringMatch = unapply(String.prototype.match);
|
70
|
+
const stringReplace = unapply(String.prototype.replace);
|
71
|
+
const stringIndexOf = unapply(String.prototype.indexOf);
|
72
|
+
const stringTrim = unapply(String.prototype.trim);
|
73
|
+
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
74
|
+
const regExpTest = unapply(RegExp.prototype.test);
|
75
|
+
const typeErrorCreate = unconstruct(TypeError);
|
76
|
+
/**
|
77
|
+
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
78
|
+
*
|
79
|
+
* @param func - The function to be wrapped and called.
|
80
|
+
* @returns A new function that calls the given function with a specified thisArg and arguments.
|
81
|
+
*/
|
82
|
+
function unapply(func) {
|
83
|
+
return function (thisArg) {
|
84
|
+
if (thisArg instanceof RegExp) {
|
85
|
+
thisArg.lastIndex = 0;
|
86
|
+
}
|
87
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
88
|
+
args[_key - 1] = arguments[_key];
|
89
|
+
}
|
90
|
+
return apply(func, thisArg, args);
|
91
|
+
};
|
92
|
+
}
|
93
|
+
/**
|
94
|
+
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
95
|
+
*
|
96
|
+
* @param func - The constructor function to be wrapped and called.
|
97
|
+
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
|
98
|
+
*/
|
99
|
+
function unconstruct(func) {
|
100
|
+
return function () {
|
101
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
102
|
+
args[_key2] = arguments[_key2];
|
103
|
+
}
|
104
|
+
return construct(func, args);
|
105
|
+
};
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* Add properties to a lookup table
|
109
|
+
*
|
110
|
+
* @param set - The set to which elements will be added.
|
111
|
+
* @param array - The array containing elements to be added to the set.
|
112
|
+
* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
113
|
+
* @returns The modified set with added elements.
|
114
|
+
*/
|
115
|
+
function addToSet(set, array) {
|
116
|
+
let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
|
117
|
+
if (setPrototypeOf) {
|
118
|
+
// Make 'in' and truthy checks like Boolean(set.constructor)
|
119
|
+
// independent of any properties defined on Object.prototype.
|
120
|
+
// Prevent prototype setters from intercepting set as a this value.
|
121
|
+
setPrototypeOf(set, null);
|
122
|
+
}
|
123
|
+
let l = array.length;
|
124
|
+
while (l--) {
|
125
|
+
let element = array[l];
|
126
|
+
if (typeof element === 'string') {
|
127
|
+
const lcElement = transformCaseFunc(element);
|
128
|
+
if (lcElement !== element) {
|
129
|
+
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
130
|
+
if (!isFrozen(array)) {
|
131
|
+
array[l] = lcElement;
|
132
|
+
}
|
133
|
+
element = lcElement;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
set[element] = true;
|
137
|
+
}
|
138
|
+
return set;
|
139
|
+
}
|
140
|
+
/**
|
141
|
+
* Clean up an array to harden against CSPP
|
142
|
+
*
|
143
|
+
* @param array - The array to be cleaned.
|
144
|
+
* @returns The cleaned version of the array
|
145
|
+
*/
|
146
|
+
function cleanArray(array) {
|
147
|
+
for (let index = 0; index < array.length; index++) {
|
148
|
+
const isPropertyExist = objectHasOwnProperty(array, index);
|
149
|
+
if (!isPropertyExist) {
|
150
|
+
array[index] = null;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
return array;
|
154
|
+
}
|
155
|
+
/**
|
156
|
+
* Shallow clone an object
|
157
|
+
*
|
158
|
+
* @param object - The object to be cloned.
|
159
|
+
* @returns A new object that copies the original.
|
160
|
+
*/
|
161
|
+
function clone(object) {
|
162
|
+
const newObject = create(null);
|
163
|
+
for (const [property, value] of entries(object)) {
|
164
|
+
const isPropertyExist = objectHasOwnProperty(object, property);
|
165
|
+
if (isPropertyExist) {
|
166
|
+
if (Array.isArray(value)) {
|
167
|
+
newObject[property] = cleanArray(value);
|
168
|
+
} else if (value && typeof value === 'object' && value.constructor === Object) {
|
169
|
+
newObject[property] = clone(value);
|
170
|
+
} else {
|
171
|
+
newObject[property] = value;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
return newObject;
|
176
|
+
}
|
177
|
+
/**
|
178
|
+
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
179
|
+
*
|
180
|
+
* @param object - The object to look up the getter function in its prototype chain.
|
181
|
+
* @param prop - The property name for which to find the getter function.
|
182
|
+
* @returns The getter function found in the prototype chain or a fallback function.
|
183
|
+
*/
|
184
|
+
function lookupGetter(object, prop) {
|
185
|
+
while (object !== null) {
|
186
|
+
const desc = getOwnPropertyDescriptor(object, prop);
|
187
|
+
if (desc) {
|
188
|
+
if (desc.get) {
|
189
|
+
return unapply(desc.get);
|
190
|
+
}
|
191
|
+
if (typeof desc.value === 'function') {
|
192
|
+
return unapply(desc.value);
|
193
|
+
}
|
194
|
+
}
|
195
|
+
object = getPrototypeOf(object);
|
196
|
+
}
|
197
|
+
function fallbackValue() {
|
198
|
+
return null;
|
199
|
+
}
|
200
|
+
return fallbackValue;
|
201
|
+
}
|
202
|
+
|
203
|
+
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
204
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
205
|
+
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
206
|
+
// List of SVG elements that are disallowed by default.
|
207
|
+
// We still need to know them so that we can do namespace
|
208
|
+
// checks properly in case one wants to add them to
|
209
|
+
// allow-list.
|
210
|
+
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
211
|
+
const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
|
212
|
+
// Similarly to SVG, we want to know all MathML elements,
|
213
|
+
// even those that we disallow by default.
|
214
|
+
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
215
|
+
const text = freeze(['#text']);
|
216
|
+
|
217
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
218
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
219
|
+
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
220
|
+
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
221
|
+
|
222
|
+
// eslint-disable-next-line unicorn/better-regex
|
223
|
+
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
224
|
+
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
225
|
+
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
226
|
+
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
227
|
+
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
228
|
+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
229
|
+
);
|
230
|
+
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
231
|
+
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
232
|
+
);
|
233
|
+
const DOCTYPE_NAME = seal(/^html$/i);
|
234
|
+
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
235
|
+
|
236
|
+
var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
237
|
+
__proto__: null,
|
238
|
+
ARIA_ATTR: ARIA_ATTR,
|
239
|
+
ATTR_WHITESPACE: ATTR_WHITESPACE,
|
240
|
+
CUSTOM_ELEMENT: CUSTOM_ELEMENT,
|
241
|
+
DATA_ATTR: DATA_ATTR,
|
242
|
+
DOCTYPE_NAME: DOCTYPE_NAME,
|
243
|
+
ERB_EXPR: ERB_EXPR,
|
244
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI,
|
245
|
+
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
|
246
|
+
MUSTACHE_EXPR: MUSTACHE_EXPR,
|
247
|
+
TMPLIT_EXPR: TMPLIT_EXPR
|
248
|
+
});
|
249
|
+
|
250
|
+
/* eslint-disable @typescript-eslint/indent */
|
251
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
252
|
+
const NODE_TYPE = {
|
253
|
+
element: 1,
|
254
|
+
attribute: 2,
|
255
|
+
text: 3,
|
256
|
+
cdataSection: 4,
|
257
|
+
entityReference: 5,
|
258
|
+
// Deprecated
|
259
|
+
entityNode: 6,
|
260
|
+
// Deprecated
|
261
|
+
progressingInstruction: 7,
|
262
|
+
comment: 8,
|
263
|
+
document: 9,
|
264
|
+
documentType: 10,
|
265
|
+
documentFragment: 11,
|
266
|
+
notation: 12 // Deprecated
|
267
|
+
};
|
268
|
+
const getGlobal = function getGlobal() {
|
269
|
+
return typeof window === 'undefined' ? null : window;
|
270
|
+
};
|
271
|
+
/**
|
272
|
+
* Creates a no-op policy for internal use only.
|
273
|
+
* Don't export this function outside this module!
|
274
|
+
* @param trustedTypes The policy factory.
|
275
|
+
* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
276
|
+
* @return The policy created (or null, if Trusted Types
|
277
|
+
* are not supported or creating the policy failed).
|
278
|
+
*/
|
279
|
+
const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
|
280
|
+
if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
281
|
+
return null;
|
282
|
+
}
|
283
|
+
// Allow the callers to control the unique policy name
|
284
|
+
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
285
|
+
// Policy creation with duplicate names throws in Trusted Types.
|
286
|
+
let suffix = null;
|
287
|
+
const ATTR_NAME = 'data-tt-policy-suffix';
|
288
|
+
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
289
|
+
suffix = purifyHostElement.getAttribute(ATTR_NAME);
|
290
|
+
}
|
291
|
+
const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
|
292
|
+
try {
|
293
|
+
return trustedTypes.createPolicy(policyName, {
|
294
|
+
createHTML(html) {
|
295
|
+
return html;
|
296
|
+
},
|
297
|
+
createScriptURL(scriptUrl) {
|
298
|
+
return scriptUrl;
|
299
|
+
}
|
300
|
+
});
|
301
|
+
} catch (_) {
|
302
|
+
// Policy creation failed (most likely another DOMPurify script has
|
303
|
+
// already run). Skip creating the policy, as this will only cause errors
|
304
|
+
// if TT are enforced.
|
305
|
+
console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
|
306
|
+
return null;
|
307
|
+
}
|
308
|
+
};
|
309
|
+
const _createHooksMap = function _createHooksMap() {
|
310
|
+
return {
|
311
|
+
afterSanitizeAttributes: [],
|
312
|
+
afterSanitizeElements: [],
|
313
|
+
afterSanitizeShadowDOM: [],
|
314
|
+
beforeSanitizeAttributes: [],
|
315
|
+
beforeSanitizeElements: [],
|
316
|
+
beforeSanitizeShadowDOM: [],
|
317
|
+
uponSanitizeAttribute: [],
|
318
|
+
uponSanitizeElement: [],
|
319
|
+
uponSanitizeShadowNode: []
|
320
|
+
};
|
321
|
+
};
|
322
|
+
function createDOMPurify() {
|
323
|
+
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
324
|
+
const DOMPurify = root => createDOMPurify(root);
|
325
|
+
DOMPurify.version = '3.2.6';
|
326
|
+
DOMPurify.removed = [];
|
327
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
328
|
+
// Not running in a browser, provide a factory function
|
329
|
+
// so that you can pass your own Window
|
330
|
+
DOMPurify.isSupported = false;
|
331
|
+
return DOMPurify;
|
332
|
+
}
|
333
|
+
let {
|
334
|
+
document
|
335
|
+
} = window;
|
336
|
+
const originalDocument = document;
|
337
|
+
const currentScript = originalDocument.currentScript;
|
338
|
+
const {
|
339
|
+
DocumentFragment,
|
340
|
+
HTMLTemplateElement,
|
341
|
+
Node,
|
342
|
+
Element,
|
343
|
+
NodeFilter,
|
344
|
+
NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
|
345
|
+
HTMLFormElement,
|
346
|
+
DOMParser,
|
347
|
+
trustedTypes
|
348
|
+
} = window;
|
349
|
+
const ElementPrototype = Element.prototype;
|
350
|
+
const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
|
351
|
+
const remove = lookupGetter(ElementPrototype, 'remove');
|
352
|
+
const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
|
353
|
+
const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
|
354
|
+
const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
|
355
|
+
// As per issue #47, the web-components registry is inherited by a
|
356
|
+
// new document created via createHTMLDocument. As per the spec
|
357
|
+
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
358
|
+
// a new empty registry is used when creating a template contents owner
|
359
|
+
// document, so we use that as our parent document to ensure nothing
|
360
|
+
// is inherited.
|
361
|
+
if (typeof HTMLTemplateElement === 'function') {
|
362
|
+
const template = document.createElement('template');
|
363
|
+
if (template.content && template.content.ownerDocument) {
|
364
|
+
document = template.content.ownerDocument;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
let trustedTypesPolicy;
|
368
|
+
let emptyHTML = '';
|
369
|
+
const {
|
370
|
+
implementation,
|
371
|
+
createNodeIterator,
|
372
|
+
createDocumentFragment,
|
373
|
+
getElementsByTagName
|
374
|
+
} = document;
|
375
|
+
const {
|
376
|
+
importNode
|
377
|
+
} = originalDocument;
|
378
|
+
let hooks = _createHooksMap();
|
379
|
+
/**
|
380
|
+
* Expose whether this browser supports running the full DOMPurify.
|
381
|
+
*/
|
382
|
+
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
|
383
|
+
const {
|
384
|
+
MUSTACHE_EXPR,
|
385
|
+
ERB_EXPR,
|
386
|
+
TMPLIT_EXPR,
|
387
|
+
DATA_ATTR,
|
388
|
+
ARIA_ATTR,
|
389
|
+
IS_SCRIPT_OR_DATA,
|
390
|
+
ATTR_WHITESPACE,
|
391
|
+
CUSTOM_ELEMENT
|
392
|
+
} = EXPRESSIONS;
|
393
|
+
let {
|
394
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
395
|
+
} = EXPRESSIONS;
|
396
|
+
/**
|
397
|
+
* We consider the elements and attributes below to be safe. Ideally
|
398
|
+
* don't add any new ones but feel free to remove unwanted ones.
|
399
|
+
*/
|
400
|
+
/* allowed element names */
|
401
|
+
let ALLOWED_TAGS = null;
|
402
|
+
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
403
|
+
/* Allowed attribute names */
|
404
|
+
let ALLOWED_ATTR = null;
|
405
|
+
const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
|
406
|
+
/*
|
407
|
+
* Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
|
408
|
+
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
409
|
+
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
410
|
+
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
411
|
+
*/
|
412
|
+
let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
413
|
+
tagNameCheck: {
|
414
|
+
writable: true,
|
415
|
+
configurable: false,
|
416
|
+
enumerable: true,
|
417
|
+
value: null
|
418
|
+
},
|
419
|
+
attributeNameCheck: {
|
420
|
+
writable: true,
|
421
|
+
configurable: false,
|
422
|
+
enumerable: true,
|
423
|
+
value: null
|
424
|
+
},
|
425
|
+
allowCustomizedBuiltInElements: {
|
426
|
+
writable: true,
|
427
|
+
configurable: false,
|
428
|
+
enumerable: true,
|
429
|
+
value: false
|
430
|
+
}
|
431
|
+
}));
|
432
|
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
433
|
+
let FORBID_TAGS = null;
|
434
|
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
435
|
+
let FORBID_ATTR = null;
|
436
|
+
/* Decide if ARIA attributes are okay */
|
437
|
+
let ALLOW_ARIA_ATTR = true;
|
438
|
+
/* Decide if custom data attributes are okay */
|
439
|
+
let ALLOW_DATA_ATTR = true;
|
440
|
+
/* Decide if unknown protocols are okay */
|
441
|
+
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
442
|
+
/* Decide if self-closing tags in attributes are allowed.
|
443
|
+
* Usually removed due to a mXSS issue in jQuery 3.0 */
|
444
|
+
let ALLOW_SELF_CLOSE_IN_ATTR = true;
|
445
|
+
/* Output should be safe for common template engines.
|
446
|
+
* This means, DOMPurify removes data attributes, mustaches and ERB
|
447
|
+
*/
|
448
|
+
let SAFE_FOR_TEMPLATES = false;
|
449
|
+
/* Output should be safe even for XML used within HTML and alike.
|
450
|
+
* This means, DOMPurify removes comments when containing risky content.
|
451
|
+
*/
|
452
|
+
let SAFE_FOR_XML = true;
|
453
|
+
/* Decide if document with <html>... should be returned */
|
454
|
+
let WHOLE_DOCUMENT = false;
|
455
|
+
/* Track whether config is already set on this instance of DOMPurify. */
|
456
|
+
let SET_CONFIG = false;
|
457
|
+
/* Decide if all elements (e.g. style, script) must be children of
|
458
|
+
* document.body. By default, browsers might move them to document.head */
|
459
|
+
let FORCE_BODY = false;
|
460
|
+
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
461
|
+
* string (or a TrustedHTML object if Trusted Types are supported).
|
462
|
+
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
463
|
+
*/
|
464
|
+
let RETURN_DOM = false;
|
465
|
+
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
466
|
+
* string (or a TrustedHTML object if Trusted Types are supported) */
|
467
|
+
let RETURN_DOM_FRAGMENT = false;
|
468
|
+
/* Try to return a Trusted Type object instead of a string, return a string in
|
469
|
+
* case Trusted Types are not supported */
|
470
|
+
let RETURN_TRUSTED_TYPE = false;
|
471
|
+
/* Output should be free from DOM clobbering attacks?
|
472
|
+
* This sanitizes markups named with colliding, clobberable built-in DOM APIs.
|
473
|
+
*/
|
474
|
+
let SANITIZE_DOM = true;
|
475
|
+
/* Achieve full DOM Clobbering protection by isolating the namespace of named
|
476
|
+
* properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
|
477
|
+
*
|
478
|
+
* HTML/DOM spec rules that enable DOM Clobbering:
|
479
|
+
* - Named Access on Window (§7.3.3)
|
480
|
+
* - DOM Tree Accessors (§3.1.5)
|
481
|
+
* - Form Element Parent-Child Relations (§4.10.3)
|
482
|
+
* - Iframe srcdoc / Nested WindowProxies (§4.8.5)
|
483
|
+
* - HTMLCollection (§4.2.10.2)
|
484
|
+
*
|
485
|
+
* Namespace isolation is implemented by prefixing `id` and `name` attributes
|
486
|
+
* with a constant string, i.e., `user-content-`
|
487
|
+
*/
|
488
|
+
let SANITIZE_NAMED_PROPS = false;
|
489
|
+
const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
|
490
|
+
/* Keep element content when removing element? */
|
491
|
+
let KEEP_CONTENT = true;
|
492
|
+
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
493
|
+
* of importing it into a new Document and returning a sanitized copy */
|
494
|
+
let IN_PLACE = false;
|
495
|
+
/* Allow usage of profiles like html, svg and mathMl */
|
496
|
+
let USE_PROFILES = {};
|
497
|
+
/* Tags to ignore content of when KEEP_CONTENT is true */
|
498
|
+
let FORBID_CONTENTS = null;
|
499
|
+
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
500
|
+
/* Tags that are safe for data: URIs */
|
501
|
+
let DATA_URI_TAGS = null;
|
502
|
+
const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
503
|
+
/* Attributes safe for values like "javascript:" */
|
504
|
+
let URI_SAFE_ATTRIBUTES = null;
|
505
|
+
const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
|
506
|
+
const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
507
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
508
|
+
const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
509
|
+
/* Document namespace */
|
510
|
+
let NAMESPACE = HTML_NAMESPACE;
|
511
|
+
let IS_EMPTY_INPUT = false;
|
512
|
+
/* Allowed XHTML+XML namespaces */
|
513
|
+
let ALLOWED_NAMESPACES = null;
|
514
|
+
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
515
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
|
516
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
|
517
|
+
// Certain elements are allowed in both SVG and HTML
|
518
|
+
// namespace. We need to specify them explicitly
|
519
|
+
// so that they don't get erroneously deleted from
|
520
|
+
// HTML namespace.
|
521
|
+
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
|
522
|
+
/* Parsing of strict XHTML documents */
|
523
|
+
let PARSER_MEDIA_TYPE = null;
|
524
|
+
const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
525
|
+
const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
526
|
+
let transformCaseFunc = null;
|
527
|
+
/* Keep a reference to config to pass to hooks */
|
528
|
+
let CONFIG = null;
|
529
|
+
/* Ideally, do not touch anything below this line */
|
530
|
+
/* ______________________________________________ */
|
531
|
+
const formElement = document.createElement('form');
|
532
|
+
const isRegexOrFunction = function isRegexOrFunction(testValue) {
|
533
|
+
return testValue instanceof RegExp || testValue instanceof Function;
|
534
|
+
};
|
535
|
+
/**
|
536
|
+
* _parseConfig
|
537
|
+
*
|
538
|
+
* @param cfg optional config literal
|
539
|
+
*/
|
540
|
+
// eslint-disable-next-line complexity
|
541
|
+
const _parseConfig = function _parseConfig() {
|
542
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
543
|
+
if (CONFIG && CONFIG === cfg) {
|
544
|
+
return;
|
545
|
+
}
|
546
|
+
/* Shield configuration object from tampering */
|
547
|
+
if (!cfg || typeof cfg !== 'object') {
|
548
|
+
cfg = {};
|
549
|
+
}
|
550
|
+
/* Shield configuration object from prototype pollution */
|
551
|
+
cfg = clone(cfg);
|
552
|
+
PARSER_MEDIA_TYPE =
|
553
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
554
|
+
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
555
|
+
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
556
|
+
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
557
|
+
/* Set configuration parameters */
|
558
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
559
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
560
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
561
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
562
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
563
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
564
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
565
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
566
|
+
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
567
|
+
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
568
|
+
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
569
|
+
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
|
570
|
+
ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
|
571
|
+
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
|
572
|
+
SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
|
573
|
+
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
|
574
|
+
RETURN_DOM = cfg.RETURN_DOM || false; // Default false
|
575
|
+
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
|
576
|
+
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
|
577
|
+
FORCE_BODY = cfg.FORCE_BODY || false; // Default false
|
578
|
+
SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
|
579
|
+
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
|
580
|
+
KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
|
581
|
+
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
582
|
+
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
|
583
|
+
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
584
|
+
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
|
585
|
+
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
|
586
|
+
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
|
587
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
588
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
589
|
+
}
|
590
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
591
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
592
|
+
}
|
593
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
|
594
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
595
|
+
}
|
596
|
+
if (SAFE_FOR_TEMPLATES) {
|
597
|
+
ALLOW_DATA_ATTR = false;
|
598
|
+
}
|
599
|
+
if (RETURN_DOM_FRAGMENT) {
|
600
|
+
RETURN_DOM = true;
|
601
|
+
}
|
602
|
+
/* Parse profile info */
|
603
|
+
if (USE_PROFILES) {
|
604
|
+
ALLOWED_TAGS = addToSet({}, text);
|
605
|
+
ALLOWED_ATTR = [];
|
606
|
+
if (USE_PROFILES.html === true) {
|
607
|
+
addToSet(ALLOWED_TAGS, html$1);
|
608
|
+
addToSet(ALLOWED_ATTR, html);
|
609
|
+
}
|
610
|
+
if (USE_PROFILES.svg === true) {
|
611
|
+
addToSet(ALLOWED_TAGS, svg$1);
|
612
|
+
addToSet(ALLOWED_ATTR, svg);
|
613
|
+
addToSet(ALLOWED_ATTR, xml);
|
614
|
+
}
|
615
|
+
if (USE_PROFILES.svgFilters === true) {
|
616
|
+
addToSet(ALLOWED_TAGS, svgFilters);
|
617
|
+
addToSet(ALLOWED_ATTR, svg);
|
618
|
+
addToSet(ALLOWED_ATTR, xml);
|
619
|
+
}
|
620
|
+
if (USE_PROFILES.mathMl === true) {
|
621
|
+
addToSet(ALLOWED_TAGS, mathMl$1);
|
622
|
+
addToSet(ALLOWED_ATTR, mathMl);
|
623
|
+
addToSet(ALLOWED_ATTR, xml);
|
624
|
+
}
|
625
|
+
}
|
626
|
+
/* Merge configuration parameters */
|
627
|
+
if (cfg.ADD_TAGS) {
|
628
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
629
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
630
|
+
}
|
631
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
632
|
+
}
|
633
|
+
if (cfg.ADD_ATTR) {
|
634
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
635
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
636
|
+
}
|
637
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
638
|
+
}
|
639
|
+
if (cfg.ADD_URI_SAFE_ATTR) {
|
640
|
+
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
641
|
+
}
|
642
|
+
if (cfg.FORBID_CONTENTS) {
|
643
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
644
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
645
|
+
}
|
646
|
+
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
647
|
+
}
|
648
|
+
/* Add #text in case KEEP_CONTENT is set to true */
|
649
|
+
if (KEEP_CONTENT) {
|
650
|
+
ALLOWED_TAGS['#text'] = true;
|
651
|
+
}
|
652
|
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
653
|
+
if (WHOLE_DOCUMENT) {
|
654
|
+
addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
|
655
|
+
}
|
656
|
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
657
|
+
if (ALLOWED_TAGS.table) {
|
658
|
+
addToSet(ALLOWED_TAGS, ['tbody']);
|
659
|
+
delete FORBID_TAGS.tbody;
|
660
|
+
}
|
661
|
+
if (cfg.TRUSTED_TYPES_POLICY) {
|
662
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
663
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
664
|
+
}
|
665
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
666
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
667
|
+
}
|
668
|
+
// Overwrite existing TrustedTypes policy.
|
669
|
+
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
670
|
+
// Sign local variables required by `sanitize`.
|
671
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
672
|
+
} else {
|
673
|
+
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
674
|
+
if (trustedTypesPolicy === undefined) {
|
675
|
+
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
676
|
+
}
|
677
|
+
// If creating the internal policy succeeded sign internal variables.
|
678
|
+
if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
|
679
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
680
|
+
}
|
681
|
+
}
|
682
|
+
// Prevent further manipulation of configuration.
|
683
|
+
// Not available in IE8, Safari 5, etc.
|
684
|
+
if (freeze) {
|
685
|
+
freeze(cfg);
|
686
|
+
}
|
687
|
+
CONFIG = cfg;
|
688
|
+
};
|
689
|
+
/* Keep track of all possible SVG and MathML tags
|
690
|
+
* so that we can perform the namespace checks
|
691
|
+
* correctly. */
|
692
|
+
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
693
|
+
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
694
|
+
/**
|
695
|
+
* @param element a DOM element whose namespace is being checked
|
696
|
+
* @returns Return false if the element has a
|
697
|
+
* namespace that a spec-compliant parser would never
|
698
|
+
* return. Return true otherwise.
|
699
|
+
*/
|
700
|
+
const _checkValidNamespace = function _checkValidNamespace(element) {
|
701
|
+
let parent = getParentNode(element);
|
702
|
+
// In JSDOM, if we're inside shadow DOM, then parentNode
|
703
|
+
// can be null. We just simulate parent in this case.
|
704
|
+
if (!parent || !parent.tagName) {
|
705
|
+
parent = {
|
706
|
+
namespaceURI: NAMESPACE,
|
707
|
+
tagName: 'template'
|
708
|
+
};
|
709
|
+
}
|
710
|
+
const tagName = stringToLowerCase(element.tagName);
|
711
|
+
const parentTagName = stringToLowerCase(parent.tagName);
|
712
|
+
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
713
|
+
return false;
|
714
|
+
}
|
715
|
+
if (element.namespaceURI === SVG_NAMESPACE) {
|
716
|
+
// The only way to switch from HTML namespace to SVG
|
717
|
+
// is via <svg>. If it happens via any other tag, then
|
718
|
+
// it should be killed.
|
719
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
720
|
+
return tagName === 'svg';
|
721
|
+
}
|
722
|
+
// The only way to switch from MathML to SVG is via`
|
723
|
+
// svg if parent is either <annotation-xml> or MathML
|
724
|
+
// text integration points.
|
725
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
726
|
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
727
|
+
}
|
728
|
+
// We only allow elements that are defined in SVG
|
729
|
+
// spec. All others are disallowed in SVG namespace.
|
730
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
731
|
+
}
|
732
|
+
if (element.namespaceURI === MATHML_NAMESPACE) {
|
733
|
+
// The only way to switch from HTML namespace to MathML
|
734
|
+
// is via <math>. If it happens via any other tag, then
|
735
|
+
// it should be killed.
|
736
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
737
|
+
return tagName === 'math';
|
738
|
+
}
|
739
|
+
// The only way to switch from SVG to MathML is via
|
740
|
+
// <math> and HTML integration points
|
741
|
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
742
|
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
743
|
+
}
|
744
|
+
// We only allow elements that are defined in MathML
|
745
|
+
// spec. All others are disallowed in MathML namespace.
|
746
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
747
|
+
}
|
748
|
+
if (element.namespaceURI === HTML_NAMESPACE) {
|
749
|
+
// The only way to switch from SVG to HTML is via
|
750
|
+
// HTML integration points, and from MathML to HTML
|
751
|
+
// is via MathML text integration points
|
752
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
753
|
+
return false;
|
754
|
+
}
|
755
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
756
|
+
return false;
|
757
|
+
}
|
758
|
+
// We disallow tags that are specific for MathML
|
759
|
+
// or SVG and should never appear in HTML namespace
|
760
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
761
|
+
}
|
762
|
+
// For XHTML and XML documents that support custom namespaces
|
763
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
764
|
+
return true;
|
765
|
+
}
|
766
|
+
// The code should never reach this place (this means
|
767
|
+
// that the element somehow got namespace that is not
|
768
|
+
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
769
|
+
// Return false just in case.
|
770
|
+
return false;
|
771
|
+
};
|
772
|
+
/**
|
773
|
+
* _forceRemove
|
774
|
+
*
|
775
|
+
* @param node a DOM node
|
776
|
+
*/
|
777
|
+
const _forceRemove = function _forceRemove(node) {
|
778
|
+
arrayPush(DOMPurify.removed, {
|
779
|
+
element: node
|
780
|
+
});
|
781
|
+
try {
|
782
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
783
|
+
getParentNode(node).removeChild(node);
|
784
|
+
} catch (_) {
|
785
|
+
remove(node);
|
786
|
+
}
|
787
|
+
};
|
788
|
+
/**
|
789
|
+
* _removeAttribute
|
790
|
+
*
|
791
|
+
* @param name an Attribute name
|
792
|
+
* @param element a DOM node
|
793
|
+
*/
|
794
|
+
const _removeAttribute = function _removeAttribute(name, element) {
|
795
|
+
try {
|
796
|
+
arrayPush(DOMPurify.removed, {
|
797
|
+
attribute: element.getAttributeNode(name),
|
798
|
+
from: element
|
799
|
+
});
|
800
|
+
} catch (_) {
|
801
|
+
arrayPush(DOMPurify.removed, {
|
802
|
+
attribute: null,
|
803
|
+
from: element
|
804
|
+
});
|
805
|
+
}
|
806
|
+
element.removeAttribute(name);
|
807
|
+
// We void attribute values for unremovable "is" attributes
|
808
|
+
if (name === 'is') {
|
809
|
+
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
810
|
+
try {
|
811
|
+
_forceRemove(element);
|
812
|
+
} catch (_) {}
|
813
|
+
} else {
|
814
|
+
try {
|
815
|
+
element.setAttribute(name, '');
|
816
|
+
} catch (_) {}
|
817
|
+
}
|
818
|
+
}
|
819
|
+
};
|
820
|
+
/**
|
821
|
+
* _initDocument
|
822
|
+
*
|
823
|
+
* @param dirty - a string of dirty markup
|
824
|
+
* @return a DOM, filled with the dirty markup
|
825
|
+
*/
|
826
|
+
const _initDocument = function _initDocument(dirty) {
|
827
|
+
/* Create a HTML document */
|
828
|
+
let doc = null;
|
829
|
+
let leadingWhitespace = null;
|
830
|
+
if (FORCE_BODY) {
|
831
|
+
dirty = '<remove></remove>' + dirty;
|
832
|
+
} else {
|
833
|
+
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
834
|
+
const matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
835
|
+
leadingWhitespace = matches && matches[0];
|
836
|
+
}
|
837
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
|
838
|
+
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
839
|
+
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
|
840
|
+
}
|
841
|
+
const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
842
|
+
/*
|
843
|
+
* Use the DOMParser API by default, fallback later if needs be
|
844
|
+
* DOMParser not work for svg when has multiple root element.
|
845
|
+
*/
|
846
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
847
|
+
try {
|
848
|
+
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
849
|
+
} catch (_) {}
|
850
|
+
}
|
851
|
+
/* Use createHTMLDocument in case DOMParser is not available */
|
852
|
+
if (!doc || !doc.documentElement) {
|
853
|
+
doc = implementation.createDocument(NAMESPACE, 'template', null);
|
854
|
+
try {
|
855
|
+
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
|
856
|
+
} catch (_) {
|
857
|
+
// Syntax error if dirtyPayload is invalid xml
|
858
|
+
}
|
859
|
+
}
|
860
|
+
const body = doc.body || doc.documentElement;
|
861
|
+
if (dirty && leadingWhitespace) {
|
862
|
+
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
863
|
+
}
|
864
|
+
/* Work on whole document or just its body */
|
865
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
866
|
+
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
|
867
|
+
}
|
868
|
+
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
869
|
+
};
|
870
|
+
/**
|
871
|
+
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
872
|
+
*
|
873
|
+
* @param root The root element or node to start traversing on.
|
874
|
+
* @return The created NodeIterator
|
875
|
+
*/
|
876
|
+
const _createNodeIterator = function _createNodeIterator(root) {
|
877
|
+
return createNodeIterator.call(root.ownerDocument || root, root,
|
878
|
+
// eslint-disable-next-line no-bitwise
|
879
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
880
|
+
};
|
881
|
+
/**
|
882
|
+
* _isClobbered
|
883
|
+
*
|
884
|
+
* @param element element to check for clobbering attacks
|
885
|
+
* @return true if clobbered, false if safe
|
886
|
+
*/
|
887
|
+
const _isClobbered = function _isClobbered(element) {
|
888
|
+
return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
|
889
|
+
};
|
890
|
+
/**
|
891
|
+
* Checks whether the given object is a DOM node.
|
892
|
+
*
|
893
|
+
* @param value object to check whether it's a DOM node
|
894
|
+
* @return true is object is a DOM node
|
895
|
+
*/
|
896
|
+
const _isNode = function _isNode(value) {
|
897
|
+
return typeof Node === 'function' && value instanceof Node;
|
898
|
+
};
|
899
|
+
function _executeHooks(hooks, currentNode, data) {
|
900
|
+
arrayForEach(hooks, hook => {
|
901
|
+
hook.call(DOMPurify, currentNode, data, CONFIG);
|
902
|
+
});
|
903
|
+
}
|
904
|
+
/**
|
905
|
+
* _sanitizeElements
|
906
|
+
*
|
907
|
+
* @protect nodeName
|
908
|
+
* @protect textContent
|
909
|
+
* @protect removeChild
|
910
|
+
* @param currentNode to check for permission to exist
|
911
|
+
* @return true if node was killed, false if left alive
|
912
|
+
*/
|
913
|
+
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
914
|
+
let content = null;
|
915
|
+
/* Execute a hook if present */
|
916
|
+
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
917
|
+
/* Check if element is clobbered or can clobber */
|
918
|
+
if (_isClobbered(currentNode)) {
|
919
|
+
_forceRemove(currentNode);
|
920
|
+
return true;
|
921
|
+
}
|
922
|
+
/* Now let's check the element's type and name */
|
923
|
+
const tagName = transformCaseFunc(currentNode.nodeName);
|
924
|
+
/* Execute a hook if present */
|
925
|
+
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
926
|
+
tagName,
|
927
|
+
allowedTags: ALLOWED_TAGS
|
928
|
+
});
|
929
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
930
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
931
|
+
_forceRemove(currentNode);
|
932
|
+
return true;
|
933
|
+
}
|
934
|
+
/* Remove any occurrence of processing instructions */
|
935
|
+
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
936
|
+
_forceRemove(currentNode);
|
937
|
+
return true;
|
938
|
+
}
|
939
|
+
/* Remove any kind of possibly harmful comments */
|
940
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
941
|
+
_forceRemove(currentNode);
|
942
|
+
return true;
|
943
|
+
}
|
944
|
+
/* Remove element if anything forbids its presence */
|
945
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
946
|
+
/* Check if we have a custom element to handle */
|
947
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
948
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
949
|
+
return false;
|
950
|
+
}
|
951
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
952
|
+
return false;
|
953
|
+
}
|
954
|
+
}
|
955
|
+
/* Keep content except for bad-listed elements */
|
956
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
957
|
+
const parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
958
|
+
const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
959
|
+
if (childNodes && parentNode) {
|
960
|
+
const childCount = childNodes.length;
|
961
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
962
|
+
const childClone = cloneNode(childNodes[i], true);
|
963
|
+
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
964
|
+
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
965
|
+
}
|
966
|
+
}
|
967
|
+
}
|
968
|
+
_forceRemove(currentNode);
|
969
|
+
return true;
|
970
|
+
}
|
971
|
+
/* Check whether element has a valid namespace */
|
972
|
+
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
973
|
+
_forceRemove(currentNode);
|
974
|
+
return true;
|
975
|
+
}
|
976
|
+
/* Make sure that older browsers don't get fallback-tag mXSS */
|
977
|
+
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
|
978
|
+
_forceRemove(currentNode);
|
979
|
+
return true;
|
980
|
+
}
|
981
|
+
/* Sanitize element content to be template-safe */
|
982
|
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
983
|
+
/* Get the element's text content */
|
984
|
+
content = currentNode.textContent;
|
985
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
986
|
+
content = stringReplace(content, expr, ' ');
|
987
|
+
});
|
988
|
+
if (currentNode.textContent !== content) {
|
989
|
+
arrayPush(DOMPurify.removed, {
|
990
|
+
element: currentNode.cloneNode()
|
991
|
+
});
|
992
|
+
currentNode.textContent = content;
|
993
|
+
}
|
994
|
+
}
|
995
|
+
/* Execute a hook if present */
|
996
|
+
_executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
997
|
+
return false;
|
998
|
+
};
|
999
|
+
/**
|
1000
|
+
* _isValidAttribute
|
1001
|
+
*
|
1002
|
+
* @param lcTag Lowercase tag name of containing element.
|
1003
|
+
* @param lcName Lowercase attribute name.
|
1004
|
+
* @param value Attribute value.
|
1005
|
+
* @return Returns true if `value` is valid, otherwise false.
|
1006
|
+
*/
|
1007
|
+
// eslint-disable-next-line complexity
|
1008
|
+
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
1009
|
+
/* Make sure attribute cannot clobber */
|
1010
|
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
1011
|
+
return false;
|
1012
|
+
}
|
1013
|
+
/* Allow valid data-* attributes: At least one character after "-"
|
1014
|
+
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
1015
|
+
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
1016
|
+
We don't need to check the value; it's always URI safe. */
|
1017
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
1018
|
+
if (
|
1019
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
1020
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
1021
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
1022
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
|
1023
|
+
// Alternative, second condition checks if it's an `is`-attribute, AND
|
1024
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
1025
|
+
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
1026
|
+
return false;
|
1027
|
+
}
|
1028
|
+
/* Check value is safe. First, is attr inert? If so, is safe */
|
1029
|
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
|
1030
|
+
return false;
|
1031
|
+
} else ;
|
1032
|
+
return true;
|
1033
|
+
};
|
1034
|
+
/**
|
1035
|
+
* _isBasicCustomElement
|
1036
|
+
* checks if at least one dash is included in tagName, and it's not the first char
|
1037
|
+
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
1038
|
+
*
|
1039
|
+
* @param tagName name of the tag of the node to sanitize
|
1040
|
+
* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
1041
|
+
*/
|
1042
|
+
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
1043
|
+
return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
|
1044
|
+
};
|
1045
|
+
/**
|
1046
|
+
* _sanitizeAttributes
|
1047
|
+
*
|
1048
|
+
* @protect attributes
|
1049
|
+
* @protect nodeName
|
1050
|
+
* @protect removeAttribute
|
1051
|
+
* @protect setAttribute
|
1052
|
+
*
|
1053
|
+
* @param currentNode to sanitize
|
1054
|
+
*/
|
1055
|
+
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
1056
|
+
/* Execute a hook if present */
|
1057
|
+
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
1058
|
+
const {
|
1059
|
+
attributes
|
1060
|
+
} = currentNode;
|
1061
|
+
/* Check if we have attributes; if not we might have a text node */
|
1062
|
+
if (!attributes || _isClobbered(currentNode)) {
|
1063
|
+
return;
|
1064
|
+
}
|
1065
|
+
const hookEvent = {
|
1066
|
+
attrName: '',
|
1067
|
+
attrValue: '',
|
1068
|
+
keepAttr: true,
|
1069
|
+
allowedAttributes: ALLOWED_ATTR,
|
1070
|
+
forceKeepAttr: undefined
|
1071
|
+
};
|
1072
|
+
let l = attributes.length;
|
1073
|
+
/* Go backwards over all attributes; safely remove bad ones */
|
1074
|
+
while (l--) {
|
1075
|
+
const attr = attributes[l];
|
1076
|
+
const {
|
1077
|
+
name,
|
1078
|
+
namespaceURI,
|
1079
|
+
value: attrValue
|
1080
|
+
} = attr;
|
1081
|
+
const lcName = transformCaseFunc(name);
|
1082
|
+
const initValue = attrValue;
|
1083
|
+
let value = name === 'value' ? initValue : stringTrim(initValue);
|
1084
|
+
/* Execute a hook if present */
|
1085
|
+
hookEvent.attrName = lcName;
|
1086
|
+
hookEvent.attrValue = value;
|
1087
|
+
hookEvent.keepAttr = true;
|
1088
|
+
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
1089
|
+
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
1090
|
+
value = hookEvent.attrValue;
|
1091
|
+
/* Full DOM Clobbering protection via namespace isolation,
|
1092
|
+
* Prefix id and name attributes with `user-content-`
|
1093
|
+
*/
|
1094
|
+
if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
|
1095
|
+
// Remove the attribute with this value
|
1096
|
+
_removeAttribute(name, currentNode);
|
1097
|
+
// Prefix the value and later re-create the attribute with the sanitized value
|
1098
|
+
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
1099
|
+
}
|
1100
|
+
/* Work around a security issue with comments inside attributes */
|
1101
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
1102
|
+
_removeAttribute(name, currentNode);
|
1103
|
+
continue;
|
1104
|
+
}
|
1105
|
+
/* Did the hooks approve of the attribute? */
|
1106
|
+
if (hookEvent.forceKeepAttr) {
|
1107
|
+
continue;
|
1108
|
+
}
|
1109
|
+
/* Did the hooks approve of the attribute? */
|
1110
|
+
if (!hookEvent.keepAttr) {
|
1111
|
+
_removeAttribute(name, currentNode);
|
1112
|
+
continue;
|
1113
|
+
}
|
1114
|
+
/* Work around a security issue in jQuery 3.0 */
|
1115
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
1116
|
+
_removeAttribute(name, currentNode);
|
1117
|
+
continue;
|
1118
|
+
}
|
1119
|
+
/* Sanitize attribute content to be template-safe */
|
1120
|
+
if (SAFE_FOR_TEMPLATES) {
|
1121
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
1122
|
+
value = stringReplace(value, expr, ' ');
|
1123
|
+
});
|
1124
|
+
}
|
1125
|
+
/* Is `value` valid for this attribute? */
|
1126
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
1127
|
+
if (!_isValidAttribute(lcTag, lcName, value)) {
|
1128
|
+
_removeAttribute(name, currentNode);
|
1129
|
+
continue;
|
1130
|
+
}
|
1131
|
+
/* Handle attributes that require Trusted Types */
|
1132
|
+
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
|
1133
|
+
if (namespaceURI) ; else {
|
1134
|
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
1135
|
+
case 'TrustedHTML':
|
1136
|
+
{
|
1137
|
+
value = trustedTypesPolicy.createHTML(value);
|
1138
|
+
break;
|
1139
|
+
}
|
1140
|
+
case 'TrustedScriptURL':
|
1141
|
+
{
|
1142
|
+
value = trustedTypesPolicy.createScriptURL(value);
|
1143
|
+
break;
|
1144
|
+
}
|
1145
|
+
}
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
/* Handle invalid data-* attribute set by try-catching it */
|
1149
|
+
if (value !== initValue) {
|
1150
|
+
try {
|
1151
|
+
if (namespaceURI) {
|
1152
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
1153
|
+
} else {
|
1154
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
1155
|
+
currentNode.setAttribute(name, value);
|
1156
|
+
}
|
1157
|
+
if (_isClobbered(currentNode)) {
|
1158
|
+
_forceRemove(currentNode);
|
1159
|
+
} else {
|
1160
|
+
arrayPop(DOMPurify.removed);
|
1161
|
+
}
|
1162
|
+
} catch (_) {
|
1163
|
+
_removeAttribute(name, currentNode);
|
1164
|
+
}
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
/* Execute a hook if present */
|
1168
|
+
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
1169
|
+
};
|
1170
|
+
/**
|
1171
|
+
* _sanitizeShadowDOM
|
1172
|
+
*
|
1173
|
+
* @param fragment to iterate over recursively
|
1174
|
+
*/
|
1175
|
+
const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
1176
|
+
let shadowNode = null;
|
1177
|
+
const shadowIterator = _createNodeIterator(fragment);
|
1178
|
+
/* Execute a hook if present */
|
1179
|
+
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
1180
|
+
while (shadowNode = shadowIterator.nextNode()) {
|
1181
|
+
/* Execute a hook if present */
|
1182
|
+
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
1183
|
+
/* Sanitize tags and elements */
|
1184
|
+
_sanitizeElements(shadowNode);
|
1185
|
+
/* Check attributes next */
|
1186
|
+
_sanitizeAttributes(shadowNode);
|
1187
|
+
/* Deep shadow DOM detected */
|
1188
|
+
if (shadowNode.content instanceof DocumentFragment) {
|
1189
|
+
_sanitizeShadowDOM(shadowNode.content);
|
1190
|
+
}
|
1191
|
+
}
|
1192
|
+
/* Execute a hook if present */
|
1193
|
+
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
1194
|
+
};
|
1195
|
+
// eslint-disable-next-line complexity
|
1196
|
+
DOMPurify.sanitize = function (dirty) {
|
1197
|
+
let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1198
|
+
let body = null;
|
1199
|
+
let importedNode = null;
|
1200
|
+
let currentNode = null;
|
1201
|
+
let returnNode = null;
|
1202
|
+
/* Make sure we have a string to sanitize.
|
1203
|
+
DO NOT return early, as this will return the wrong type if
|
1204
|
+
the user has requested a DOM object rather than a string */
|
1205
|
+
IS_EMPTY_INPUT = !dirty;
|
1206
|
+
if (IS_EMPTY_INPUT) {
|
1207
|
+
dirty = '<!-->';
|
1208
|
+
}
|
1209
|
+
/* Stringify, in case dirty is an object */
|
1210
|
+
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
1211
|
+
if (typeof dirty.toString === 'function') {
|
1212
|
+
dirty = dirty.toString();
|
1213
|
+
if (typeof dirty !== 'string') {
|
1214
|
+
throw typeErrorCreate('dirty is not a string, aborting');
|
1215
|
+
}
|
1216
|
+
} else {
|
1217
|
+
throw typeErrorCreate('toString is not a function');
|
1218
|
+
}
|
1219
|
+
}
|
1220
|
+
/* Return dirty HTML if DOMPurify cannot run */
|
1221
|
+
if (!DOMPurify.isSupported) {
|
1222
|
+
return dirty;
|
1223
|
+
}
|
1224
|
+
/* Assign config vars */
|
1225
|
+
if (!SET_CONFIG) {
|
1226
|
+
_parseConfig(cfg);
|
1227
|
+
}
|
1228
|
+
/* Clean up removed elements */
|
1229
|
+
DOMPurify.removed = [];
|
1230
|
+
/* Check if dirty is correctly typed for IN_PLACE */
|
1231
|
+
if (typeof dirty === 'string') {
|
1232
|
+
IN_PLACE = false;
|
1233
|
+
}
|
1234
|
+
if (IN_PLACE) {
|
1235
|
+
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
1236
|
+
if (dirty.nodeName) {
|
1237
|
+
const tagName = transformCaseFunc(dirty.nodeName);
|
1238
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
1239
|
+
throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
|
1240
|
+
}
|
1241
|
+
}
|
1242
|
+
} else if (dirty instanceof Node) {
|
1243
|
+
/* If dirty is a DOM element, append to an empty document to avoid
|
1244
|
+
elements being stripped by the parser */
|
1245
|
+
body = _initDocument('<!---->');
|
1246
|
+
importedNode = body.ownerDocument.importNode(dirty, true);
|
1247
|
+
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
|
1248
|
+
/* Node is already a body, use as is */
|
1249
|
+
body = importedNode;
|
1250
|
+
} else if (importedNode.nodeName === 'HTML') {
|
1251
|
+
body = importedNode;
|
1252
|
+
} else {
|
1253
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
1254
|
+
body.appendChild(importedNode);
|
1255
|
+
}
|
1256
|
+
} else {
|
1257
|
+
/* Exit directly if we have nothing to do */
|
1258
|
+
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
|
1259
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
1260
|
+
dirty.indexOf('<') === -1) {
|
1261
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
1262
|
+
}
|
1263
|
+
/* Initialize the document to work on */
|
1264
|
+
body = _initDocument(dirty);
|
1265
|
+
/* Check we have a DOM node from the data */
|
1266
|
+
if (!body) {
|
1267
|
+
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
|
1268
|
+
}
|
1269
|
+
}
|
1270
|
+
/* Remove first element node (ours) if FORCE_BODY is set */
|
1271
|
+
if (body && FORCE_BODY) {
|
1272
|
+
_forceRemove(body.firstChild);
|
1273
|
+
}
|
1274
|
+
/* Get node iterator */
|
1275
|
+
const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
1276
|
+
/* Now start iterating over the created document */
|
1277
|
+
while (currentNode = nodeIterator.nextNode()) {
|
1278
|
+
/* Sanitize tags and elements */
|
1279
|
+
_sanitizeElements(currentNode);
|
1280
|
+
/* Check attributes next */
|
1281
|
+
_sanitizeAttributes(currentNode);
|
1282
|
+
/* Shadow DOM detected, sanitize it */
|
1283
|
+
if (currentNode.content instanceof DocumentFragment) {
|
1284
|
+
_sanitizeShadowDOM(currentNode.content);
|
1285
|
+
}
|
1286
|
+
}
|
1287
|
+
/* If we sanitized `dirty` in-place, return it. */
|
1288
|
+
if (IN_PLACE) {
|
1289
|
+
return dirty;
|
1290
|
+
}
|
1291
|
+
/* Return sanitized string or DOM */
|
1292
|
+
if (RETURN_DOM) {
|
1293
|
+
if (RETURN_DOM_FRAGMENT) {
|
1294
|
+
returnNode = createDocumentFragment.call(body.ownerDocument);
|
1295
|
+
while (body.firstChild) {
|
1296
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
1297
|
+
returnNode.appendChild(body.firstChild);
|
1298
|
+
}
|
1299
|
+
} else {
|
1300
|
+
returnNode = body;
|
1301
|
+
}
|
1302
|
+
if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
|
1303
|
+
/*
|
1304
|
+
AdoptNode() is not used because internal state is not reset
|
1305
|
+
(e.g. the past names map of a HTMLFormElement), this is safe
|
1306
|
+
in theory but we would rather not risk another attack vector.
|
1307
|
+
The state that is cloned by importNode() is explicitly defined
|
1308
|
+
by the specs.
|
1309
|
+
*/
|
1310
|
+
returnNode = importNode.call(originalDocument, returnNode, true);
|
1311
|
+
}
|
1312
|
+
return returnNode;
|
1313
|
+
}
|
1314
|
+
let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
1315
|
+
/* Serialize doctype if allowed */
|
1316
|
+
if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
1317
|
+
serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
|
1318
|
+
}
|
1319
|
+
/* Sanitize final string template-safe */
|
1320
|
+
if (SAFE_FOR_TEMPLATES) {
|
1321
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
1322
|
+
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
1323
|
+
});
|
1324
|
+
}
|
1325
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
1326
|
+
};
|
1327
|
+
DOMPurify.setConfig = function () {
|
1328
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
1329
|
+
_parseConfig(cfg);
|
1330
|
+
SET_CONFIG = true;
|
1331
|
+
};
|
1332
|
+
DOMPurify.clearConfig = function () {
|
1333
|
+
CONFIG = null;
|
1334
|
+
SET_CONFIG = false;
|
1335
|
+
};
|
1336
|
+
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
1337
|
+
/* Initialize shared config vars if necessary. */
|
1338
|
+
if (!CONFIG) {
|
1339
|
+
_parseConfig({});
|
1340
|
+
}
|
1341
|
+
const lcTag = transformCaseFunc(tag);
|
1342
|
+
const lcName = transformCaseFunc(attr);
|
1343
|
+
return _isValidAttribute(lcTag, lcName, value);
|
1344
|
+
};
|
1345
|
+
DOMPurify.addHook = function (entryPoint, hookFunction) {
|
1346
|
+
if (typeof hookFunction !== 'function') {
|
1347
|
+
return;
|
1348
|
+
}
|
1349
|
+
arrayPush(hooks[entryPoint], hookFunction);
|
1350
|
+
};
|
1351
|
+
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
1352
|
+
if (hookFunction !== undefined) {
|
1353
|
+
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
1354
|
+
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
1355
|
+
}
|
1356
|
+
return arrayPop(hooks[entryPoint]);
|
1357
|
+
};
|
1358
|
+
DOMPurify.removeHooks = function (entryPoint) {
|
1359
|
+
hooks[entryPoint] = [];
|
1360
|
+
};
|
1361
|
+
DOMPurify.removeAllHooks = function () {
|
1362
|
+
hooks = _createHooksMap();
|
1363
|
+
};
|
1364
|
+
return DOMPurify;
|
1365
|
+
}
|
1366
|
+
var purify = createDOMPurify();
|
1367
|
+
|
1368
|
+
purify_cjs = purify;
|
1369
|
+
|
1370
|
+
return purify_cjs;
|
1371
|
+
}
|
1372
|
+
|
17
1373
|
dist.exports;
|
18
1374
|
(function(module, exports) {
|
19
1375
|
!function(e, t) {
|
20
|
-
t(exports) ;
|
21
|
-
}(commonjsGlobal, function(e) {
|
22
|
-
function
|
1376
|
+
t(exports, requirePurify_cjs()) ;
|
1377
|
+
}(commonjsGlobal, function(e, t) {
|
1378
|
+
function i(e2) {
|
1379
|
+
return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
|
1380
|
+
}
|
1381
|
+
var n = i(t);
|
1382
|
+
function r(e2, t2, i2, n2) {
|
23
1383
|
return new (i2 || (i2 = Promise))(function(r2, s2) {
|
24
1384
|
function o2(e3) {
|
25
1385
|
try {
|
@@ -44,37 +1404,37 @@ var telerikReportViewer = (function (exports) {
|
|
44
1404
|
l2((n2 = n2.apply(e2, t2 || [])).next());
|
45
1405
|
});
|
46
1406
|
}
|
47
|
-
class
|
1407
|
+
class s {
|
48
1408
|
constructor() {
|
49
1409
|
this.BasePath = "", this.ImmediatePrint = false, this.ContentOnly = false, this.UseSVG = false, this.enableSearch = false, this.enableAccessibility = false, this.contentTabIndex = 0;
|
50
1410
|
}
|
51
1411
|
}
|
52
|
-
class
|
1412
|
+
class o {
|
53
1413
|
constructor() {
|
54
1414
|
this.from = "", this.to = "", this.cc = "", this.subject = "", this.format = "", this.body = "";
|
55
1415
|
}
|
56
1416
|
}
|
57
|
-
class
|
1417
|
+
class a {
|
58
1418
|
constructor(e2, t2) {
|
59
1419
|
this.cancel = false, this.element = e2, this.action = t2;
|
60
1420
|
}
|
61
1421
|
}
|
62
|
-
class
|
1422
|
+
class l {
|
63
1423
|
constructor(e2, t2) {
|
64
1424
|
this.id = "", this.type = "", this.id = e2, this.type = t2;
|
65
1425
|
}
|
66
1426
|
}
|
67
|
-
class
|
1427
|
+
class h {
|
68
1428
|
constructor(e2, t2) {
|
69
1429
|
this.isCancelled = false, this.format = "", this.deviceInfo = e2, this.format = t2;
|
70
1430
|
}
|
71
1431
|
}
|
72
|
-
class
|
1432
|
+
class c {
|
73
1433
|
constructor(e2, t2, i2) {
|
74
1434
|
this.handled = false, this.url = e2, this.format = t2, this.windowOpenTarget = i2;
|
75
1435
|
}
|
76
1436
|
}
|
77
|
-
class
|
1437
|
+
class d {
|
78
1438
|
constructor(e2, t2) {
|
79
1439
|
this._responseText = e2, this._error = t2;
|
80
1440
|
try {
|
@@ -92,15 +1452,19 @@ var telerikReportViewer = (function (exports) {
|
|
92
1452
|
get error() {
|
93
1453
|
return this._error;
|
94
1454
|
}
|
1455
|
+
get exceptionMessage() {
|
1456
|
+
var e2, t2;
|
1457
|
+
return (null === (e2 = this.responseJSON) || void 0 === e2 ? void 0 : e2.exceptionMessage) || (null === (t2 = this.responseJSON) || void 0 === t2 ? void 0 : t2.ExceptionMessage);
|
1458
|
+
}
|
95
1459
|
}
|
96
|
-
function
|
1460
|
+
function u(e2, t2 = false, i2 = false) {
|
97
1461
|
let n2 = { Accept: "application/json, text/javascript, */*; q=0.01" };
|
98
1462
|
return t2 && (n2["Content-Type"] = i2 ? "application/x-www-form-urlencoded; charset=UTF-8" : "application/json; charset=UTF-8"), e2 && (n2.authorization = "Bearer " + e2), n2;
|
99
1463
|
}
|
100
|
-
function
|
101
|
-
return
|
1464
|
+
function p(e2) {
|
1465
|
+
return r(this, void 0, void 0, function* () {
|
102
1466
|
if (!e2.ok) {
|
103
|
-
let t2 = yield e2.text(), i2 = new
|
1467
|
+
let t2 = yield e2.text(), i2 = new d(t2, e2.statusText);
|
104
1468
|
return Promise.reject(i2);
|
105
1469
|
}
|
106
1470
|
if (204 == e2.status)
|
@@ -108,23 +1472,23 @@ var telerikReportViewer = (function (exports) {
|
|
108
1472
|
return (e2.headers.get("content-type") || "").includes("application/json") ? e2.json() : e2.text();
|
109
1473
|
});
|
110
1474
|
}
|
111
|
-
function
|
112
|
-
return fetch(e2, { method: "POST", headers:
|
1475
|
+
function g(e2, t2 = {}, i2 = "", n2 = false) {
|
1476
|
+
return fetch(e2, { method: "POST", headers: u(i2, true, n2), body: n2 ? t2 : JSON.stringify(t2) }).then(p);
|
113
1477
|
}
|
114
|
-
function
|
1478
|
+
function m() {
|
115
1479
|
}
|
116
|
-
function
|
117
|
-
|
1480
|
+
function f() {
|
1481
|
+
f.init.call(this);
|
118
1482
|
}
|
119
|
-
function
|
120
|
-
return void 0 === e2._maxListeners ?
|
1483
|
+
function v(e2) {
|
1484
|
+
return void 0 === e2._maxListeners ? f.defaultMaxListeners : e2._maxListeners;
|
121
1485
|
}
|
122
|
-
function
|
1486
|
+
function P(e2, t2, i2, n2) {
|
123
1487
|
var r2, s2, o2, a2;
|
124
1488
|
if ("function" != typeof i2)
|
125
1489
|
throw new TypeError('"listener" argument must be a function');
|
126
|
-
if ((s2 = e2._events) ? (s2.newListener && (e2.emit("newListener", t2, i2.listener ? i2.listener : i2), s2 = e2._events), o2 = s2[t2]) : (s2 = e2._events = new
|
127
|
-
if ("function" == typeof o2 ? o2 = s2[t2] = n2 ? [i2, o2] : [o2, i2] : n2 ? o2.unshift(i2) : o2.push(i2), !o2.warned && (r2 =
|
1490
|
+
if ((s2 = e2._events) ? (s2.newListener && (e2.emit("newListener", t2, i2.listener ? i2.listener : i2), s2 = e2._events), o2 = s2[t2]) : (s2 = e2._events = new m(), e2._eventsCount = 0), o2) {
|
1491
|
+
if ("function" == typeof o2 ? o2 = s2[t2] = n2 ? [i2, o2] : [o2, i2] : n2 ? o2.unshift(i2) : o2.push(i2), !o2.warned && (r2 = v(e2)) && r2 > 0 && o2.length > r2) {
|
128
1492
|
o2.warned = true;
|
129
1493
|
var l2 = new Error("Possible EventEmitter memory leak detected. " + o2.length + " " + t2 + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
130
1494
|
l2.name = "MaxListenersExceededWarning", l2.emitter = e2, l2.type = t2, l2.count = o2.length, a2 = l2, "function" == typeof console.warn ? console.warn(a2) : console.log(a2);
|
@@ -133,14 +1497,14 @@ var telerikReportViewer = (function (exports) {
|
|
133
1497
|
o2 = s2[t2] = i2, ++e2._eventsCount;
|
134
1498
|
return e2;
|
135
1499
|
}
|
136
|
-
function
|
1500
|
+
function y(e2, t2, i2) {
|
137
1501
|
var n2 = false;
|
138
1502
|
function r2() {
|
139
1503
|
e2.removeListener(t2, r2), n2 || (n2 = true, i2.apply(e2, arguments));
|
140
1504
|
}
|
141
1505
|
return r2.listener = i2, r2;
|
142
1506
|
}
|
143
|
-
function
|
1507
|
+
function I(e2) {
|
144
1508
|
var t2 = this._events;
|
145
1509
|
if (t2) {
|
146
1510
|
var i2 = t2[e2];
|
@@ -151,20 +1515,20 @@ var telerikReportViewer = (function (exports) {
|
|
151
1515
|
}
|
152
1516
|
return 0;
|
153
1517
|
}
|
154
|
-
function
|
1518
|
+
function C(e2, t2) {
|
155
1519
|
for (var i2 = new Array(t2); t2--; )
|
156
1520
|
i2[t2] = e2[t2];
|
157
1521
|
return i2;
|
158
1522
|
}
|
159
|
-
|
160
|
-
this.domain = null,
|
161
|
-
},
|
1523
|
+
m.prototype = /* @__PURE__ */ Object.create(null), f.EventEmitter = f, f.usingDomains = false, f.prototype.domain = void 0, f.prototype._events = void 0, f.prototype._maxListeners = void 0, f.defaultMaxListeners = 10, f.init = function() {
|
1524
|
+
this.domain = null, f.usingDomains && (void 0).active, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new m(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
1525
|
+
}, f.prototype.setMaxListeners = function(e2) {
|
162
1526
|
if ("number" != typeof e2 || e2 < 0 || isNaN(e2))
|
163
1527
|
throw new TypeError('"n" argument must be a positive number');
|
164
1528
|
return this._maxListeners = e2, this;
|
165
|
-
},
|
166
|
-
return
|
167
|
-
},
|
1529
|
+
}, f.prototype.getMaxListeners = function() {
|
1530
|
+
return v(this);
|
1531
|
+
}, f.prototype.emit = function(e2) {
|
168
1532
|
var t2, i2, n2, r2, s2, o2, a2, l2 = "error" === e2;
|
169
1533
|
if (o2 = this._events)
|
170
1534
|
l2 = l2 && null == o2.error;
|
@@ -188,7 +1552,7 @@ var telerikReportViewer = (function (exports) {
|
|
188
1552
|
if (t3)
|
189
1553
|
e3.call(i3);
|
190
1554
|
else
|
191
|
-
for (var n3 = e3.length, r3 =
|
1555
|
+
for (var n3 = e3.length, r3 = C(e3, n3), s3 = 0; s3 < n3; ++s3)
|
192
1556
|
r3[s3].call(i3);
|
193
1557
|
}(i2, c2, this);
|
194
1558
|
break;
|
@@ -197,7 +1561,7 @@ var telerikReportViewer = (function (exports) {
|
|
197
1561
|
if (t3)
|
198
1562
|
e3.call(i3, n3);
|
199
1563
|
else
|
200
|
-
for (var r3 = e3.length, s3 =
|
1564
|
+
for (var r3 = e3.length, s3 = C(e3, r3), o3 = 0; o3 < r3; ++o3)
|
201
1565
|
s3[o3].call(i3, n3);
|
202
1566
|
}(i2, c2, this, arguments[1]);
|
203
1567
|
break;
|
@@ -206,7 +1570,7 @@ var telerikReportViewer = (function (exports) {
|
|
206
1570
|
if (t3)
|
207
1571
|
e3.call(i3, n3, r3);
|
208
1572
|
else
|
209
|
-
for (var s3 = e3.length, o3 =
|
1573
|
+
for (var s3 = e3.length, o3 = C(e3, s3), a3 = 0; a3 < s3; ++a3)
|
210
1574
|
o3[a3].call(i3, n3, r3);
|
211
1575
|
}(i2, c2, this, arguments[1], arguments[2]);
|
212
1576
|
break;
|
@@ -215,7 +1579,7 @@ var telerikReportViewer = (function (exports) {
|
|
215
1579
|
if (t3)
|
216
1580
|
e3.call(i3, n3, r3, s3);
|
217
1581
|
else
|
218
|
-
for (var o3 = e3.length, a3 =
|
1582
|
+
for (var o3 = e3.length, a3 = C(e3, o3), l3 = 0; l3 < o3; ++l3)
|
219
1583
|
a3[l3].call(i3, n3, r3, s3);
|
220
1584
|
}(i2, c2, this, arguments[1], arguments[2], arguments[3]);
|
221
1585
|
break;
|
@@ -226,24 +1590,24 @@ var telerikReportViewer = (function (exports) {
|
|
226
1590
|
if (t3)
|
227
1591
|
e3.apply(i3, n3);
|
228
1592
|
else
|
229
|
-
for (var r3 = e3.length, s3 =
|
1593
|
+
for (var r3 = e3.length, s3 = C(e3, r3), o3 = 0; o3 < r3; ++o3)
|
230
1594
|
s3[o3].apply(i3, n3);
|
231
1595
|
}(i2, c2, this, r2);
|
232
1596
|
}
|
233
1597
|
return true;
|
234
|
-
},
|
235
|
-
return
|
236
|
-
},
|
237
|
-
return
|
238
|
-
},
|
1598
|
+
}, f.prototype.addListener = function(e2, t2) {
|
1599
|
+
return P(this, e2, t2, false);
|
1600
|
+
}, f.prototype.on = f.prototype.addListener, f.prototype.prependListener = function(e2, t2) {
|
1601
|
+
return P(this, e2, t2, true);
|
1602
|
+
}, f.prototype.once = function(e2, t2) {
|
239
1603
|
if ("function" != typeof t2)
|
240
1604
|
throw new TypeError('"listener" argument must be a function');
|
241
|
-
return this.on(e2,
|
242
|
-
},
|
1605
|
+
return this.on(e2, y(this, e2, t2)), this;
|
1606
|
+
}, f.prototype.prependOnceListener = function(e2, t2) {
|
243
1607
|
if ("function" != typeof t2)
|
244
1608
|
throw new TypeError('"listener" argument must be a function');
|
245
|
-
return this.prependListener(e2,
|
246
|
-
},
|
1609
|
+
return this.prependListener(e2, y(this, e2, t2)), this;
|
1610
|
+
}, f.prototype.removeListener = function(e2, t2) {
|
247
1611
|
var i2, n2, r2, s2, o2;
|
248
1612
|
if ("function" != typeof t2)
|
249
1613
|
throw new TypeError('"listener" argument must be a function');
|
@@ -252,7 +1616,7 @@ var telerikReportViewer = (function (exports) {
|
|
252
1616
|
if (!(i2 = n2[e2]))
|
253
1617
|
return this;
|
254
1618
|
if (i2 === t2 || i2.listener && i2.listener === t2)
|
255
|
-
0 == --this._eventsCount ? this._events = new
|
1619
|
+
0 == --this._eventsCount ? this._events = new m() : (delete n2[e2], n2.removeListener && this.emit("removeListener", e2, i2.listener || t2));
|
256
1620
|
else if ("function" != typeof i2) {
|
257
1621
|
for (r2 = -1, s2 = i2.length; s2-- > 0; )
|
258
1622
|
if (i2[s2] === t2 || i2[s2].listener && i2[s2].listener === t2) {
|
@@ -263,7 +1627,7 @@ var telerikReportViewer = (function (exports) {
|
|
263
1627
|
return this;
|
264
1628
|
if (1 === i2.length) {
|
265
1629
|
if (i2[0] = void 0, 0 == --this._eventsCount)
|
266
|
-
return this._events = new
|
1630
|
+
return this._events = new m(), this;
|
267
1631
|
delete n2[e2];
|
268
1632
|
} else
|
269
1633
|
!function(e3, t3) {
|
@@ -274,18 +1638,18 @@ var telerikReportViewer = (function (exports) {
|
|
274
1638
|
n2.removeListener && this.emit("removeListener", e2, o2 || t2);
|
275
1639
|
}
|
276
1640
|
return this;
|
277
|
-
},
|
1641
|
+
}, f.prototype.off = function(e2, t2) {
|
278
1642
|
return this.removeListener(e2, t2);
|
279
|
-
},
|
1643
|
+
}, f.prototype.removeAllListeners = function(e2) {
|
280
1644
|
var t2, i2;
|
281
1645
|
if (!(i2 = this._events))
|
282
1646
|
return this;
|
283
1647
|
if (!i2.removeListener)
|
284
|
-
return 0 === arguments.length ? (this._events = new
|
1648
|
+
return 0 === arguments.length ? (this._events = new m(), this._eventsCount = 0) : i2[e2] && (0 == --this._eventsCount ? this._events = new m() : delete i2[e2]), this;
|
285
1649
|
if (0 === arguments.length) {
|
286
1650
|
for (var n2, r2 = Object.keys(i2), s2 = 0; s2 < r2.length; ++s2)
|
287
1651
|
"removeListener" !== (n2 = r2[s2]) && this.removeAllListeners(n2);
|
288
|
-
return this.removeAllListeners("removeListener"), this._events = new
|
1652
|
+
return this.removeAllListeners("removeListener"), this._events = new m(), this._eventsCount = 0, this;
|
289
1653
|
}
|
290
1654
|
if ("function" == typeof (t2 = i2[e2]))
|
291
1655
|
this.removeListener(e2, t2);
|
@@ -294,34 +1658,34 @@ var telerikReportViewer = (function (exports) {
|
|
294
1658
|
this.removeListener(e2, t2[t2.length - 1]);
|
295
1659
|
} while (t2[0]);
|
296
1660
|
return this;
|
297
|
-
},
|
1661
|
+
}, f.prototype.listeners = function(e2) {
|
298
1662
|
var t2, i2 = this._events;
|
299
1663
|
return i2 && (t2 = i2[e2]) ? "function" == typeof t2 ? [t2.listener || t2] : function(e3) {
|
300
1664
|
for (var t3 = new Array(e3.length), i3 = 0; i3 < t3.length; ++i3)
|
301
1665
|
t3[i3] = e3[i3].listener || e3[i3];
|
302
1666
|
return t3;
|
303
1667
|
}(t2) : [];
|
304
|
-
},
|
305
|
-
return "function" == typeof e2.listenerCount ? e2.listenerCount(t2) :
|
306
|
-
},
|
1668
|
+
}, f.listenerCount = function(e2, t2) {
|
1669
|
+
return "function" == typeof e2.listenerCount ? e2.listenerCount(t2) : I.call(e2, t2);
|
1670
|
+
}, f.prototype.listenerCount = I, f.prototype.eventNames = function() {
|
307
1671
|
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
308
1672
|
};
|
309
|
-
const
|
310
|
-
function
|
1673
|
+
const S = "function" == typeof Symbol ? Symbol.for("--[[await-event-emitter]]--") : "--[[await-event-emitter]]--";
|
1674
|
+
function b(e2) {
|
311
1675
|
if ("string" != typeof e2 && "symbol" != typeof e2)
|
312
1676
|
throw new TypeError("type is not type of string or symbol!");
|
313
1677
|
}
|
314
|
-
function
|
1678
|
+
function w(e2) {
|
315
1679
|
if ("function" != typeof e2)
|
316
1680
|
throw new TypeError("fn is not type of Function!");
|
317
1681
|
}
|
318
|
-
function
|
319
|
-
return { [
|
1682
|
+
function R(e2) {
|
1683
|
+
return { [S]: "always", fn: e2 };
|
320
1684
|
}
|
321
|
-
function
|
322
|
-
return { [
|
1685
|
+
function E(e2) {
|
1686
|
+
return { [S]: "once", fn: e2 };
|
323
1687
|
}
|
324
|
-
class
|
1688
|
+
class T {
|
325
1689
|
constructor() {
|
326
1690
|
this._events = {};
|
327
1691
|
}
|
@@ -329,25 +1693,25 @@ var telerikReportViewer = (function (exports) {
|
|
329
1693
|
return this.on(e2, t2);
|
330
1694
|
}
|
331
1695
|
on(e2, t2) {
|
332
|
-
return
|
1696
|
+
return b(e2), w(t2), this._events[e2] = this._events[e2] || [], this._events[e2].push(R(t2)), this;
|
333
1697
|
}
|
334
1698
|
prependListener(e2, t2) {
|
335
1699
|
return this.prepend(e2, t2);
|
336
1700
|
}
|
337
1701
|
prepend(e2, t2) {
|
338
|
-
return
|
1702
|
+
return b(e2), w(t2), this._events[e2] = this._events[e2] || [], this._events[e2].unshift(R(t2)), this;
|
339
1703
|
}
|
340
1704
|
prependOnceListener(e2, t2) {
|
341
1705
|
return this.prependOnce(e2, t2);
|
342
1706
|
}
|
343
1707
|
prependOnce(e2, t2) {
|
344
|
-
return
|
1708
|
+
return b(e2), w(t2), this._events[e2] = this._events[e2] || [], this._events[e2].unshift(E(t2)), this;
|
345
1709
|
}
|
346
1710
|
listeners(e2) {
|
347
1711
|
return (this._events[e2] || []).map((e3) => e3.fn);
|
348
1712
|
}
|
349
1713
|
once(e2, t2) {
|
350
|
-
return
|
1714
|
+
return b(e2), w(t2), this._events[e2] = this._events[e2] || [], this._events[e2].push(E(t2)), this;
|
351
1715
|
}
|
352
1716
|
removeAllListeners() {
|
353
1717
|
this._events = {};
|
@@ -356,7 +1720,7 @@ var telerikReportViewer = (function (exports) {
|
|
356
1720
|
return this.removeListener(e2, t2);
|
357
1721
|
}
|
358
1722
|
removeListener(e2, t2) {
|
359
|
-
|
1723
|
+
b(e2);
|
360
1724
|
const i2 = this.listeners(e2);
|
361
1725
|
if ("function" == typeof t2) {
|
362
1726
|
let n2 = -1, r2 = false;
|
@@ -366,14 +1730,14 @@ var telerikReportViewer = (function (exports) {
|
|
366
1730
|
}
|
367
1731
|
return delete this._events[e2];
|
368
1732
|
}
|
369
|
-
emit(e2, ...
|
370
|
-
return
|
371
|
-
|
372
|
-
const
|
373
|
-
if (
|
374
|
-
for (let r2 = 0; r2 <
|
375
|
-
const s2 =
|
376
|
-
o2 instanceof Promise && (yield o2), this._events[e2] && this._events[e2][r2] && "once" === this._events[e2][r2][
|
1733
|
+
emit(e2, ...t2) {
|
1734
|
+
return r(this, void 0, void 0, function* () {
|
1735
|
+
b(e2);
|
1736
|
+
const i2 = this.listeners(e2), n2 = [];
|
1737
|
+
if (i2 && i2.length) {
|
1738
|
+
for (let r2 = 0; r2 < i2.length; r2++) {
|
1739
|
+
const s2 = i2[r2], o2 = s2.apply(this, t2);
|
1740
|
+
o2 instanceof Promise && (yield o2), this._events[e2] && this._events[e2][r2] && "once" === this._events[e2][r2][S] && n2.push(s2);
|
377
1741
|
}
|
378
1742
|
return n2.forEach((t3) => this.removeListener(e2, t3)), true;
|
379
1743
|
}
|
@@ -381,21 +1745,21 @@ var telerikReportViewer = (function (exports) {
|
|
381
1745
|
});
|
382
1746
|
}
|
383
1747
|
emitSync(e2, ...t2) {
|
384
|
-
|
1748
|
+
b(e2);
|
385
1749
|
const i2 = this.listeners(e2), n2 = [];
|
386
1750
|
if (i2 && i2.length) {
|
387
1751
|
for (let r2 = 0; r2 < i2.length; r2++) {
|
388
1752
|
const s2 = i2[r2];
|
389
|
-
s2.apply(this, t2), this._events[e2] && this._events[e2][r2] && "once" === this._events[e2][r2][
|
1753
|
+
s2.apply(this, t2), this._events[e2] && this._events[e2][r2] && "once" === this._events[e2][r2][S] && n2.push(s2);
|
390
1754
|
}
|
391
1755
|
return n2.forEach((t3) => this.removeListener(e2, t3)), true;
|
392
1756
|
}
|
393
1757
|
return false;
|
394
1758
|
}
|
395
1759
|
}
|
396
|
-
class
|
1760
|
+
class A {
|
397
1761
|
constructor() {
|
398
|
-
this.eventEmitter = new
|
1762
|
+
this.eventEmitter = new f(), this.awaitEventEmitter = new T();
|
399
1763
|
}
|
400
1764
|
on(e2, t2) {
|
401
1765
|
return this.eventEmitter.on(e2, t2), this;
|
@@ -406,13 +1770,13 @@ var telerikReportViewer = (function (exports) {
|
|
406
1770
|
onAsync(e2, t2) {
|
407
1771
|
return this.awaitEventEmitter.on(e2, t2), this;
|
408
1772
|
}
|
409
|
-
emitAsync(e2, ...
|
410
|
-
return
|
411
|
-
yield this.awaitEventEmitter.emit(e2, ...
|
1773
|
+
emitAsync(e2, ...t2) {
|
1774
|
+
return r(this, void 0, void 0, function* () {
|
1775
|
+
yield this.awaitEventEmitter.emit(e2, ...t2);
|
412
1776
|
});
|
413
1777
|
}
|
414
1778
|
}
|
415
|
-
class
|
1779
|
+
class M {
|
416
1780
|
hasPdfPlugin() {
|
417
1781
|
let e2 = ["AcroPDF.PDF.1", "PDF.PdfCtrl.6", "PDF.PdfCtrl.5"];
|
418
1782
|
for (let t2 of e2)
|
@@ -425,7 +1789,7 @@ var telerikReportViewer = (function (exports) {
|
|
425
1789
|
return false;
|
426
1790
|
}
|
427
1791
|
}
|
428
|
-
class
|
1792
|
+
class L {
|
429
1793
|
hasPdfPlugin() {
|
430
1794
|
let e2 = /Firefox[/\s](\d+\.\d+)/.exec(navigator.userAgent);
|
431
1795
|
if (null !== e2 && e2.length > 1) {
|
@@ -440,7 +1804,7 @@ var telerikReportViewer = (function (exports) {
|
|
440
1804
|
return false;
|
441
1805
|
}
|
442
1806
|
}
|
443
|
-
class
|
1807
|
+
class x {
|
444
1808
|
constructor(e2) {
|
445
1809
|
this.defaultPlugin = e2;
|
446
1810
|
}
|
@@ -451,22 +1815,22 @@ var telerikReportViewer = (function (exports) {
|
|
451
1815
|
return false;
|
452
1816
|
}
|
453
1817
|
}
|
454
|
-
class
|
1818
|
+
class D {
|
455
1819
|
hasPdfPlugin() {
|
456
1820
|
return false;
|
457
1821
|
}
|
458
1822
|
}
|
459
|
-
function
|
1823
|
+
function N() {
|
460
1824
|
return window.navigator && window.navigator.msSaveOrOpenBlob;
|
461
1825
|
}
|
462
|
-
class
|
1826
|
+
class k {
|
463
1827
|
constructor() {
|
464
1828
|
this.hasPdfPlugin = false, this.iframe = null, this.hasPdfPlugin = function() {
|
465
1829
|
if (window.navigator) {
|
466
1830
|
let e2 = window.navigator.userAgent.toLowerCase();
|
467
|
-
return e2.indexOf("msie") > -1 || e2.indexOf("mozilla") > -1 && e2.indexOf("trident") > -1 ? new
|
1831
|
+
return e2.indexOf("msie") > -1 || e2.indexOf("mozilla") > -1 && e2.indexOf("trident") > -1 ? new M() : e2.indexOf("firefox") > -1 ? new L() : e2.indexOf("edg/") > -1 ? new x("Microsoft Edge PDF Plugin") : e2.indexOf("chrome") > -1 ? new x("Chrome PDF Viewer") : e2.indexOf("safari") > -1 ? new x("WebKit built-in PDF") : new D();
|
468
1832
|
}
|
469
|
-
return new
|
1833
|
+
return new D();
|
470
1834
|
}().hasPdfPlugin(), this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
471
1835
|
}
|
472
1836
|
destroy() {
|
@@ -484,13 +1848,13 @@ var telerikReportViewer = (function (exports) {
|
|
484
1848
|
}), function(e3) {
|
485
1849
|
let t3 = window.location, i3 = document.createElement("a");
|
486
1850
|
return i3.setAttribute("href", e3), "" == i3.host && (i3.href = i3.href), t3.hostname === i3.hostname && t3.protocol === i3.protocol && t3.port === i3.port;
|
487
|
-
}(e2) &&
|
1851
|
+
}(e2) && N())
|
488
1852
|
return this.iframe.src = e2, void document.body.appendChild(this.iframe);
|
489
1853
|
let i2 = new XMLHttpRequest(), n2 = this;
|
490
1854
|
i2.open("GET", e2, true), i2.responseType = "arraybuffer", i2.onload = function() {
|
491
1855
|
if (200 === this.status) {
|
492
1856
|
let e3 = new Blob([this.response], { type: "application/pdf" });
|
493
|
-
|
1857
|
+
N() ? window.navigator.msSaveOrOpenBlob(e3) : (t2 = (window.URL || window.webkitURL).createObjectURL(e3), null != n2.iframe && (n2.iframe.src = t2, document.body.appendChild(n2.iframe)));
|
494
1858
|
} else
|
495
1859
|
console.log("Could not retrieve remote PDF document.");
|
496
1860
|
}, i2.send();
|
@@ -505,10 +1869,10 @@ var telerikReportViewer = (function (exports) {
|
|
505
1869
|
return this.hasPdfPlugin;
|
506
1870
|
}
|
507
1871
|
}
|
508
|
-
function
|
1872
|
+
function F(e2) {
|
509
1873
|
return 1e3 * e2;
|
510
1874
|
}
|
511
|
-
class
|
1875
|
+
class O {
|
512
1876
|
constructor(e2, t2, i2) {
|
513
1877
|
if (this.pingMilliseconds = 0, !e2)
|
514
1878
|
throw "Error";
|
@@ -517,7 +1881,7 @@ var telerikReportViewer = (function (exports) {
|
|
517
1881
|
initSessionTimeout(e2) {
|
518
1882
|
if (!isFinite(e2))
|
519
1883
|
throw "sessionTimeoutSeconds must be finite";
|
520
|
-
this.pingMilliseconds = e2 <= 120 ?
|
1884
|
+
this.pingMilliseconds = e2 <= 120 ? F(e2) / 2 : F(e2 - 60);
|
521
1885
|
}
|
522
1886
|
start() {
|
523
1887
|
this.pingMilliseconds <= 0 || (this.interval = setInterval(() => {
|
@@ -528,33 +1892,33 @@ var telerikReportViewer = (function (exports) {
|
|
528
1892
|
this.interval && (clearInterval(this.interval), this.interval = null);
|
529
1893
|
}
|
530
1894
|
}
|
531
|
-
var
|
532
|
-
function
|
1895
|
+
var V, z, _, $, U;
|
1896
|
+
function H(e2, t2 = "", i2 = "") {
|
533
1897
|
let n2 = document.createElement(e2);
|
534
|
-
return t2 && (n2.id = t2),
|
1898
|
+
return t2 && (n2.id = t2), B(n2, i2), n2;
|
535
1899
|
}
|
536
|
-
function
|
1900
|
+
function B(e2, t2) {
|
537
1901
|
if ("" === t2 || !e2)
|
538
1902
|
return;
|
539
1903
|
let i2 = t2.trim().split(" ");
|
540
1904
|
i2 = i2.filter((e3) => "" !== e3.trim()), e2.classList.add(...i2);
|
541
1905
|
}
|
542
|
-
function
|
1906
|
+
function q(e2, t2) {
|
543
1907
|
if ("" === t2 || !e2)
|
544
1908
|
return;
|
545
1909
|
let i2 = t2.trim().split(" ");
|
546
1910
|
i2 = i2.filter((e3) => "" !== e3.trim()), e2.classList.remove(...i2);
|
547
1911
|
}
|
548
|
-
function
|
1912
|
+
function W(e2, t2) {
|
549
1913
|
return e2.classList.contains(t2);
|
550
1914
|
}
|
551
|
-
function
|
1915
|
+
function j(e2) {
|
552
1916
|
return e2.offsetParent;
|
553
1917
|
}
|
554
|
-
function
|
1918
|
+
function G(e2) {
|
555
1919
|
return parseInt(e2, 10) || 0;
|
556
1920
|
}
|
557
|
-
function
|
1921
|
+
function J(e2, t2, i2, n2 = 0, r2 = 0) {
|
558
1922
|
let s2 = `${n2 = n2 || 0} ${r2 = r2 || 0}`;
|
559
1923
|
!function(e3, t3) {
|
560
1924
|
e3.style.setProperty("transform", t3), e3.style.setProperty("-moz-transform", t3), e3.style.setProperty("-ms-transform", t3), e3.style.setProperty("-webkit-transform", t3), e3.style.setProperty("-o-transform", t3);
|
@@ -562,11 +1926,11 @@ var telerikReportViewer = (function (exports) {
|
|
562
1926
|
e3.style.setProperty("transform-origin", t3), e3.style.setProperty("-moz-transform-origin", t3), e3.style.setProperty("-ms-transform-origin", t3), e3.style.setProperty("-webkit-transform-origin", t3), e3.style.setProperty("-o-transform-origin", t3);
|
563
1927
|
}(e2, s2);
|
564
1928
|
}
|
565
|
-
function
|
566
|
-
let t2 =
|
1929
|
+
function Z(e2) {
|
1930
|
+
let t2 = H("div");
|
567
1931
|
return t2.textContent = e2, t2.innerHTML;
|
568
1932
|
}
|
569
|
-
function
|
1933
|
+
function K(e2) {
|
570
1934
|
if (e2 && e2.length < 6) {
|
571
1935
|
let t3 = 1, i2 = e2.split("");
|
572
1936
|
for ("#" !== i2[0] && (t3 = 0); t3 < i2.length; t3++)
|
@@ -576,16 +1940,16 @@ var telerikReportViewer = (function (exports) {
|
|
576
1940
|
let t2 = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e2);
|
577
1941
|
return t2 ? parseInt(t2[1], 16) + ", " + parseInt(t2[2], 16) + ", " + parseInt(t2[3], 16) : null;
|
578
1942
|
}
|
579
|
-
function
|
1943
|
+
function X(e2) {
|
580
1944
|
return !!e2 && e2.indexOf(",") > -1;
|
581
1945
|
}
|
582
|
-
function
|
1946
|
+
function Q(e2) {
|
583
1947
|
if ("transparent" === e2.toLowerCase())
|
584
1948
|
return 0;
|
585
|
-
if (!
|
1949
|
+
if (!X(e2))
|
586
1950
|
return 1;
|
587
1951
|
if (-1 !== e2.indexOf("#")) {
|
588
|
-
let t3 =
|
1952
|
+
let t3 = K(e2);
|
589
1953
|
if (null === t3)
|
590
1954
|
return 1;
|
591
1955
|
e2 = t3;
|
@@ -595,34 +1959,34 @@ var telerikReportViewer = (function (exports) {
|
|
595
1959
|
});
|
596
1960
|
return 4 === t2.length ? parseFloat((parseFloat(t2[3].replace(/[()]/g, "")) / 255).toFixed(2)) : 1;
|
597
1961
|
}
|
598
|
-
function
|
599
|
-
let i2 =
|
1962
|
+
function Y(e2, t2) {
|
1963
|
+
let i2 = H("div");
|
600
1964
|
for (i2.innerHTML = t2; i2.childNodes.length; )
|
601
1965
|
e2.appendChild(i2.childNodes[0]);
|
602
1966
|
}
|
603
|
-
function
|
604
|
-
let i2 =
|
1967
|
+
function ee(e2, t2) {
|
1968
|
+
let i2 = H("div");
|
605
1969
|
for (i2.innerHTML = t2; i2.childNodes.length; )
|
606
1970
|
e2.prepend(i2.childNodes[i2.childNodes.length - 1]);
|
607
1971
|
}
|
608
|
-
function
|
1972
|
+
function te(e2, t2) {
|
609
1973
|
return null === e2 ? null : e2.querySelector(t2);
|
610
1974
|
}
|
611
|
-
function
|
1975
|
+
function ie(e2, t2) {
|
612
1976
|
var i2;
|
613
1977
|
return e2 && e2.attributes && (null === (i2 = e2.attributes[t2]) || void 0 === i2 ? void 0 : i2.value) || "";
|
614
1978
|
}
|
615
|
-
function
|
1979
|
+
function ne(e2) {
|
616
1980
|
let t2 = e2.parentElement;
|
617
|
-
return t2 ? t2.clientHeight != t2.scrollHeight ? t2 :
|
1981
|
+
return t2 ? t2.clientHeight != t2.scrollHeight ? t2 : ne(t2) : null;
|
618
1982
|
}
|
619
|
-
function
|
1983
|
+
function re(e2, t2 = 300) {
|
620
1984
|
let i2;
|
621
1985
|
return function(...n2) {
|
622
1986
|
clearTimeout(i2), i2 = setTimeout(() => e2.apply(this, n2), t2);
|
623
1987
|
};
|
624
1988
|
}
|
625
|
-
function
|
1989
|
+
function se(e2, t2) {
|
626
1990
|
let i2 = null;
|
627
1991
|
return function(n2, ...r2) {
|
628
1992
|
i2 || (i2 = setTimeout(function() {
|
@@ -630,24 +1994,24 @@ var telerikReportViewer = (function (exports) {
|
|
630
1994
|
}, t2));
|
631
1995
|
};
|
632
1996
|
}
|
633
|
-
function
|
1997
|
+
function oe(e2, t2) {
|
634
1998
|
return !!e2.responseJSON && e2.responseJSON.exceptionType === t2;
|
635
1999
|
}
|
636
|
-
function
|
637
|
-
return
|
2000
|
+
function ae(e2) {
|
2001
|
+
return oe(e2, "Telerik.Reporting.Services.Engine.InvalidClientException");
|
638
2002
|
}
|
639
|
-
function
|
640
|
-
return
|
2003
|
+
function le(e2) {
|
2004
|
+
return oe(e2, "Telerik.Reporting.Services.Engine.InvalidParameterException");
|
641
2005
|
}
|
642
|
-
function
|
2006
|
+
function he(e2) {
|
643
2007
|
return !!e2 && "internalservererror" === e2.split(" ").join("").toLowerCase();
|
644
2008
|
}
|
645
|
-
function
|
2009
|
+
function ce(e2, ...t2) {
|
646
2010
|
return e2.replace(/{(\d+)}/g, (e3, i2) => t2[i2] || "");
|
647
2011
|
}
|
648
|
-
function
|
2012
|
+
function de(e2, t2) {
|
649
2013
|
let i2, n2;
|
650
|
-
if (
|
2014
|
+
if (ue(e2))
|
651
2015
|
for (i2 = e2.length, n2 = 0; n2 < i2 && false !== t2.call(e2[n2], n2, e2[n2]); n2++)
|
652
2016
|
;
|
653
2017
|
else
|
@@ -656,55 +2020,55 @@ var telerikReportViewer = (function (exports) {
|
|
656
2020
|
break;
|
657
2021
|
return e2;
|
658
2022
|
}
|
659
|
-
function
|
2023
|
+
function ue(e2) {
|
660
2024
|
if (Array.isArray(e2))
|
661
2025
|
return true;
|
662
2026
|
return "number" == typeof (!!e2 && "length" in e2 && e2.length);
|
663
2027
|
}
|
664
|
-
function
|
2028
|
+
function pe(e2) {
|
665
2029
|
return /^(\-|\+)?([0-9]+)$/.test(e2) ? Number(e2) : NaN;
|
666
2030
|
}
|
667
|
-
function
|
2031
|
+
function ge(e2) {
|
668
2032
|
return /^(\-|\+)?([0-9]+(\.[0-9]+)?)$/.test(e2) ? Number(e2) : NaN;
|
669
2033
|
}
|
670
|
-
function
|
2034
|
+
function me(e2) {
|
671
2035
|
return e2 instanceof Date ? e2 : (/Z|[\+\-]\d\d:?\d\d/i.test(e2) || (e2 += "Z"), new Date(e2));
|
672
2036
|
}
|
673
|
-
e.PageMode = void 0, (
|
674
|
-
class
|
2037
|
+
e.PageMode = void 0, (V = e.PageMode || (e.PageMode = {}))[V.ContinuousScroll = 0] = "ContinuousScroll", V[V.SinglePage = 1] = "SinglePage", e.PrintMode = void 0, (z = e.PrintMode || (e.PrintMode = {}))[z.AutoSelect = 0] = "AutoSelect", z[z.ForcePDFPlugin = 1] = "ForcePDFPlugin", z[z.ForcePDFFile = 2] = "ForcePDFFile", e.ScaleMode = void 0, (_ = e.ScaleMode || (e.ScaleMode = {}))[_.FitPageWidth = 0] = "FitPageWidth", _[_.FitPage = 1] = "FitPage", _[_.Specific = 2] = "Specific", e.ServiceType = void 0, ($ = e.ServiceType || (e.ServiceType = {}))[$.REST = 0] = "REST", $[$.ReportServer = 1] = "ReportServer", e.ViewMode = void 0, (U = e.ViewMode || (e.ViewMode = {}))[U.Interactive = 0] = "Interactive", U[U.PrintPreview = 1] = "PrintPreview";
|
2038
|
+
class fe {
|
675
2039
|
constructor(e2) {
|
676
2040
|
this.handled = false, this.deviceInfo = e2;
|
677
2041
|
}
|
678
2042
|
}
|
679
|
-
class
|
2043
|
+
class ve {
|
680
2044
|
constructor(e2) {
|
681
2045
|
this.handled = false, this.url = e2;
|
682
2046
|
}
|
683
2047
|
}
|
684
|
-
class
|
2048
|
+
class Pe {
|
685
2049
|
constructor(e2, t2) {
|
686
2050
|
this.handled = false, this.deviceInfo = e2, this.format = t2;
|
687
2051
|
}
|
688
2052
|
}
|
689
|
-
class
|
2053
|
+
class ye {
|
690
2054
|
constructor(e2, t2) {
|
691
2055
|
this.handled = false, this.deviceInfo = e2, this.format = t2;
|
692
2056
|
}
|
693
2057
|
}
|
694
|
-
class
|
2058
|
+
class Ie extends o {
|
695
2059
|
constructor(e2, t2, i2) {
|
696
2060
|
super(), this.handled = false, this.body = e2.body, this.cc = e2.cc, this.format = e2.format, this.from = e2.from, this.subject = e2.subject, this.to = e2.to, this.deviceInfo = t2, this.url = i2;
|
697
2061
|
}
|
698
2062
|
}
|
699
|
-
const
|
700
|
-
var
|
2063
|
+
const Ce = "System.Int64", Se = "System.Double", be = "System.String", we = "System.DateTime", Re = "System.Boolean";
|
2064
|
+
var Ee = function() {
|
701
2065
|
var e2 = {};
|
702
2066
|
function t2(e3, t3, i3, n2) {
|
703
2067
|
var r2 = [].concat(t3).map(function(t4) {
|
704
2068
|
return function(e4, t5, i4) {
|
705
2069
|
if (e4.availableValues) {
|
706
2070
|
var n3 = false;
|
707
|
-
if (
|
2071
|
+
if (de(e4.availableValues, function(e5, r3) {
|
708
2072
|
return !(n3 = i4(t5, r3.value));
|
709
2073
|
}), !n3) {
|
710
2074
|
if (e4.allowNull && !t5)
|
@@ -728,7 +2092,7 @@ var telerikReportViewer = (function (exports) {
|
|
728
2092
|
function i2(e3, t3) {
|
729
2093
|
return e3.allowNull && -1 != [null, "", void 0].indexOf(t3);
|
730
2094
|
}
|
731
|
-
return e2[
|
2095
|
+
return e2[be] = { validate: function(e3, i3) {
|
732
2096
|
return t2(e3, i3, function(t3) {
|
733
2097
|
if (!t3) {
|
734
2098
|
if (e3.allowNull)
|
@@ -741,9 +2105,9 @@ var telerikReportViewer = (function (exports) {
|
|
741
2105
|
}, function(e4, t3) {
|
742
2106
|
return e4 == t3;
|
743
2107
|
});
|
744
|
-
} }, e2[
|
2108
|
+
} }, e2[Se] = { validate: function(e3, n2) {
|
745
2109
|
return t2(e3, n2, function(t3) {
|
746
|
-
var n3 =
|
2110
|
+
var n3 = ge(t3);
|
747
2111
|
if (isNaN(n3)) {
|
748
2112
|
if (i2(e3, t3))
|
749
2113
|
return null;
|
@@ -751,11 +2115,11 @@ var telerikReportViewer = (function (exports) {
|
|
751
2115
|
}
|
752
2116
|
return n3;
|
753
2117
|
}, function(e4, t3) {
|
754
|
-
return
|
2118
|
+
return ge(e4) == ge(t3);
|
755
2119
|
});
|
756
|
-
} }, e2[
|
2120
|
+
} }, e2[Ce] = { validate: function(e3, n2) {
|
757
2121
|
return t2(e3, n2, function(t3) {
|
758
|
-
var n3 =
|
2122
|
+
var n3 = pe(t3);
|
759
2123
|
if (isNaN(n3)) {
|
760
2124
|
if (i2(e3, t3))
|
761
2125
|
return null;
|
@@ -763,19 +2127,19 @@ var telerikReportViewer = (function (exports) {
|
|
763
2127
|
}
|
764
2128
|
return n3;
|
765
2129
|
}, function(e4, t3) {
|
766
|
-
return
|
2130
|
+
return pe(e4) == ge(t3);
|
767
2131
|
});
|
768
|
-
} }, e2[
|
2132
|
+
} }, e2[we] = { validate: function(e3, i3) {
|
769
2133
|
return t2(e3, i3, function(t3) {
|
770
2134
|
if (e3.allowNull && (null === t3 || "" === t3 || void 0 === t3))
|
771
2135
|
return null;
|
772
2136
|
if (!isNaN(Date.parse(t3)))
|
773
|
-
return e3.availableValues ? t3 :
|
2137
|
+
return e3.availableValues ? t3 : me(t3);
|
774
2138
|
throw "Please input a valid date.";
|
775
2139
|
}, function(e4, t3) {
|
776
|
-
return e4 =
|
2140
|
+
return e4 = me(e4), t3 = me(t3), e4.getTime() == t3.getTime();
|
777
2141
|
});
|
778
|
-
} }, e2[
|
2142
|
+
} }, e2[Re] = { validate: function(e3, n2) {
|
779
2143
|
return t2(e3, n2, function(t3) {
|
780
2144
|
if (-1 != ["true", "false"].indexOf(String(t3).toLowerCase()))
|
781
2145
|
return Boolean(t3);
|
@@ -788,11 +2152,11 @@ var telerikReportViewer = (function (exports) {
|
|
788
2152
|
} }, { validate: function(t3, i3) {
|
789
2153
|
var n2 = e2[t3.type];
|
790
2154
|
if (!n2)
|
791
|
-
throw
|
2155
|
+
throw ce("Cannot validate parameter of type {type}.", t3);
|
792
2156
|
return n2.validate(t3, i3);
|
793
2157
|
} };
|
794
2158
|
}();
|
795
|
-
function
|
2159
|
+
function Te(e2, t2, i2) {
|
796
2160
|
try {
|
797
2161
|
const n2 = e2.availableValues.find((e3) => e3.value === t2);
|
798
2162
|
if (!n2)
|
@@ -802,23 +2166,23 @@ var telerikReportViewer = (function (exports) {
|
|
802
2166
|
return;
|
803
2167
|
}
|
804
2168
|
}
|
805
|
-
function
|
2169
|
+
function Ae(e2, t2, i2) {
|
806
2170
|
const n2 = [];
|
807
2171
|
for (let r2 in t2)
|
808
|
-
n2.push(
|
2172
|
+
n2.push(Te(e2, t2[r2], i2));
|
809
2173
|
return n2;
|
810
2174
|
}
|
811
|
-
class
|
2175
|
+
class Me {
|
812
2176
|
constructor(e2 = "", t2 = {}) {
|
813
2177
|
this.report = e2, this.parameters = t2;
|
814
2178
|
}
|
815
2179
|
}
|
816
|
-
class
|
2180
|
+
class Le {
|
817
2181
|
constructor(e2, t2, i2, n2 = null) {
|
818
2182
|
this.element = e2, this.text = t2, this.title = i2, this.eventArgs = n2;
|
819
2183
|
}
|
820
2184
|
}
|
821
|
-
class
|
2185
|
+
class xe extends A {
|
822
2186
|
constructor(e2) {
|
823
2187
|
super(), this.resizeObserver = null, this.element = e2, this.initResizeObserver();
|
824
2188
|
}
|
@@ -826,7 +2190,7 @@ var telerikReportViewer = (function (exports) {
|
|
826
2190
|
this.destroyResizeObserver();
|
827
2191
|
}
|
828
2192
|
initResizeObserver() {
|
829
|
-
this.debounceResize =
|
2193
|
+
this.debounceResize = re(this.onResize.bind(this), 50), this.resizeObserver = new ResizeObserver(this.debounceResize), this.resizeObserver.observe(this.element);
|
830
2194
|
}
|
831
2195
|
destroyResizeObserver() {
|
832
2196
|
this.resizeObserver && this.resizeObserver.unobserve(this.element), this.resizeObserver = this.debounceResize = null;
|
@@ -835,10 +2199,15 @@ var telerikReportViewer = (function (exports) {
|
|
835
2199
|
e2[0].target === this.element && this.emit("resize");
|
836
2200
|
}
|
837
2201
|
}
|
838
|
-
const
|
839
|
-
class
|
2202
|
+
const De = '<div class="trv-report-page trv-skeleton-page trv-skeleton-{0}" style="{1}" data-page="{0}"><div class="trv-skeleton-wrapper" style="{2}"></div></div>';
|
2203
|
+
class Ne {
|
840
2204
|
constructor(t2, i2, n2) {
|
841
|
-
this.enabled = false, this.viewMode = e.ViewMode.Interactive, this.scrollInProgress = false, this.additionalTopOffset = 130, this.onClickHandler = null, this.debounceScroll = null, this.throttleScroll = null, this.oldScrollTopPosition = 0, this.lastLoadedPage = null, this.placeholder = t2, this.pageContainer = t2.querySelector(".trv-page-container"), this.pageWrapper = t2.querySelector(".trv-page-wrapper"), this.contentArea = i2, this.controller = n2, this.controller.getPageMode() === e.PageMode.ContinuousScroll && this.enable(), this.controller.on("loadedReportChange", this.disable.bind(this)).on("viewModeChanged", this.disable.bind(this)).on("scaleChanged", this.onScaleChanged.bind(this)).on("interactiveActionExecuting", this.onInteractiveActionExecuting.bind(this));
|
2205
|
+
this.enabled = false, this.viewMode = e.ViewMode.Interactive, this.scrollInProgress = false, this.additionalTopOffset = 130, this.onClickHandler = null, this.debounceScroll = null, this.throttleScroll = null, this.oldScrollTopPosition = 0, this.lastLoadedPage = null, this.placeholder = t2, this.pageContainer = t2.querySelector(".trv-page-container"), this.pageWrapper = t2.querySelector(".trv-page-wrapper"), this.contentArea = i2, this.controller = n2, this.controller.getPageMode() === e.PageMode.ContinuousScroll && this.enable(), this.controller.on("loadedReportChange", this.disable.bind(this)).on("viewModeChanged", this.disable.bind(this)).on("scaleChanged", this.onScaleChanged.bind(this)).on("interactiveActionExecuting", this.onInteractiveActionExecuting.bind(this)).on("pageLoaded", this.onPageLoaded.bind(this));
|
2206
|
+
}
|
2207
|
+
onPageLoaded() {
|
2208
|
+
this.currentPageNumber() > 0 && !this.scrollInProgress && setTimeout(() => {
|
2209
|
+
this.loadMorePages();
|
2210
|
+
}, 100);
|
842
2211
|
}
|
843
2212
|
onScaleChanged() {
|
844
2213
|
this.enabled && setTimeout(() => {
|
@@ -853,10 +2222,10 @@ var telerikReportViewer = (function (exports) {
|
|
853
2222
|
return this.enabled;
|
854
2223
|
}
|
855
2224
|
enable() {
|
856
|
-
this.enabled = true,
|
2225
|
+
this.enabled = true, B(this.placeholder, "scrollable"), this.initEvents();
|
857
2226
|
}
|
858
2227
|
disable() {
|
859
|
-
this.enabled && (this.lastLoadedPage = null, this.pageWrapper.innerHTML = "", this.enabled = false,
|
2228
|
+
this.enabled && (this.lastLoadedPage = null, this.pageWrapper.innerHTML = "", this.enabled = false, q(this.placeholder, "scrollable"), this.unbind());
|
860
2229
|
}
|
861
2230
|
renderPage(e2) {
|
862
2231
|
let t2 = this.controller.getViewMode(), i2 = this.findPageElement(e2.pageNumber);
|
@@ -871,16 +2240,14 @@ var telerikReportViewer = (function (exports) {
|
|
871
2240
|
this.enabled && this.currentPageNumber() > 0 && this.keepCurrentPageInToView();
|
872
2241
|
}
|
873
2242
|
setCurrentPage(e2) {
|
874
|
-
e2 !== this.currentPageNumber() && this.controller.setCurrentPageNumber(e2), this.controller.getPageCount() > 1 && (
|
2243
|
+
e2 !== this.currentPageNumber() && this.controller.setCurrentPageNumber(e2), this.controller.getPageCount() > 1 && (q(this.findElement(".k-state-default"), "k-state-default"), B(this.findPageElement(e2), "k-state-default")), this.loadNextPreviousPage(e2);
|
875
2244
|
}
|
876
2245
|
updatePageArea(e2) {
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
});
|
883
|
-
}, 100);
|
2246
|
+
var t2;
|
2247
|
+
let i2 = 0, n2 = e2.pageNumber;
|
2248
|
+
this.scrollInProgress = true, n2 > 1 && this.generateSkeletonScreens(n2), this.render(e2, false), this.setCurrentPage(e2.pageNumber), i2 = n2 > 1 && (null === (t2 = this.findPageElement(n2)) || void 0 === t2 ? void 0 : t2.offsetTop) || 0, this.animateScroll(i2, 0, () => {
|
2249
|
+
this.scrollInProgress = false;
|
2250
|
+
});
|
884
2251
|
}
|
885
2252
|
navigateToPage(e2, t2) {
|
886
2253
|
this.scrollInProgress = true;
|
@@ -892,24 +2259,24 @@ var telerikReportViewer = (function (exports) {
|
|
892
2259
|
updatePageContent(e2, t2) {
|
893
2260
|
this.contentArea.updatePageStyle(e2);
|
894
2261
|
let i2 = this.contentArea.renderPageElement(e2);
|
895
|
-
t2.after(i2), t2.remove(), this.contentArea.setScrollablePage(i2, e2), this.controller.
|
2262
|
+
t2.after(i2), t2.remove(), this.contentArea.setScrollablePage(i2, e2), this.controller.applySearchColors();
|
896
2263
|
}
|
897
2264
|
currentPageNumber() {
|
898
2265
|
return this.controller.getCurrentPageNumber();
|
899
2266
|
}
|
900
2267
|
isSkeletonScreen(e2, t2) {
|
901
|
-
return !(!e2 && !(e2 = this.findPageElement(t2))) &&
|
2268
|
+
return !(!e2 && !(e2 = this.findPageElement(t2))) && W(e2, "trv-skeleton-" + t2);
|
902
2269
|
}
|
903
2270
|
addSkeletonScreen(e2, t2) {
|
904
|
-
let i2 = e2 + (t2 ? 1 : -1), n2 = this.findPageElement(i2), r2 =
|
905
|
-
t2 ?
|
2271
|
+
let i2 = e2 + (t2 ? 1 : -1), n2 = this.findPageElement(i2), r2 = ie(n2, "style"), s2 = ie(null == n2 ? void 0 : n2.querySelector("sheet"), "style"), o2 = ce(De, e2, r2, s2);
|
2272
|
+
t2 ? ee(this.pageWrapper, o2) : Y(this.pageWrapper, o2);
|
906
2273
|
}
|
907
2274
|
generateSkeletonScreens(e2) {
|
908
2275
|
var t2;
|
909
|
-
let i2 = "", n2 = this.findPageElement(1), r2 =
|
2276
|
+
let i2 = "", n2 = this.findPageElement(1), r2 = ie(n2, "style"), s2 = ie(null == n2 ? void 0 : n2.querySelector("sheet"), "style"), o2 = null === (t2 = this.findLastElement(".trv-report-page")) || void 0 === t2 ? void 0 : t2.dataset.page, a2 = o2 ? parseInt(o2) + 1 : 1;
|
910
2277
|
for (; a2 < e2; a2++)
|
911
|
-
i2 +=
|
912
|
-
|
2278
|
+
i2 += ce(De, a2, r2, s2);
|
2279
|
+
Y(this.pageWrapper, i2);
|
913
2280
|
}
|
914
2281
|
loadMorePages() {
|
915
2282
|
var e2;
|
@@ -947,7 +2314,7 @@ var telerikReportViewer = (function (exports) {
|
|
947
2314
|
let r2 = this.contentArea.renderPageElement(e2);
|
948
2315
|
t2 && (this.pageWrapper.innerHTML = ""), this.pageWrapper.dataset.pageNumber = i2.toString();
|
949
2316
|
let s2 = this.findElement(".trv-skeleton-" + i2);
|
950
|
-
s2 ? (s2.after(r2), s2.remove()) : this.pageWrapper.append(r2), this.contentArea.setScrollablePage(r2, e2), this.controller.
|
2317
|
+
s2 ? (s2.after(r2), s2.remove()) : this.pageWrapper.append(r2), this.contentArea.setScrollablePage(r2, e2), this.controller.applySearchColors();
|
951
2318
|
}
|
952
2319
|
loadNextPreviousPage(e2) {
|
953
2320
|
if (e2 < this.controller.getPageCount()) {
|
@@ -960,10 +2327,10 @@ var telerikReportViewer = (function (exports) {
|
|
960
2327
|
}
|
961
2328
|
}
|
962
2329
|
initEvents() {
|
963
|
-
this.onClickHandler = this.clickPage.bind(this), this.debounceScroll =
|
2330
|
+
this.onClickHandler = this.clickPage.bind(this), this.debounceScroll = re(() => {
|
964
2331
|
let e2 = this.placeholder.querySelectorAll(".trv-report-page"), t2 = Math.round(this.pageContainer.scrollTop + this.pageContainer.offsetHeight);
|
965
2332
|
!this.scrollInProgress && e2.length && this.oldScrollTopPosition !== t2 && this.advanceCurrentPage(Array.from(e2));
|
966
|
-
}, 250), this.throttleScroll =
|
2333
|
+
}, 250), this.throttleScroll = se(() => {
|
967
2334
|
let e2 = this.placeholder.querySelectorAll(".trv-report-page"), t2 = Math.round(this.pageContainer.scrollTop + this.pageContainer.offsetHeight);
|
968
2335
|
this.scrollInProgress || this.oldScrollTopPosition === t2 || (this.oldScrollTopPosition > t2 ? this.scrollUp(Array.from(e2)) : this.scrollDown(Array.from(e2), t2)), this.oldScrollTopPosition = t2;
|
969
2336
|
}, 250), this.pageContainer.addEventListener("click", this.onClickHandler), this.pageContainer.addEventListener("scroll", this.debounceScroll), this.pageContainer.addEventListener("scroll", this.throttleScroll);
|
@@ -1003,7 +2370,7 @@ var telerikReportViewer = (function (exports) {
|
|
1003
2370
|
return o2 <= l2 && l2 < a2 ? 0 : a2 < l2 ? -1 : 1;
|
1004
2371
|
}
|
1005
2372
|
scrollDown(e2, t2) {
|
1006
|
-
if (t2 >= this.pageContainer.scrollHeight) {
|
2373
|
+
if (t2 >= this.pageContainer.scrollHeight - 5) {
|
1007
2374
|
let t3 = parseInt(e2[e2.length - 1].dataset.page || "") + 1;
|
1008
2375
|
this.currentPageNumber() < t3 && t3 <= this.controller.getPageCount() && (this.addSkeletonScreen(t3, false), this.getAndRenderPage(t3));
|
1009
2376
|
} else
|
@@ -1037,8 +2404,8 @@ var telerikReportViewer = (function (exports) {
|
|
1037
2404
|
}
|
1038
2405
|
scrollToPage(e2, t2) {
|
1039
2406
|
this.animateScroll(e2, 500, () => {
|
1040
|
-
|
1041
|
-
this.scrollInProgress = false;
|
2407
|
+
setTimeout(() => {
|
2408
|
+
this.setCurrentPage(t2), this.scrollInProgress = false;
|
1042
2409
|
});
|
1043
2410
|
});
|
1044
2411
|
}
|
@@ -1058,7 +2425,7 @@ var telerikReportViewer = (function (exports) {
|
|
1058
2425
|
return i2 && i2.length ? i2[i2.length - 1] : null;
|
1059
2426
|
}
|
1060
2427
|
}
|
1061
|
-
class
|
2428
|
+
class ke {
|
1062
2429
|
constructor() {
|
1063
2430
|
this.scaleFactor = 0, this.placeholder = null, this.scrollableContainer = null, this.itemsInitialState = {}, this.xFrozenAreasBounds = {}, this.yFrozenAreasBounds = {}, this.freezeMaxZIndex = {}, this.freezeBGColor = {}, this.currentlyFrozenContainer = { vertical: {}, horizontal: {} }, this.zIndex = 1;
|
1064
2431
|
}
|
@@ -1066,7 +2433,7 @@ var telerikReportViewer = (function (exports) {
|
|
1066
2433
|
this.reset(e2), this.attachToScrollEvent();
|
1067
2434
|
}
|
1068
2435
|
reset(e2) {
|
1069
|
-
this.placeholder = e2, this.scrollableContainer =
|
2436
|
+
this.placeholder = e2, this.scrollableContainer = te(e2, ".trv-page-container"), this.itemsInitialState = {}, this.xFrozenAreasBounds = {}, this.yFrozenAreasBounds = {}, this.currentlyFrozenContainer = { vertical: {}, horizontal: {} };
|
1070
2437
|
}
|
1071
2438
|
setScaleFactor(e2) {
|
1072
2439
|
this.scaleFactor = e2;
|
@@ -1089,7 +2456,7 @@ var telerikReportViewer = (function (exports) {
|
|
1089
2456
|
saveFreezeItemsInitialState(e2) {
|
1090
2457
|
var t2, i2, n2;
|
1091
2458
|
let r2 = null === (t2 = this.placeholder) || void 0 === t2 ? void 0 : t2.querySelectorAll("[data-sticky-direction][data-sticky-id='" + e2 + "']"), s2 = null === (i2 = this.placeholder) || void 0 === i2 ? void 0 : i2.querySelectorAll("[data-reporting-action][data-sticky-id='" + e2 + "']"), o2 = null, a2 = null, l2 = null, h2 = null;
|
1092
|
-
this.itemsInitialState[e2] = {}, this.freezeBGColor[e2] = (null === (n2 =
|
2459
|
+
this.itemsInitialState[e2] = {}, this.freezeBGColor[e2] = (null === (n2 = te(this.placeholder, "[data-id='" + e2 + "']")) || void 0 === n2 ? void 0 : n2.dataset.stickyBgColor) || "", r2.forEach((t3) => {
|
1093
2460
|
var i3;
|
1094
2461
|
let n3 = t3.dataset.stickyDirection, r3 = (null === (i3 = t3.dataset.id) || void 0 === i3 ? void 0 : i3.toString()) || "", s3 = t3.offsetLeft / this.scaleFactor, c2 = t3.offsetLeft + t3.offsetWidth * this.scaleFactor, d2 = t3.offsetTop / this.scaleFactor, u2 = t3.offsetTop + t3.offsetHeight * this.scaleFactor, p2 = (e3, t4) => null === e3 || t4 < e3 ? t4 : e3, g2 = (e3, t4) => null === e3 || t4 > e3 ? t4 : e3;
|
1095
2462
|
switch (n3) {
|
@@ -1111,7 +2478,7 @@ var telerikReportViewer = (function (exports) {
|
|
1111
2478
|
}
|
1112
2479
|
updateFreezeItemsOnScroll(e2, t2, i2) {
|
1113
2480
|
var n2, r2;
|
1114
|
-
let s2 =
|
2481
|
+
let s2 = te(this.placeholder, "div[data-id='" + e2 + "']");
|
1115
2482
|
if (!s2)
|
1116
2483
|
return;
|
1117
2484
|
let o2 = null === (n2 = this.placeholder) || void 0 === n2 ? void 0 : n2.querySelectorAll("[data-sticky-direction*='Horizontal'][data-sticky-id='" + e2 + "']"), a2 = null === (r2 = this.placeholder) || void 0 === r2 ? void 0 : r2.querySelectorAll("[data-sticky-direction*='Vertical'][data-sticky-id='" + e2 + "']");
|
@@ -1136,7 +2503,7 @@ var telerikReportViewer = (function (exports) {
|
|
1136
2503
|
"IMG" !== e2.tagName && (t2 && this.isFrozen(r2) && !i2 ? e2.style.backgroundColor = this.freezeBGColor[r2] : e2.style.backgroundColor = n2 ? this.freezeBGColor[r2] : "initial");
|
1137
2504
|
}
|
1138
2505
|
hasSetBgColor(e2) {
|
1139
|
-
return
|
2506
|
+
return Q(e2) > 0;
|
1140
2507
|
}
|
1141
2508
|
isFrozen(e2) {
|
1142
2509
|
return this.currentlyFrozenContainer.horizontal[e2] || this.currentlyFrozenContainer.vertical[e2];
|
@@ -1156,21 +2523,21 @@ var telerikReportViewer = (function (exports) {
|
|
1156
2523
|
return e2.top > t2.scrollTop - n2 && e2.top < t2.scrollTop + n2 + i2.height;
|
1157
2524
|
}
|
1158
2525
|
}
|
1159
|
-
const
|
1160
|
-
function
|
2526
|
+
const Fe = /{(\w+?)}/g, Oe = "trv-initial-image-styles";
|
2527
|
+
function Ve(e2, t2) {
|
1161
2528
|
let i2 = Array.isArray(t2);
|
1162
|
-
return e2 ? e2.replace(
|
2529
|
+
return e2 ? e2.replace(Fe, function(e3, n2) {
|
1163
2530
|
return t2[i2 ? parseInt(n2) : n2];
|
1164
2531
|
}) : "";
|
1165
2532
|
}
|
1166
|
-
const
|
2533
|
+
const ze = "trv-search-dialog-shaded-result", _e = "trv-search-dialog-highlighted-result";
|
1167
2534
|
e.BookmarkNode = class {
|
1168
2535
|
constructor() {
|
1169
2536
|
this.id = "", this.text = "", this.page = 0, this.items = null;
|
1170
2537
|
}
|
1171
2538
|
}, e.ContentArea = class {
|
1172
2539
|
constructor(e2, t2, i2, n2 = {}) {
|
1173
|
-
this.actions = [], this.pendingElement = null, this.documentReady = true, this.reportPageIsLoaded = false, this.navigateToPageOnDocReady = 0, this.navigateToElementOnDocReady = null, this.onClickHandler = null, this.onMouseEnterHandler = null, this.onMouseLeaveHandler = null, this.isNewReportSource = false, this.uiFreezeCoordinator = null, this.initialPageAreaImageUrl = "", this.showPageAreaImage = false, this.placeholder = e2.querySelector(".trv-pages-pane, .trv-pages-area"), this.pageContainer = e2.querySelector(".trv-page-container"), this.pageWrapper = e2.querySelector(".trv-page-wrapper"), this.parametersContainer = e2.querySelector(".trv-parameters-area"), this.notification = e2.querySelector(".trv-notification, .trv-error-pane"), this.scrollManager = new
|
2540
|
+
this.actions = [], this.pendingElement = null, this.documentReady = true, this.reportPageIsLoaded = false, this.navigateToPageOnDocReady = 0, this.navigateToElementOnDocReady = null, this.onClickHandler = null, this.onMouseEnterHandler = null, this.onMouseLeaveHandler = null, this.isNewReportSource = false, this.uiFreezeCoordinator = null, this.initialPageAreaImageUrl = "", this.showPageAreaImage = false, this.placeholder = e2.querySelector(".trv-pages-pane, .trv-pages-area"), this.pageContainer = e2.querySelector(".trv-page-container"), this.pageWrapper = e2.querySelector(".trv-page-wrapper"), this.parametersContainer = e2.querySelector(".trv-parameters-area"), this.notification = e2.querySelector(".trv-notification, .trv-error-pane"), this.scrollManager = new Ne(this.placeholder, this, t2), this.resizeService = new xe(this.pageContainer), this.resizeService.on("resize", this.onResize.bind(this)), this.controller = t2, this.controller.on("pageReady", this.onPageReady.bind(this)).on("navigateToPage", this.navigateToPage.bind(this)).on("serverActionStarted", this.onServerActionStarted.bind(this)).on("reportSourceChanged", this.onReportSourceChanged.bind(this)).on("scaleChanged", this.updatePageDimensions.bind(this)).on("scaleModeChanged", this.updatePageDimensions.bind(this)).on("printStarted", this.onPrintStarted.bind(this)).on("printDocumentReady", this.onPrintDocumentReady.bind(this)).on("exportStarted", this.onExportStarted.bind(this)).on("exportDocumentReady", this.onExportDocumentReady.bind(this)).onAsync("beforeLoadReport", this.onBeforeLoadReport.bind(this)).on("beginLoadReport", this.onBeginLoadReport.bind(this)).on("reportLoadProgress", this.onReportLoadProgress.bind(this)).onAsync("reportLoadComplete", this.onReportLoadComplete.bind(this)).onAsync("reportAutoRunOff", this.onReportAutoRunOff.bind(this)).on("renderingStopped", this.onRenderingStopped.bind(this)).on("missingOrInvalidParameters", this.onMissingOrInvalidParameters.bind(this)).on("noReport", this.onNoReport.bind(this)).on("error", this.onError.bind(this)), this.messages = i2, this.enableAccessibility = n2.enableAccessibility || false, this.initialPageAreaImageUrl = n2.initialPageAreaImageUrl || "";
|
1174
2541
|
}
|
1175
2542
|
destroy() {
|
1176
2543
|
this.resizeService && this.resizeService.destroy();
|
@@ -1179,7 +2546,7 @@ var telerikReportViewer = (function (exports) {
|
|
1179
2546
|
this.shouldAutosizePage() && this.updatePageDimensions();
|
1180
2547
|
}
|
1181
2548
|
onPageReady(t2) {
|
1182
|
-
this.controller.getPageMode() === e.PageMode.SinglePage ? (this.scrollManager.getEnabled() && this.scrollManager.disable(), this.setPageContent(t2)) : this.scrollManager.renderPage(t2), this.reportPageIsLoaded || (this.reportPageIsLoaded = true), this.showPageAreaImage && this.clearPageAreaImage(), this.controller.getViewMode() === e.ViewMode.Interactive && null !== this.uiFreezeCoordinator && this.uiFreezeCoordinator.init(this.placeholder), this.disablePagesArea(false);
|
2549
|
+
this.controller.getPageMode() === e.PageMode.SinglePage ? (this.scrollManager.getEnabled() && this.scrollManager.disable(), this.setPageContent(t2)) : this.scrollManager.renderPage(t2), this.navigateToElement(this.pendingElement, t2.pageNumber), this.reportPageIsLoaded || (this.reportPageIsLoaded = true), this.showPageAreaImage && this.clearPageAreaImage(), this.controller.getViewMode() === e.ViewMode.Interactive && null !== this.uiFreezeCoordinator && this.uiFreezeCoordinator.init(this.placeholder), this.disablePagesArea(false);
|
1183
2550
|
}
|
1184
2551
|
onServerActionStarted() {
|
1185
2552
|
this.disablePagesArea(true), this.disableParametersArea(true), this.showNotification(this.messages.ReportViewer_LoadingReport);
|
@@ -1196,13 +2563,11 @@ var telerikReportViewer = (function (exports) {
|
|
1196
2563
|
onBeginLoadReport() {
|
1197
2564
|
this.documentReady = true, this.invalidateCurrentlyLoadedPage();
|
1198
2565
|
}
|
1199
|
-
onReportLoadProgress(
|
1200
|
-
|
1201
|
-
t2.pageCount > 1 && t2.pageCount < 10 && this.controller.getPageMode() === e.PageMode.ContinuousScroll && !(null === (i2 = this.pageWrapper.classList) || void 0 === i2 ? void 0 : i2.contains("temp-height")) && (null === (n2 = this.pageWrapper.classList) || void 0 === n2 || n2.add("temp-height")), this.navigateWhenPageAvailable(this.navigateToPageOnDocReady, t2.pageCount), this.showNotification(ke(this.messages.ReportViewer_LoadingReportPagesInProgress, [t2.pageCount]));
|
2566
|
+
onReportLoadProgress(e2) {
|
2567
|
+
this.navigateWhenPageAvailable(this.navigateToPageOnDocReady, e2.pageCount), this.showNotification(Ve(this.messages.ReportViewer_LoadingReportPagesInProgress, [e2.pageCount]));
|
1202
2568
|
}
|
1203
2569
|
onReportLoadComplete(t2) {
|
1204
|
-
|
1205
|
-
0 === t2.pageCount ? (this.clearPage(), this.showNotification(this.messages.ReportViewer_NoPageToDisplay), null === (i2 = this.pageWrapper.classList) || void 0 === i2 || i2.remove("temp-height")) : (1 === t2.pageCount && (null === (n2 = this.pageWrapper.classList) || void 0 === n2 || n2.remove("temp-height")), this.navigateOnLoadComplete(this.navigateToPageOnDocReady, t2.pageCount), this.showNotification(ke(this.messages.ReportViewer_LoadedReportPagesComplete, [t2.pageCount])), this.showNotificationTimeoutId = window.setTimeout(this.hideNotification.bind(this), 2e3), this.disableParametersArea(false), this.enableInteractivity()), t2.containsFrozenContent && null === this.uiFreezeCoordinator && (this.uiFreezeCoordinator = new xe(), this.controller.getViewMode() === e.ViewMode.Interactive && this.uiFreezeCoordinator.init(this.placeholder));
|
2570
|
+
0 === t2.pageCount ? (this.clearPage(), this.showNotification(this.messages.ReportViewer_NoPageToDisplay)) : (this.navigateOnLoadComplete(this.navigateToPageOnDocReady, t2.pageCount), this.showNotification(Ve(this.messages.ReportViewer_LoadedReportPagesComplete, [t2.pageCount])), this.showNotificationTimeoutId = window.setTimeout(this.hideNotification.bind(this), 2e3), this.disableParametersArea(false), this.enableInteractivity()), t2.containsFrozenContent && null === this.uiFreezeCoordinator && (this.uiFreezeCoordinator = new ke(), this.controller.getViewMode() === e.ViewMode.Interactive && this.uiFreezeCoordinator.init(this.placeholder));
|
1206
2571
|
}
|
1207
2572
|
onReportAutoRunOff() {
|
1208
2573
|
this.disableParametersArea(false), this.showNotification(this.messages.ReportViewer_AutoRunDisabled || "Please validate the report parameter values and press Preview to generate the report.");
|
@@ -1296,14 +2661,14 @@ var telerikReportViewer = (function (exports) {
|
|
1296
2661
|
}
|
1297
2662
|
let e3 = 0, i3 = 0;
|
1298
2663
|
for (; n2 && n2 !== this.pageContainer; ) {
|
1299
|
-
if (
|
2664
|
+
if (W(n2, "trv-page-wrapper")) {
|
1300
2665
|
let t3 = n2.dataset.pageScale;
|
1301
2666
|
if ("string" == typeof t3) {
|
1302
2667
|
let n3 = parseFloat(t3);
|
1303
2668
|
e3 *= n3, i3 *= n3;
|
1304
2669
|
}
|
1305
2670
|
}
|
1306
|
-
e3 += n2.offsetTop, i3 += n2.offsetLeft, n2 =
|
2671
|
+
e3 += n2.offsetTop, i3 += n2.offsetLeft, n2 = j(n2);
|
1307
2672
|
}
|
1308
2673
|
this.scrollManager.getEnabled() && t2 ? this.scrollManager.navigateToElement(e3, t2) : (this.pageContainer.scrollTop = e3, this.pageContainer.scrollLeft = i3);
|
1309
2674
|
} else
|
@@ -1317,7 +2682,7 @@ var telerikReportViewer = (function (exports) {
|
|
1317
2682
|
return !isNaN(t2) && t2 > -1 ? e2 : this.findNextFocusableElement(e2.nextElementSibling);
|
1318
2683
|
}
|
1319
2684
|
disablePagesArea(e2) {
|
1320
|
-
e2 ?
|
2685
|
+
e2 ? B(this.placeholder, "trv-loading") : q(this.placeholder, "trv-loading");
|
1321
2686
|
}
|
1322
2687
|
disableParametersArea(e2) {
|
1323
2688
|
var t2, i2;
|
@@ -1329,11 +2694,11 @@ var telerikReportViewer = (function (exports) {
|
|
1329
2694
|
showNotification(e2 = "", t2 = "info") {
|
1330
2695
|
this.notification.dataset.type = t2 || "info";
|
1331
2696
|
let i2 = this.notification.querySelector(".k-notification-content, .trv-error-message"), n2 = null == e2 ? void 0 : e2.split(/\r?\n/);
|
1332
|
-
i2.innerHTML = n2 && n2.length ? `${n2.join("<br>")}` : "Notification message not found.",
|
2697
|
+
i2.innerHTML = n2 && n2.length ? `${n2.join("<br>")}` : "Notification message not found.", B(this.notification, `k-notification-${t2}`), q(this.notification, "k-hidden");
|
1333
2698
|
}
|
1334
2699
|
hideNotification() {
|
1335
2700
|
let e2 = String(this.notification.dataset.type);
|
1336
|
-
delete this.notification.dataset.type,
|
2701
|
+
delete this.notification.dataset.type, q(this.notification, `k-notification-${e2}`), B(this.notification, "k-hidden");
|
1337
2702
|
}
|
1338
2703
|
pageNo(e2) {
|
1339
2704
|
var t2;
|
@@ -1352,10 +2717,13 @@ var telerikReportViewer = (function (exports) {
|
|
1352
2717
|
let o2 = s2.querySelector("div.sheet"), a2 = s2.querySelector("div.trv-skeleton-wrapper");
|
1353
2718
|
if (o2 = o2 || a2, !o2)
|
1354
2719
|
return;
|
1355
|
-
let l2 = 0, h2 = 0, c2 = getComputedStyle(s2), d2 = getComputedStyle(t2), u2 =
|
1356
|
-
l2 = o2.offsetWidth, h2 = o2.offsetHeight
|
2720
|
+
let l2 = 0, h2 = 0, c2 = getComputedStyle(s2), d2 = getComputedStyle(t2), u2 = G(d2.marginLeft) + G(c2.borderLeftWidth) + G(c2.paddingLeft), p2 = G(d2.marginRight) + G(c2.borderRightWidth) + G(c2.paddingRight), g2 = G(d2.marginTop) + G(c2.borderTopWidth) + G(c2.paddingTop), m2 = G(d2.marginBottom) + G(c2.borderBottomWidth) + G(c2.paddingBottom);
|
2721
|
+
if (l2 = o2.offsetWidth, h2 = o2.offsetHeight, 0 === l2) {
|
2722
|
+
const e2 = getComputedStyle(o2);
|
2723
|
+
l2 = parseInt(e2.width), h2 = parseInt(e2.height);
|
2724
|
+
}
|
1357
2725
|
let f2 = h2 > l2 && n2 === e.ScaleMode.FitPageWidth ? 20 : 0, v2 = (this.pageContainer.clientWidth - f2 - u2 - p2) / l2, P2 = (this.pageContainer.clientHeight - 1 - g2 - m2) / h2;
|
1358
|
-
n2 === e.ScaleMode.FitPageWidth ? r2 = v2 : r2 && n2 !== e.ScaleMode.FitPage || (r2 = Math.min(v2, P2)), null !== this.uiFreezeCoordinator && this.uiFreezeCoordinator.setScaleFactor(r2), t2.dataset.pageScale = r2.toString(), s2.dataset.pageScale = r2.toString(), a2 ||
|
2726
|
+
n2 === e.ScaleMode.FitPageWidth ? r2 = v2 : r2 && n2 !== e.ScaleMode.FitPage || (r2 = Math.min(v2, P2)), null !== this.uiFreezeCoordinator && this.uiFreezeCoordinator.setScaleFactor(r2), t2.dataset.pageScale = r2.toString(), s2.dataset.pageScale = r2.toString(), a2 || J(o2, r2, r2), s2.style.height = r2 * h2 + "px", s2.style.width = r2 * l2 + "px";
|
1359
2727
|
}
|
1360
2728
|
enableInteractivity() {
|
1361
2729
|
this.onClickHandler = this.onClick.bind(this), this.onMouseEnterHandler = this.onMouseEnter.bind(this), this.onMouseLeaveHandler = this.onMouseLeave.bind(this), this.pageContainer.addEventListener("click", this.onClickHandler), this.pageContainer.addEventListener("mouseenter", this.onMouseEnterHandler, true), this.pageContainer.addEventListener("mouseleave", this.onMouseLeaveHandler, true);
|
@@ -1377,25 +2745,25 @@ var telerikReportViewer = (function (exports) {
|
|
1377
2745
|
}
|
1378
2746
|
onInteractiveItemClick(e2, t2) {
|
1379
2747
|
var i2;
|
1380
|
-
let n2 = (null === (i2 = e2.dataset.reportingAction) || void 0 === i2 ? void 0 : i2.toString()) || "",
|
1381
|
-
|
2748
|
+
let n2 = (null === (i2 = e2.dataset.reportingAction) || void 0 === i2 ? void 0 : i2.toString()) || "", r2 = this.getAction(n2);
|
2749
|
+
r2 && (this.navigateToPageOnDocReady = this.getNavigateToPageOnDocReady(t2, r2.Type), this.controller.executeReportAction(new a(e2, r2))), t2.stopPropagation();
|
1382
2750
|
}
|
1383
2751
|
onInteractiveItemEnter(e2) {
|
1384
2752
|
var t2;
|
1385
2753
|
let i2 = (null === (t2 = e2.dataset.reportingAction) || void 0 === t2 ? void 0 : t2.toString()) || "", n2 = this.getAction(i2);
|
1386
|
-
n2 && this.controller.reportActionEnter(new
|
2754
|
+
n2 && this.controller.reportActionEnter(new a(e2, n2));
|
1387
2755
|
}
|
1388
2756
|
onInteractiveItemLeave(e2) {
|
1389
2757
|
var t2;
|
1390
2758
|
let i2 = (null === (t2 = e2.dataset.reportingAction) || void 0 === t2 ? void 0 : t2.toString()) || "", n2 = this.getAction(i2);
|
1391
|
-
n2 && this.controller.reportActionLeave(new
|
2759
|
+
n2 && this.controller.reportActionLeave(new a(e2, n2));
|
1392
2760
|
}
|
1393
2761
|
onToolTipItemEnter(e2, t2) {
|
1394
2762
|
let i2 = e2.dataset.tooltipTitle, n2 = e2.dataset.tooltipText;
|
1395
|
-
(i2 || n2) && this.controller.reportTooltipOpening(new
|
2763
|
+
(i2 || n2) && this.controller.reportTooltipOpening(new Le(e2, n2 || "", i2 || "", t2));
|
1396
2764
|
}
|
1397
2765
|
onToolTipItemLeave(e2) {
|
1398
|
-
this.controller.reportTooltipClosing(new
|
2766
|
+
this.controller.reportTooltipClosing(new Le(e2, "", "", null));
|
1399
2767
|
}
|
1400
2768
|
getNavigateToPageOnDocReady(e2, t2) {
|
1401
2769
|
var i2;
|
@@ -1413,38 +2781,38 @@ var telerikReportViewer = (function (exports) {
|
|
1413
2781
|
var t2;
|
1414
2782
|
let i2 = "trv-" + this.controller.getClientId() + "-styles";
|
1415
2783
|
null === (t2 = document.getElementById(i2)) || void 0 === t2 || t2.remove();
|
1416
|
-
let n2 =
|
2784
|
+
let n2 = H("style", i2);
|
1417
2785
|
n2.innerHTML = e2.pageStyles, document.head.appendChild(n2);
|
1418
2786
|
}
|
1419
2787
|
setPageContent(e2) {
|
1420
2788
|
this.actions = e2.pageActions, this.updatePageStyle(e2);
|
1421
2789
|
let t2 = this.renderPageElement(e2);
|
1422
|
-
this.pageWrapper.dataset.pageNumber = e2.pageNumber.toString(), this.pageWrapper.innerHTML = "", this.pageWrapper.append(t2), this.controller.setCurrentPageNumber(e2.pageNumber), this.applyPlaceholderViewModeClass(), this.setPageDimensions(this.pageWrapper), this.pageContainer.scrollTop = 0, this.pageContainer.scrollLeft = 0
|
2790
|
+
this.pageWrapper.dataset.pageNumber = e2.pageNumber.toString(), this.pageWrapper.innerHTML = "", this.pageWrapper.append(t2), this.controller.setCurrentPageNumber(e2.pageNumber), this.controller.applySearchColors(), this.applyPlaceholderViewModeClass(), this.setPageDimensions(this.pageWrapper), this.pageContainer.scrollTop = 0, this.pageContainer.scrollLeft = 0;
|
1423
2791
|
}
|
1424
2792
|
setScrollablePage(e2, t2) {
|
1425
2793
|
this.actions && this.actions.length ? this.actions = this.actions.concat(t2.pageActions) : this.actions = t2.pageActions, this.applyPlaceholderViewModeClass(), this.setPageDimensions(e2, t2.pageNumber);
|
1426
2794
|
}
|
1427
2795
|
renderPageElement(e2) {
|
1428
|
-
let t2 =
|
2796
|
+
let t2 = H("div");
|
1429
2797
|
t2.innerHTML = e2.pageContent;
|
1430
2798
|
let i2 = t2.querySelector("div.sheet");
|
1431
2799
|
i2.style.margin = "0";
|
1432
|
-
let n2 =
|
1433
|
-
return n2.dataset.page = e2.pageNumber.toString(), n2.append(i2), n2.append(
|
2800
|
+
let n2 = H("div", "", "trv-report-page");
|
2801
|
+
return n2.dataset.page = e2.pageNumber.toString(), n2.append(i2), n2.append(H("div", "", "k-overlay trv-overlay trv-page-overlay")), n2;
|
1434
2802
|
}
|
1435
2803
|
applyPlaceholderViewModeClass() {
|
1436
|
-
this.controller.getViewMode() === e.ViewMode.Interactive ? (
|
2804
|
+
this.controller.getViewMode() === e.ViewMode.Interactive ? (q(this.placeholder, "printpreview"), B(this.placeholder, "interactive")) : (q(this.placeholder, "interactive"), B(this.placeholder, "printpreview"));
|
1437
2805
|
}
|
1438
2806
|
setPageAreaImage() {
|
1439
2807
|
this.clearPageAreaImage();
|
1440
|
-
let e2 =
|
1441
|
-
e2.innerHTML =
|
2808
|
+
let e2 = H("style", Oe);
|
2809
|
+
e2.innerHTML = Ve('.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}', [this.initialPageAreaImageUrl]), document.head.appendChild(e2), this.showPageAreaImage = true;
|
1442
2810
|
}
|
1443
2811
|
clearPageAreaImage() {
|
1444
2812
|
var e2;
|
1445
|
-
null === (e2 = document.getElementById(
|
2813
|
+
null === (e2 = document.getElementById(Oe)) || void 0 === e2 || e2.remove();
|
1446
2814
|
}
|
1447
|
-
}, e.DeviceInfo =
|
2815
|
+
}, e.DeviceInfo = s, e.DocumentInfo = class {
|
1448
2816
|
constructor() {
|
1449
2817
|
this.documentReady = false, this.documentMapAvailable = false, this.containsFrozenContent = false, this.pageCount = 0, this.documentMapNodes = [], this.bookmarkNodes = [], this.renderingExtensions = [], this.autoRunEnabled = true;
|
1450
2818
|
}
|
@@ -1452,19 +2820,19 @@ var telerikReportViewer = (function (exports) {
|
|
1452
2820
|
constructor() {
|
1453
2821
|
this.id = "", this.isExpanded = false, this.label = "", this.text = "", this.page = 0, this.items = [];
|
1454
2822
|
}
|
1455
|
-
}, e.EmailInfo =
|
2823
|
+
}, e.EmailInfo = o, e.ExportDocumentReadyEventArgs = c, e.ExportStartEventArgs = h, e.KeepClientAliveSentinel = O, e.PageAction = class {
|
1456
2824
|
constructor() {
|
1457
2825
|
this.Id = "", this.ReportItemName = "", this.Type = "", this.Value = {};
|
1458
2826
|
}
|
1459
|
-
}, e.PageActionEventArgs =
|
2827
|
+
}, e.PageActionEventArgs = a, e.PageInfo = class {
|
1460
2828
|
constructor() {
|
1461
2829
|
this.pageNumber = 0, this.pageReady = false, this.pageStyles = "", this.pageContent = "", this.pageActions = [];
|
1462
2830
|
}
|
1463
|
-
}, e.PageTargetElement =
|
2831
|
+
}, e.PageTargetElement = l, e.ParameterInfo = class {
|
1464
2832
|
constructor() {
|
1465
2833
|
this.name = "", this.type = "", this.text = "", this.multivalue = false, this.allowNull = false, this.allowBlank = false, this.isVisible = false, this.autoRefresh = false, this.hasChildParameters = false, this.childParameters = [], this.availableValues = [], this.value = "", this.id = "", this.label = "";
|
1466
2834
|
}
|
1467
|
-
}, e.ParameterValidators =
|
2835
|
+
}, e.ParameterValidators = Ee, e.ParameterValue = class {
|
1468
2836
|
constructor() {
|
1469
2837
|
this.name = "", this.value = null;
|
1470
2838
|
}
|
@@ -1472,9 +2840,9 @@ var telerikReportViewer = (function (exports) {
|
|
1472
2840
|
constructor() {
|
1473
2841
|
this.name = "", this.localizedName = "";
|
1474
2842
|
}
|
1475
|
-
}, e.ReportController = class extends
|
2843
|
+
}, e.ReportController = class extends A {
|
1476
2844
|
constructor(e2, t2) {
|
1477
|
-
super(), this.configurationInfo = null, this.keepClientAliveSentinel = null, this.registerClientPromise = null, this.registerInstancePromise = null, this.documentFormatsPromise = null, this.clientId = "", this.reportInstanceId = "", this.documentId = "", this.threadId = "", this.parameterValues = {}, this.bookmarkNodes = [], this.renderingExtensions = null, this.pageCount = 0, this.currentPageNumber = 0, this.clientHasExpired = false, this.cancelLoad = false, this.searchInitiated = false, this.aiPromptInitiated = false, this.contentTabIndex = 0, this.respectAutoRun = true, this.processedParameterValues = {}, this.options = t2, t2.reportSource && this.setParameters(t2.reportSource.parameters), this.printManager = new
|
2845
|
+
super(), this.configurationInfo = null, this.keepClientAliveSentinel = null, this.registerClientPromise = null, this.registerInstancePromise = null, this.documentFormatsPromise = null, this.clientId = "", this.reportInstanceId = "", this.documentId = "", this.threadId = "", this.parameterValues = {}, this.bookmarkNodes = [], this.renderingExtensions = null, this.pageCount = 0, this.currentPageNumber = 0, this.clientHasExpired = false, this.cancelLoad = false, this.searchInitiated = false, this.aiPromptInitiated = false, this.contentTabIndex = 0, this.respectAutoRun = true, this.processedParameterValues = {}, this.options = t2, t2.reportSource && this.setParameters(t2.reportSource.parameters), this.printManager = new k(), this.serviceClient = e2, t2.authenticationToken && this.serviceClient.setAccessToken(t2.authenticationToken);
|
1478
2846
|
}
|
1479
2847
|
get autoRunEnabled() {
|
1480
2848
|
var e2 = !this.parameterValues || !("trv_AutoRun" in this.parameterValues) || this.parameterValues.trv_AutoRun;
|
@@ -1517,7 +2885,7 @@ var telerikReportViewer = (function (exports) {
|
|
1517
2885
|
let n2 = {}, r2 = [], s2 = false;
|
1518
2886
|
for (let t3 of e2)
|
1519
2887
|
try {
|
1520
|
-
let e3 =
|
2888
|
+
let e3 = Ee.validate(t3, t3.value);
|
1521
2889
|
n2[t3.id] = e3;
|
1522
2890
|
} catch (e3) {
|
1523
2891
|
s2 = true, r2.push(t3);
|
@@ -1527,7 +2895,7 @@ var telerikReportViewer = (function (exports) {
|
|
1527
2895
|
hasInvalidParameter(e2) {
|
1528
2896
|
for (const t2 of e2)
|
1529
2897
|
try {
|
1530
|
-
|
2898
|
+
Ee.validate(t2, t2.value);
|
1531
2899
|
} catch (e3) {
|
1532
2900
|
return true;
|
1533
2901
|
}
|
@@ -1559,7 +2927,7 @@ var telerikReportViewer = (function (exports) {
|
|
1559
2927
|
}
|
1560
2928
|
getReportSource() {
|
1561
2929
|
var e2;
|
1562
|
-
return new
|
2930
|
+
return new Me(null === (e2 = this.options.reportSource) || void 0 === e2 ? void 0 : e2.report, this.parameterValues);
|
1563
2931
|
}
|
1564
2932
|
setReportSource(e2) {
|
1565
2933
|
this.options.reportSource = e2, this.setParameters(this.options.reportSource.parameters), this.emit("reportSourceChanged", e2);
|
@@ -1609,8 +2977,8 @@ var telerikReportViewer = (function (exports) {
|
|
1609
2977
|
getPageCount() {
|
1610
2978
|
return this.pageCount;
|
1611
2979
|
}
|
1612
|
-
|
1613
|
-
this.emit("
|
2980
|
+
applySearchColors() {
|
2981
|
+
this.emit("applySearchColors");
|
1614
2982
|
}
|
1615
2983
|
executeReportAction(e2) {
|
1616
2984
|
let t2 = e2.action;
|
@@ -1621,7 +2989,7 @@ var telerikReportViewer = (function (exports) {
|
|
1621
2989
|
let e3 = t2.Value, i2 = this.fixDataContractJsonSerializer(e3.ParameterValues);
|
1622
2990
|
this.respectAutoRun = true, this.emit("navigateToReport", { Report: e3.Report, Parameters: i2 });
|
1623
2991
|
} else if ("navigateToBookmark" === t2.Type) {
|
1624
|
-
let e3 = this.getPageForBookmark(this.bookmarkNodes, t2.Value), i2 = new
|
2992
|
+
let e3 = this.getPageForBookmark(this.bookmarkNodes, t2.Value), i2 = new l(t2.Value, "bookmark");
|
1625
2993
|
this.navigateToPage(e3, i2);
|
1626
2994
|
} else if ("sorting" === t2.Type)
|
1627
2995
|
this.execServerAction(t2.Id);
|
@@ -1647,40 +3015,40 @@ var telerikReportViewer = (function (exports) {
|
|
1647
3015
|
this.emit("toolTipClosing", e2);
|
1648
3016
|
}
|
1649
3017
|
printReport() {
|
1650
|
-
return
|
3018
|
+
return r(this, void 0, void 0, function* () {
|
1651
3019
|
let e2 = this.createDeviceInfo();
|
1652
3020
|
e2.ImmediatePrint = true;
|
1653
|
-
let t2 = new
|
3021
|
+
let t2 = new fe(e2);
|
1654
3022
|
this.emit("printStarted", t2), t2.handled || (this.setUIState("PrintInProgress", true), this.exportAsync("PDF", e2).then((e3) => {
|
1655
3023
|
let t3 = this.serviceClient.getDocumentUrl(this.clientId, this.reportInstanceId, e3);
|
1656
3024
|
t3 += `?${"response-content-disposition=" + (this.getCanUsePlugin() ? "inline" : "attachment")}`;
|
1657
|
-
let i2 = new
|
3025
|
+
let i2 = new ve(t3);
|
1658
3026
|
this.emit("printDocumentReady", i2), this.setUIState("PrintInProgress", false), i2.handled || this.printManager.print(t3);
|
1659
3027
|
}));
|
1660
3028
|
});
|
1661
3029
|
}
|
1662
3030
|
exportReport(e2) {
|
1663
|
-
return
|
1664
|
-
let
|
1665
|
-
if (yield this.emitAsync("exportStart",
|
1666
|
-
let
|
1667
|
-
if (this.emit("exportStarted",
|
3031
|
+
return r(this, void 0, void 0, function* () {
|
3032
|
+
let t2 = this.createDeviceInfo(), i2 = new h(t2, e2);
|
3033
|
+
if (yield this.emitAsync("exportStart", i2), !i2.isCancelled) {
|
3034
|
+
let n2 = new Pe(t2, e2);
|
3035
|
+
if (this.emit("exportStarted", n2), n2.handled)
|
1668
3036
|
return;
|
1669
|
-
this.setUIState("ExportInProgress", true), this.exportAsync(e2,
|
1670
|
-
let
|
1671
|
-
|
1672
|
-
let n3 = new
|
1673
|
-
yield this.emitAsync("exportEnd", n3), this.emit("exportDocumentReady", n3), this.setUIState("ExportInProgress", false), n3.handled || window.open(
|
3037
|
+
this.setUIState("ExportInProgress", true), this.exportAsync(e2, i2.deviceInfo).then((t3) => r(this, void 0, void 0, function* () {
|
3038
|
+
let i3 = this.serviceClient.getDocumentUrl(this.clientId, this.reportInstanceId, t3);
|
3039
|
+
i3 += "?response-content-disposition=attachment";
|
3040
|
+
let n3 = new c(i3, e2, "_self");
|
3041
|
+
yield this.emitAsync("exportEnd", n3), this.emit("exportDocumentReady", n3), this.setUIState("ExportInProgress", false), n3.handled || window.open(i3, n3.windowOpenTarget);
|
1674
3042
|
}));
|
1675
3043
|
}
|
1676
3044
|
});
|
1677
3045
|
}
|
1678
3046
|
sendReport(e2) {
|
1679
|
-
let t2 = this.createDeviceInfo(), i2 = new
|
3047
|
+
let t2 = this.createDeviceInfo(), i2 = new ye(t2, e2.format);
|
1680
3048
|
this.emit("sendEmailStarted", i2), i2.handled || this.exportAsync(e2.format, t2).then((i3) => {
|
1681
3049
|
let n2 = this.serviceClient.getDocumentUrl(this.clientId, this.reportInstanceId, i3);
|
1682
3050
|
n2 += "?response-content-disposition=attachment";
|
1683
|
-
let r2 = new
|
3051
|
+
let r2 = new Ie(e2, t2, n2);
|
1684
3052
|
this.emit("sendEmailDocumentReady", r2), r2.handled || this.sendDocumentAsync(i3, e2);
|
1685
3053
|
});
|
1686
3054
|
}
|
@@ -1688,19 +3056,24 @@ var telerikReportViewer = (function (exports) {
|
|
1688
3056
|
return this.serviceClient.getSearchResults(this.clientId, this.reportInstanceId, this.documentId, e2).catch(this.handleSearchRequestError.bind(this)).then((e3) => e3 || []);
|
1689
3057
|
}
|
1690
3058
|
createAIThread() {
|
1691
|
-
return this.serviceClient.createAIThread(this.clientId, this.reportInstanceId, this.getReport(), this.parameterValues).catch((e2) => this.raiseError(e2.
|
3059
|
+
return this.serviceClient.createAIThread(this.clientId, this.reportInstanceId, this.getReport(), this.parameterValues).catch((e2) => this.raiseError(e2.exceptionMessage, false)).then((e2) => {
|
3060
|
+
if (this.threadId = (null == e2 ? void 0 : e2.threadId) || "", e2.consentMessage && (e2.consentMessage = n.default.sanitize(e2.consentMessage, { USE_PROFILES: { html: true } }), n.default.removed && n.default.removed.length > 0 && console.warn("The AI-Powered Insights consent message was sanitized as it contained potentially malicious HTML elements or attributes.")), e2.predefinedPrompts)
|
3061
|
+
for (let t2 = 0; t2 < e2.predefinedPrompts.length; t2++)
|
3062
|
+
e2.predefinedPrompts[t2] = n.default.sanitize(e2.predefinedPrompts[t2], { USE_PROFILES: { html: true } }), n.default.removed && n.default.removed.length > 0 && console.warn("An AI-Powered Insights predefined prompt was sanitized as it contained potentially malicious HTML elements or attributes.");
|
3063
|
+
return e2;
|
3064
|
+
});
|
1692
3065
|
}
|
1693
3066
|
getAIResponse(e2) {
|
1694
3067
|
return this.serviceClient.getAIResponse(this.clientId, this.reportInstanceId, this.documentId, this.threadId, e2).then((e3) => e3 || "");
|
1695
3068
|
}
|
1696
|
-
exportAsync(e2,
|
1697
|
-
return this.initializeClient().then(this.registerInstance.bind(this)).then(() => this.registerDocumentAsync(e2,
|
3069
|
+
exportAsync(e2, t2) {
|
3070
|
+
return this.initializeClient().then(this.registerInstance.bind(this)).then(() => this.registerDocumentAsync(e2, t2, false, this.documentId)).then((e3) => r(this, void 0, void 0, function* () {
|
1698
3071
|
return yield this.getDocumentInfo(false, e3).catch((e4) => this.raiseError(e4)), e3;
|
1699
3072
|
}));
|
1700
3073
|
}
|
1701
3074
|
sendDocumentAsync(e2, t2) {
|
1702
3075
|
return this.serviceClient.sendDocument(this.clientId, this.reportInstanceId, e2, t2).catch((e3) => {
|
1703
|
-
this.handleRequestError(e3,
|
3076
|
+
this.handleRequestError(e3, ce(this.options.messages.ReportViewer_ErrorSendingDocument, Z(this.getReport())));
|
1704
3077
|
});
|
1705
3078
|
}
|
1706
3079
|
loadParameters(e2 = void 0) {
|
@@ -1713,7 +3086,7 @@ var telerikReportViewer = (function (exports) {
|
|
1713
3086
|
}
|
1714
3087
|
initializeAndStartSentinel() {
|
1715
3088
|
this.options.keepClientAlive && this.clientId && this.serviceClient.getClientsSessionTimeoutSeconds().then((e2) => {
|
1716
|
-
this.keepClientAliveSentinel = new
|
3089
|
+
this.keepClientAliveSentinel = new O(this.serviceClient, this.clientId, e2), this.keepClientAliveSentinel.start();
|
1717
3090
|
});
|
1718
3091
|
}
|
1719
3092
|
stopSentinel() {
|
@@ -1738,29 +3111,29 @@ var telerikReportViewer = (function (exports) {
|
|
1738
3111
|
this.pageCount = 0, this.currentPageNumber = 0;
|
1739
3112
|
}
|
1740
3113
|
handleSearchRequestError(e2) {
|
1741
|
-
if (!
|
3114
|
+
if (!oe(e2, "System.ArgumentException"))
|
1742
3115
|
throw this.handleRequestError(e2, "", true), null;
|
1743
3116
|
this.throwPromiseError(e2);
|
1744
3117
|
}
|
1745
3118
|
throwPromiseError(e2) {
|
1746
|
-
throw e2.
|
3119
|
+
throw e2.exceptionMessage ? e2.exceptionMessage : this.options.messages.ReportViewer_PromisesChainStopError;
|
1747
3120
|
}
|
1748
3121
|
handleRequestError(e2, t2 = "", i2 = false) {
|
1749
|
-
|
1750
|
-
let n2 =
|
3122
|
+
ae(e2) && this.onClientExpired();
|
3123
|
+
let n2 = he(e2.error) ? "" : e2.error, r2 = this.formatRequestError(e2, n2, t2);
|
1751
3124
|
this.raiseError(r2), i2 || this.throwPromiseError(e2);
|
1752
3125
|
}
|
1753
3126
|
formatRequestError(e2, t2, i2) {
|
1754
3127
|
let n2 = e2.responseJSON, r2 = "";
|
1755
3128
|
if (n2) {
|
1756
|
-
if (
|
3129
|
+
if (le(e2))
|
1757
3130
|
return this.options.messages.ReportViewer_MissingOrInvalidParameter;
|
1758
|
-
r2 =
|
1759
|
-
let t3 =
|
3131
|
+
r2 = Z(n2.message);
|
3132
|
+
let t3 = Z(n2.exceptionMessage || n2.ExceptionMessage || n2.error_description);
|
1760
3133
|
t3 && (r2 ? r2 += " " + t3 : r2 = t3);
|
1761
3134
|
} else
|
1762
|
-
r2 =
|
1763
|
-
return (i2 || t2) && (r2 && (r2 = " " + r2), r2 =
|
3135
|
+
r2 = Z(e2.responseText);
|
3136
|
+
return (i2 || t2) && (r2 && (r2 = " " + r2), r2 = Z(i2 || t2) + r2), ae(e2) && (r2 += "<br />" + this.options.messages.ReportViewer_ClientExpired), r2;
|
1764
3137
|
}
|
1765
3138
|
raiseError(e2, t2 = true) {
|
1766
3139
|
this.emit("error", e2, t2);
|
@@ -1770,17 +3143,17 @@ var telerikReportViewer = (function (exports) {
|
|
1770
3143
|
}
|
1771
3144
|
initializeClient() {
|
1772
3145
|
return this.registerClientPromise || (this.registerClientPromise = this.serviceClient.registerClient().catch((e2) => {
|
1773
|
-
const t2 =
|
3146
|
+
const t2 = ce(this.options.messages.ReportViewer_ErrorServiceUrl, [this.serviceClient.getServiceUrl()]);
|
1774
3147
|
this.handleRequestError(e2, t2);
|
1775
3148
|
}).then(this.setClientId.bind(this)).catch(this.clearClientId.bind(this))), this.registerClientPromise;
|
1776
3149
|
}
|
1777
3150
|
registerInstance() {
|
1778
3151
|
return this.registerInstancePromise || (this.registerInstancePromise = this.serviceClient.createReportInstance(this.clientId, this.getReport(), this.parameterValues).then(this.setReportInstanceId.bind(this)).catch(this.clearReportInstanceId.bind(this))), this.registerInstancePromise;
|
1779
3152
|
}
|
1780
|
-
registerDocumentAsync(e2, i2, n2
|
1781
|
-
return
|
1782
|
-
return (yield this.serviceClient.createReportDocument(this.clientId, this.reportInstanceId, e2,
|
1783
|
-
this.handleRequestError(
|
3153
|
+
registerDocumentAsync(e2, t2, i2, n2 = "", s2 = "") {
|
3154
|
+
return r(this, void 0, void 0, function* () {
|
3155
|
+
return (yield this.serviceClient.createReportDocument(this.clientId, this.reportInstanceId, e2, t2, !i2, n2, s2).catch((t3) => {
|
3156
|
+
this.handleRequestError(t3, ce(this.options.messages.ReportViewer_ErrorCreatingReportDocument, Z(this.getReport()), Z(e2)));
|
1784
3157
|
})) || "";
|
1785
3158
|
});
|
1786
3159
|
}
|
@@ -1802,10 +3175,10 @@ var telerikReportViewer = (function (exports) {
|
|
1802
3175
|
return e2.ContentOnly = true, e2.UseSVG = true, e2;
|
1803
3176
|
}
|
1804
3177
|
createDeviceInfo() {
|
1805
|
-
let e2 = new
|
3178
|
+
let e2 = new s();
|
1806
3179
|
this.options.enableAccessibility && (e2.enableAccessibility = true, e2.contentTabIndex = this.getContentTabIndex());
|
1807
|
-
let t2 = this.getSearchInitiated(),
|
1808
|
-
return e2.enableSearch = !
|
3180
|
+
let t2 = this.getSearchInitiated(), i2 = this.options.searchMetadataOnDemand;
|
3181
|
+
return e2.enableSearch = !i2 || t2, e2;
|
1809
3182
|
}
|
1810
3183
|
getParameters(e2) {
|
1811
3184
|
return this.serviceClient.getParameters(this.clientId, this.getReport(), e2 || this.parameterValues).catch((e3) => {
|
@@ -1816,7 +3189,7 @@ var telerikReportViewer = (function (exports) {
|
|
1816
3189
|
const e2 = {}, t2 = this.getProcessedParameterValues();
|
1817
3190
|
for (let i2 in t2) {
|
1818
3191
|
const n2 = t2[i2], r2 = this.parameterValues[i2];
|
1819
|
-
n2 && n2.availableValues ? n2.multivalue ? e2[i2] =
|
3192
|
+
n2 && n2.availableValues ? n2.multivalue ? e2[i2] = Ae(n2, r2, i2) : e2[i2] = Te(n2, r2, i2) : e2[i2] = r2;
|
1820
3193
|
}
|
1821
3194
|
return e2;
|
1822
3195
|
}
|
@@ -1826,14 +3199,16 @@ var telerikReportViewer = (function (exports) {
|
|
1826
3199
|
getProcessedParameterValues() {
|
1827
3200
|
return this.processedParameterValues;
|
1828
3201
|
}
|
1829
|
-
getDocumentInfo(
|
1830
|
-
return
|
1831
|
-
let
|
1832
|
-
this.cancelLoad ?
|
1833
|
-
|
1834
|
-
}).catch((
|
3202
|
+
getDocumentInfo(t2, i2) {
|
3203
|
+
return t2 && this.emit("beginLoadReport"), new Promise((n2, s2) => {
|
3204
|
+
let o2 = () => r(this, void 0, void 0, function* () {
|
3205
|
+
this.cancelLoad ? s2(this.options.messages.ReportViewer_RenderingCancelled) : (yield this.registerInstancePromise, this.serviceClient.getDocumentInfo(this.clientId, this.reportInstanceId, i2).then((i3) => {
|
3206
|
+
i3 && i3.documentReady ? n2(i3) : (t2 && (this.getPageMode() === e.PageMode.ContinuousScroll && i3.pageCount > this.pageCount && this.emit("pageLoaded"), this.pageCount = i3.pageCount, this.emit("reportLoadProgress", i3)), window.setTimeout(o2, 500));
|
3207
|
+
}).catch((e2) => {
|
3208
|
+
"InvalidDocumentException" !== e2.responseJSON.exceptionType ? this.handleRequestError(e2, "", true) : console.warn("getDocumentInfo failed or was canceled by the user: " + e2.exceptionMessage);
|
3209
|
+
}));
|
1835
3210
|
});
|
1836
|
-
|
3211
|
+
o2();
|
1837
3212
|
});
|
1838
3213
|
}
|
1839
3214
|
getPage(e2) {
|
@@ -1919,8 +3294,9 @@ ${e3.text} (${e3.id})`;
|
|
1919
3294
|
setConfigurationInfo(e2) {
|
1920
3295
|
this.configurationInfo = e2;
|
1921
3296
|
}
|
1922
|
-
|
1923
|
-
|
3297
|
+
isAiInsightsEnabled() {
|
3298
|
+
var e2, t2;
|
3299
|
+
return null !== (t2 = null === (e2 = this.configurationInfo.options.find((e3) => "ai-insights" === e3.name)) || void 0 === e2 ? void 0 : e2.isAvailable) && void 0 !== t2 && t2;
|
1924
3300
|
}
|
1925
3301
|
shouldShowLicenseBanner() {
|
1926
3302
|
var e2;
|
@@ -1951,19 +3327,13 @@ ${e3.text} (${e3.id})`;
|
|
1951
3327
|
constructor(e2, t2, i2) {
|
1952
3328
|
this.url = e2, this.username = t2, this.password = i2;
|
1953
3329
|
}
|
1954
|
-
}, e.ReportSourceOptions =
|
3330
|
+
}, e.ReportSourceOptions = Me, e.RequestError = d, e.SearchInfo = class {
|
1955
3331
|
constructor() {
|
1956
3332
|
this.searchToken = "", this.matchCase = false, this.matchWholeWord = false, this.useRegularExpressions = false;
|
1957
3333
|
}
|
1958
|
-
}, e.SearchManager = class extends
|
3334
|
+
}, e.SearchManager = class extends A {
|
1959
3335
|
constructor(e2, t2) {
|
1960
|
-
super(), this.searchResults = [], this.pendingHighlightItem = null, this.highlightedElements = [], this.currentHighlightedElement = null, this.isActive = false, this.controller = t2, this.pageContainer =
|
1961
|
-
}
|
1962
|
-
createAIThread() {
|
1963
|
-
return this.controller.createAIThread();
|
1964
|
-
}
|
1965
|
-
getAIResponse(e2) {
|
1966
|
-
return this.controller.getAIResponse(e2);
|
3336
|
+
super(), this.searchResults = [], this.pendingHighlightItem = null, this.highlightedElements = [], this.currentHighlightedElement = null, this.isActive = false, this.controller = t2, this.pageContainer = te(e2, ".trv-page-container"), this.controller.on("applySearchColors", this.applySearchColors.bind(this)).on("pageReady", this.applySearchColors.bind(this));
|
1967
3337
|
}
|
1968
3338
|
search(e2) {
|
1969
3339
|
this.isActive = true, this.clearColoredItems(), this.searchResults = [], e2.searchToken && "" !== e2.searchToken ? this.controller.getSearchResults(e2).then(this.onSearchComplete.bind(this)) : this.onSearchComplete([]);
|
@@ -1972,15 +3342,15 @@ ${e3.text} (${e3.id})`;
|
|
1972
3342
|
this.isActive = false, this.clearColoredItems(), this.searchResults = [];
|
1973
3343
|
}
|
1974
3344
|
highlightSearchItem(t2) {
|
1975
|
-
t2 && (this.currentHighlightedElement && (
|
3345
|
+
t2 && (this.currentHighlightedElement && (q(this.currentHighlightedElement, _e), B(this.currentHighlightedElement, ze)), t2.page === this.controller.getCurrentPageNumber() ? this.highlightItem(t2) : this.controller.getPageMode() === e.PageMode.SinglePage ? this.clearColoredItems() : this.highlightItem(t2), this.pendingHighlightItem = t2, this.navigateToPage(t2));
|
1976
3346
|
}
|
1977
3347
|
navigateToPage(e2) {
|
1978
|
-
this.controller.navigateToPage(e2.page, new
|
3348
|
+
this.controller.navigateToPage(e2.page, new l(e2.id, "search"));
|
1979
3349
|
}
|
1980
3350
|
colorPageElements(e2) {
|
1981
3351
|
e2 && 0 !== e2.length && (e2.forEach((e3) => {
|
1982
|
-
let t2 =
|
1983
|
-
t2 && (
|
3352
|
+
let t2 = te(this.pageContainer, "[data-search-id=" + e3.id + "]");
|
3353
|
+
t2 && (B(t2, ze), this.highlightedElements.push(t2));
|
1984
3354
|
}), this.highlightItem(this.pendingHighlightItem));
|
1985
3355
|
}
|
1986
3356
|
highlightItem(e2) {
|
@@ -1988,15 +3358,15 @@ ${e3.text} (${e3.id})`;
|
|
1988
3358
|
let t2 = this.highlightedElements.find(function(t3) {
|
1989
3359
|
return t3.dataset.searchId === e2.id;
|
1990
3360
|
});
|
1991
|
-
t2 && (this.currentHighlightedElement = t2,
|
3361
|
+
t2 && (this.currentHighlightedElement = t2, q(t2, ze), B(t2, _e));
|
1992
3362
|
}
|
1993
3363
|
}
|
1994
3364
|
clearColoredItems() {
|
1995
3365
|
this.highlightedElements && this.highlightedElements.length > 0 && this.highlightedElements.forEach((e2) => {
|
1996
|
-
|
1997
|
-
}), this.currentHighlightedElement &&
|
3366
|
+
q(e2, ze);
|
3367
|
+
}), this.currentHighlightedElement && q(this.currentHighlightedElement, _e), this.highlightedElements = [], this.currentHighlightedElement = null;
|
1998
3368
|
}
|
1999
|
-
|
3369
|
+
applySearchColors() {
|
2000
3370
|
this.isActive && this.colorPageElements(this.searchResults);
|
2001
3371
|
}
|
2002
3372
|
onSearchComplete(e2) {
|
@@ -2017,19 +3387,19 @@ ${e3.text} (${e3.id})`;
|
|
2017
3387
|
authenticatedGet(e2) {
|
2018
3388
|
return this.login().then(function(t2) {
|
2019
3389
|
return function(e3, t3) {
|
2020
|
-
return fetch(e3, { headers:
|
3390
|
+
return fetch(e3, { headers: u(t3) }).then(p);
|
2021
3391
|
}(e2, t2);
|
2022
3392
|
});
|
2023
3393
|
}
|
2024
3394
|
authenticatedPost(e2, t2) {
|
2025
3395
|
return this.login().then(function(i2) {
|
2026
|
-
return
|
3396
|
+
return g(e2, t2, i2);
|
2027
3397
|
});
|
2028
3398
|
}
|
2029
3399
|
authenticatedDelete(e2) {
|
2030
3400
|
return this.login().then(function(t2) {
|
2031
3401
|
return function(e3, t3) {
|
2032
|
-
return fetch(e3, { method: "DELETE", headers:
|
3402
|
+
return fetch(e3, { method: "DELETE", headers: u(t3) }).then(p);
|
2033
3403
|
}(e2, t2);
|
2034
3404
|
});
|
2035
3405
|
}
|
@@ -2040,7 +3410,7 @@ ${e3.text} (${e3.id})`;
|
|
2040
3410
|
let e2 = this.options.loginInfo;
|
2041
3411
|
if (e2 && e2.url && (e2.username || e2.password)) {
|
2042
3412
|
let t2 = `grant_type=password&username=${encodeURIComponent((null == e2 ? void 0 : e2.username) || "")}&password=${encodeURIComponent((null == e2 ? void 0 : e2.password) || "")}`;
|
2043
|
-
return
|
3413
|
+
return g(e2.url, t2, "", true).then((e3) => e3.access_token);
|
2044
3414
|
}
|
2045
3415
|
return Promise.resolve("");
|
2046
3416
|
}
|
@@ -2130,15 +3500,15 @@ ${e3.text} (${e3.id})`;
|
|
2130
3500
|
constructor(e2, t2 = null) {
|
2131
3501
|
this.serviceUrl = "", this.serviceUrl = e2.replace(/\/+$/, ""), this.loginInfo = t2;
|
2132
3502
|
}
|
2133
|
-
}, e.addClass =
|
3503
|
+
}, e.addClass = B, e.appendHtml = Y, e.createElement = H, e.debounce = re, e.each = de, e.escapeHtml = Z, e.findElement = te, e.getColorAlphaValue = Q, e.getElementAttributeValue = ie, e.getElementScrollParent = ne, e.getOffsetParent = j, e.hasClass = W, e.isArray = ue, e.isExceptionOfType = oe, e.isInternalServerError = he, e.isInvalidClientException = ae, e.isInvalidParameterException = le, e.isRgbColor = X, e.keepElementInView = function(e2) {
|
2134
3504
|
if (!e2)
|
2135
3505
|
return;
|
2136
|
-
let t2 =
|
3506
|
+
let t2 = ne(e2);
|
2137
3507
|
if (!t2)
|
2138
3508
|
return;
|
2139
3509
|
let i2 = e2.offsetTop, n2 = i2 + e2.offsetHeight, r2 = t2.scrollTop + t2.offsetHeight;
|
2140
3510
|
i2 < t2.scrollTop ? t2.scrollTop = i2 : n2 > r2 && (t2.scrollTop += n2 - r2);
|
2141
|
-
}, e.parseToLocalDate =
|
3511
|
+
}, e.parseToLocalDate = me, e.prependHtml = ee, e.removeClass = q, e.reportSourcesAreEqual = function(e2) {
|
2142
3512
|
const t2 = e2.firstReportSource, i2 = e2.secondReportSource;
|
2143
3513
|
if (t2 && i2 && t2.report === i2.report) {
|
2144
3514
|
let e3 = "";
|
@@ -2147,7 +3517,7 @@ ${e3.text} (${e3.id})`;
|
|
2147
3517
|
return i2.parameters && (n2 = JSON.stringify(i2.parameters)), e3 === n2;
|
2148
3518
|
}
|
2149
3519
|
return false;
|
2150
|
-
}, e.scaleElement =
|
3520
|
+
}, e.scaleElement = J, e.stringFormat = ce, e.throttle = se, e.toPixel = G, e.toRgbColor = K, e.tryParseFloat = ge, e.tryParseInt = pe, Object.defineProperty(e, "__esModule", { value: true });
|
2151
3521
|
});
|
2152
3522
|
})(dist, dist.exports);
|
2153
3523
|
var distExports = dist.exports;
|
@@ -2182,13 +3552,6 @@ ${e3.text} (${e3.id})`;
|
|
2182
3552
|
return false;
|
2183
3553
|
};
|
2184
3554
|
}
|
2185
|
-
function toXhrErrorData(xhr, status, error) {
|
2186
|
-
return {
|
2187
|
-
xhr,
|
2188
|
-
status,
|
2189
|
-
error
|
2190
|
-
};
|
2191
|
-
}
|
2192
3555
|
function rectangle(left, top, width, height) {
|
2193
3556
|
return {
|
2194
3557
|
left,
|
@@ -2341,13 +3704,6 @@ ${e3.text} (${e3.id})`;
|
|
2341
3704
|
}
|
2342
3705
|
return parseJSON(xhr.responseText);
|
2343
3706
|
}
|
2344
|
-
function loadScript(url) {
|
2345
|
-
var ajaxOptions = {
|
2346
|
-
dataType: "script",
|
2347
|
-
cache: true
|
2348
|
-
};
|
2349
|
-
return $ajax(url, ajaxOptions);
|
2350
|
-
}
|
2351
3707
|
function filterUniqueLastOccurrence(array) {
|
2352
3708
|
function onlyLastUnique(value, index, self) {
|
2353
3709
|
return self.lastIndexOf(value) === index;
|
@@ -2397,15 +3753,6 @@ ${e3.text} (${e3.id})`;
|
|
2397
3753
|
var alpha = colorComponents.length === 4 ? parseFloat((parseFloat(colorComponents[3].replace(/[()]/g, "")) / 255).toFixed(2)) : 1;
|
2398
3754
|
return alpha;
|
2399
3755
|
}
|
2400
|
-
function $ajax(url, ajaxSettings) {
|
2401
|
-
return new Promise(function(resolve, reject) {
|
2402
|
-
$.ajax(url, ajaxSettings).done(function(data) {
|
2403
|
-
return resolve(data);
|
2404
|
-
}).fail(function(xhr, status, error) {
|
2405
|
-
reject(toXhrErrorData(xhr, status, error));
|
2406
|
-
});
|
2407
|
-
});
|
2408
|
-
}
|
2409
3756
|
|
2410
3757
|
const utils = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
2411
3758
|
__proto__: null,
|
@@ -2427,13 +3774,11 @@ ${e3.text} (${e3.id})`;
|
|
2427
3774
|
exceptionTypeNamesMatch,
|
2428
3775
|
parseJSON,
|
2429
3776
|
getExceptionInstance,
|
2430
|
-
loadScript,
|
2431
3777
|
filterUniqueLastOccurrence,
|
2432
3778
|
logError,
|
2433
3779
|
toRgbColor,
|
2434
3780
|
isRgbColor,
|
2435
3781
|
getColorAlphaValue,
|
2436
|
-
$ajax,
|
2437
3782
|
tryParseInt: distExports.tryParseInt,
|
2438
3783
|
tryParseFloat: distExports.tryParseFloat,
|
2439
3784
|
parseToLocalDate: distExports.parseToLocalDate,
|
@@ -3176,6 +4521,8 @@ ${e3.text} (${e3.id})`;
|
|
3176
4521
|
menuPreviousPageTitle: "Previous Page",
|
3177
4522
|
menuNextPageTitle: "Next Page",
|
3178
4523
|
menuPageNumberTitle: "Page Number Selector",
|
4524
|
+
menuPageText: "Page",
|
4525
|
+
menuPageOfText: "of",
|
3179
4526
|
menuDocumentMapTitle: "Toggle Document Map",
|
3180
4527
|
menuParametersAreaTitle: "Toggle Parameters Area",
|
3181
4528
|
menuZoomInTitle: "Zoom In",
|
@@ -3283,9 +4630,12 @@ ${e3.text} (${e3.id})`;
|
|
3283
4630
|
sendEmailValidationSingleEmail: "The field accepts a single email address only",
|
3284
4631
|
sendEmailValidationFormatRequired: "Format field is required",
|
3285
4632
|
errorSendingDocument: "Error sending report document (Report = '{0}').",
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
4633
|
+
aiPromptDialogConsentTitle: "Before you start with AI",
|
4634
|
+
aiPromptDialogConsentAccept: "Consent",
|
4635
|
+
aiPromptDialogConsentReject: "Cancel",
|
4636
|
+
aiPromptDialogTextAreaPlaceholder: "Enter your prompt",
|
4637
|
+
aiPromptDialogNoPredefinedAndCustomPromptsPlaceholder: "Custom prompts are disabled and there are no predefined prompts configured. Please allow custom prompts or add predefined prompts to use the AI feature.",
|
4638
|
+
aiPromptDialogNoCustomPromptsPlaceholder: "Custom prompts are disabled, please select one of the predefined suggestions below"
|
3289
4639
|
};
|
3290
4640
|
window.telerikReportViewer ||= {};
|
3291
4641
|
window.telerikReportViewer.sr ||= sr$1;
|
@@ -4764,9 +6114,9 @@ ${e3.text} (${e3.id})`;
|
|
4764
6114
|
}
|
4765
6115
|
showDocumentMap(show) {
|
4766
6116
|
var splitter = $("#" + this.options.viewerSelector + "-document-map-splitter").getKendoSplitter();
|
4767
|
-
var sibling = this.$element.next();
|
6117
|
+
var sibling = this.$element.next(".k-splitbar");
|
4768
6118
|
if (this.options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
|
4769
|
-
sibling = this.$element.prev();
|
6119
|
+
sibling = this.$element.prev(".k-splitbar");
|
4770
6120
|
}
|
4771
6121
|
if (splitter) {
|
4772
6122
|
(this.documentMapNecessary ? $.fn.removeClass : $.fn.addClass).call(sibling, "k-hidden");
|
@@ -4979,8 +6329,8 @@ ${e3.text} (${e3.id})`;
|
|
4979
6329
|
throw "No notificationService (telerikReporting.NotificationService) has been specified.";
|
4980
6330
|
}
|
4981
6331
|
this.parameterEditors = ParameterEditors;
|
4982
|
-
if (options.parameterEditors && options.parameterEditors.length > 0) {
|
4983
|
-
this.parameterEditors = [].concat(options.parameterEditors, ParameterEditors);
|
6332
|
+
if (this.options.parameterEditors && this.options.parameterEditors.length > 0) {
|
6333
|
+
this.parameterEditors = [].concat(this.options.parameterEditors, ParameterEditors);
|
4984
6334
|
}
|
4985
6335
|
this.recentParameterValues;
|
4986
6336
|
this.parameters;
|
@@ -5139,6 +6489,9 @@ ${e3.text} (${e3.id})`;
|
|
5139
6489
|
(this.allParametersAutoRefresh(parameters) && this.controller.autoRunEnabled ? $.fn.removeClass : $.fn.addClass).call(this.$element, "preview");
|
5140
6490
|
}
|
5141
6491
|
allParametersAutoRefresh(parameters) {
|
6492
|
+
if (!parameters) {
|
6493
|
+
return true;
|
6494
|
+
}
|
5142
6495
|
var allAuto = Array.from(parameters).every((parameter) => {
|
5143
6496
|
return !parameter.isVisible || parameter.autoRefresh;
|
5144
6497
|
});
|
@@ -5367,9 +6720,9 @@ ${e3.text} (${e3.id})`;
|
|
5367
6720
|
if (!splitter) {
|
5368
6721
|
return;
|
5369
6722
|
}
|
5370
|
-
var sibling = this.$element.prev();
|
6723
|
+
var sibling = this.$element.prev(".k-splitbar");
|
5371
6724
|
if (this.options.parametersAreaPosition === ParametersAreaPositions.TOP || this.options.parametersAreaPosition === ParametersAreaPositions.LEFT) {
|
5372
|
-
sibling = this.$element.next();
|
6725
|
+
sibling = this.$element.next(".k-splitbar");
|
5373
6726
|
}
|
5374
6727
|
(this.parametersAreaNecessary ? $.fn.removeClass : $.fn.addClass).call(sibling, "k-hidden");
|
5375
6728
|
splitter.toggle(".trv-parameters-area", show);
|
@@ -5386,8 +6739,10 @@ ${e3.text} (${e3.id})`;
|
|
5386
6739
|
_attachEvents() {
|
5387
6740
|
this.controller.on("reloadParameters", (controllerLoadParametersPromise) => {
|
5388
6741
|
this.showError();
|
5389
|
-
|
5390
|
-
|
6742
|
+
if (this._parametersWrapper) {
|
6743
|
+
kendo.destroy(this._parametersWrapper);
|
6744
|
+
this._parametersWrapper.innerHTML = "";
|
6745
|
+
}
|
5391
6746
|
this.acceptParameters(controllerLoadParametersPromise, this.onLoadParametersSuccess.bind(this));
|
5392
6747
|
}).onAsync("beforeLoadReport", async () => {
|
5393
6748
|
this.loadingCount = 0;
|
@@ -5523,7 +6878,7 @@ ${e3.text} (${e3.id})`;
|
|
5523
6878
|
"button": Button,
|
5524
6879
|
"toggle-button": ToggleButton
|
5525
6880
|
};
|
5526
|
-
function replaceStringResources$
|
6881
|
+
function replaceStringResources$3($search) {
|
5527
6882
|
if (!$search) {
|
5528
6883
|
return;
|
5529
6884
|
}
|
@@ -5581,7 +6936,7 @@ ${e3.text} (${e3.id})`;
|
|
5581
6936
|
if (!this.notificationService) {
|
5582
6937
|
throw "No notificationService (telerikReporting.NotificationService) has been specified.";
|
5583
6938
|
}
|
5584
|
-
this.pagesAreaContainer =
|
6939
|
+
this.pagesAreaContainer = this.reportViewerWrapper.find('[data-id="trv-pages-area"]');
|
5585
6940
|
this.searchManager = new distExports.SearchManager(this.pagesAreaContainer[0], this.controller);
|
5586
6941
|
this.searchManager.on("searchComplete", this.updateResultsUI.bind(this));
|
5587
6942
|
this.init();
|
@@ -5590,7 +6945,7 @@ ${e3.text} (${e3.id})`;
|
|
5590
6945
|
if (this.initialized) {
|
5591
6946
|
return;
|
5592
6947
|
}
|
5593
|
-
replaceStringResources$
|
6948
|
+
replaceStringResources$3(this.$element);
|
5594
6949
|
this._initDialog();
|
5595
6950
|
this._initSearchbox();
|
5596
6951
|
this._initResultsArea();
|
@@ -5961,7 +7316,7 @@ ${e3.text} (${e3.id})`;
|
|
5961
7316
|
}
|
5962
7317
|
|
5963
7318
|
var defaultOptions$1 = {};
|
5964
|
-
function replaceStringResources$
|
7319
|
+
function replaceStringResources$2($sendEmailDialog) {
|
5965
7320
|
if (!$sendEmailDialog) {
|
5966
7321
|
return;
|
5967
7322
|
}
|
@@ -6051,10 +7406,14 @@ ${e3.text} (${e3.id})`;
|
|
6051
7406
|
if (this.initialized) {
|
6052
7407
|
return;
|
6053
7408
|
}
|
6054
|
-
replaceStringResources$
|
7409
|
+
replaceStringResources$2(this.$element);
|
6055
7410
|
this.controller.getDocumentFormats().then((formats) => {
|
6056
7411
|
this.docFormatList = formats;
|
6057
7412
|
this.docFormat?.setDataSource(this.docFormatList);
|
7413
|
+
if (this.viewerOptions?.sendEmail && this.viewerOptions?.sendEmail.format) {
|
7414
|
+
this.docFormat?.value(this.viewerOptions.sendEmail.format);
|
7415
|
+
this.docFormat?.trigger("change");
|
7416
|
+
}
|
6058
7417
|
});
|
6059
7418
|
this._initDialog();
|
6060
7419
|
this._initInputFields();
|
@@ -6170,6 +7529,7 @@ ${e3.text} (${e3.id})`;
|
|
6170
7529
|
"superscript"
|
6171
7530
|
]
|
6172
7531
|
});
|
7532
|
+
this.setDefaultValues(this.viewerOptions.sendEmail);
|
6173
7533
|
this.kendoValidator = new kendo.ui.Validator(this.element.querySelector(".trv-send-email-fields"), {});
|
6174
7534
|
}
|
6175
7535
|
setAttrs() {
|
@@ -6280,17 +7640,12 @@ ${e3.text} (${e3.id})`;
|
|
6280
7640
|
}
|
6281
7641
|
return fromIsValid && toIsValid && ccIsValid && hasFormat;
|
6282
7642
|
}
|
7643
|
+
/* Sets all default email values except the format as it depends on a request */
|
6283
7644
|
setDefaultValues(sendEmail) {
|
6284
7645
|
this.inputFrom.value(sendEmail && sendEmail.from || "");
|
6285
7646
|
this.inputTo.value(sendEmail && sendEmail.to || "");
|
6286
7647
|
this.inputCC.value(sendEmail && sendEmail.cc || "");
|
6287
7648
|
this.inputSubject.value(sendEmail && sendEmail.subject || "");
|
6288
|
-
if (sendEmail && sendEmail.format) {
|
6289
|
-
this.docFormat.value(sendEmail.format);
|
6290
|
-
} else {
|
6291
|
-
this.docFormat.select(0);
|
6292
|
-
}
|
6293
|
-
this.docFormat.trigger("change");
|
6294
7649
|
this.bodyEditor.value(sendEmail && sendEmail.body || "");
|
6295
7650
|
}
|
6296
7651
|
isEmpty(input) {
|
@@ -6846,11 +8201,27 @@ ${e3.text} (${e3.id})`;
|
|
6846
8201
|
CustomElement: "custom-element"
|
6847
8202
|
};
|
6848
8203
|
|
8204
|
+
function replaceStringResources$1($toolbar) {
|
8205
|
+
if (!$toolbar) {
|
8206
|
+
return;
|
8207
|
+
}
|
8208
|
+
const labels = $toolbar.find(".trv-replace-string");
|
8209
|
+
if (labels && labels.length > 0) {
|
8210
|
+
Array.from(labels).forEach((element) => {
|
8211
|
+
const $element = $(element);
|
8212
|
+
const stringResource = stringResources[$element.text()];
|
8213
|
+
if ($element && stringResource) {
|
8214
|
+
$element.text(stringResource);
|
8215
|
+
}
|
8216
|
+
});
|
8217
|
+
}
|
8218
|
+
}
|
6849
8219
|
class Toolbar {
|
6850
8220
|
// #region fields
|
6851
8221
|
_options;
|
6852
8222
|
/** @type {HTMLElement} */
|
6853
8223
|
_element;
|
8224
|
+
$element;
|
6854
8225
|
_kendoToolbar;
|
6855
8226
|
_neverOverflowToolBarButtons = ["goToPrevPage", "goToNextPage"];
|
6856
8227
|
// #endregion
|
@@ -6858,11 +8229,12 @@ ${e3.text} (${e3.id})`;
|
|
6858
8229
|
constructor(element, options, viewerOptions) {
|
6859
8230
|
this._element = element;
|
6860
8231
|
this._options = options;
|
8232
|
+
this.$element = $(this._element);
|
6861
8233
|
if (this._kendoToolbar === void 0) {
|
6862
8234
|
this.initKendoToolbar();
|
6863
8235
|
}
|
6864
8236
|
this._options.controller.on("beginLoadReport", () => {
|
6865
|
-
const kendoExportDropDown =
|
8237
|
+
const kendoExportDropDown = this.$element.find(`#${ToolBarConstants.ExportDropdownId}`).data("kendoDropDownButton");
|
6866
8238
|
kendoExportDropDown?.enable(false);
|
6867
8239
|
}).onAsync("reportLoadComplete", async () => {
|
6868
8240
|
if (viewerOptions.renderingExtensions === void 0) {
|
@@ -6879,12 +8251,12 @@ ${e3.text} (${e3.id})`;
|
|
6879
8251
|
// #endregion
|
6880
8252
|
// #region methods
|
6881
8253
|
initKendoToolbar() {
|
8254
|
+
replaceStringResources$1(this.$element);
|
6882
8255
|
const children = Array.from(this._element.children);
|
6883
8256
|
const toolBarItems = [];
|
6884
8257
|
children.forEach((child) => toolBarItems.push(this.createToolbarItem(child)));
|
6885
|
-
|
6886
|
-
|
6887
|
-
this._kendoToolbar = $element.kendoToolBar({
|
8258
|
+
this.$element.empty();
|
8259
|
+
this._kendoToolbar = this.$element.kendoToolBar({
|
6888
8260
|
items: toolBarItems,
|
6889
8261
|
click: (e) => {
|
6890
8262
|
this.executeCommand(e);
|
@@ -6893,18 +8265,18 @@ ${e3.text} (${e3.id})`;
|
|
6893
8265
|
this.executeCommand(e);
|
6894
8266
|
}
|
6895
8267
|
}).data("kendoToolBar");
|
6896
|
-
const pageNumberInputEl =
|
8268
|
+
const pageNumberInputEl = this.$element.find(ToolBarConstants.PageNumberInputDataRoleSelector).get(0);
|
6897
8269
|
if (pageNumberInputEl) {
|
6898
8270
|
new PageNumberInput(pageNumberInputEl, this._options);
|
6899
8271
|
}
|
6900
|
-
const pageCountLabelEl =
|
8272
|
+
const pageCountLabelEl = this.$element.find(ToolBarConstants.PageCountLabelDataRoleSelector).get(0);
|
6901
8273
|
if (pageCountLabelEl) {
|
6902
8274
|
new PageCountLabel(pageCountLabelEl, this._options);
|
6903
8275
|
}
|
6904
8276
|
}
|
6905
8277
|
createToolbarItem(elementData) {
|
6906
8278
|
const cmdName = (elementData.dataset?.command || "").replace("telerik_ReportViewer_", "");
|
6907
|
-
if (cmdName === "toggleAiPromptDialog" && !this._options.controller.
|
8279
|
+
if (cmdName === "toggleAiPromptDialog" && !this._options.controller.isAiInsightsEnabled()) {
|
6908
8280
|
return;
|
6909
8281
|
}
|
6910
8282
|
const id = elementData.id;
|
@@ -6998,7 +8370,7 @@ ${e3.text} (${e3.id})`;
|
|
6998
8370
|
cmdFn.exec(cmdParam);
|
6999
8371
|
}
|
7000
8372
|
updateExportDropdownItems(extensions) {
|
7001
|
-
const kendoExportDropDown =
|
8373
|
+
const kendoExportDropDown = this.$element.find(`#${ToolBarConstants.ExportDropdownId}`).data("kendoDropDownButton");
|
7002
8374
|
if (!kendoExportDropDown) {
|
7003
8375
|
return;
|
7004
8376
|
}
|
@@ -7074,12 +8446,13 @@ ${e3.text} (${e3.id})`;
|
|
7074
8446
|
this.kendoAiPromptDialog;
|
7075
8447
|
this.kendoAiPrompt;
|
7076
8448
|
this.kendoAiPromtDialogLocation;
|
7077
|
-
this.
|
8449
|
+
this.reportViewerWrapper = $(`[data-selector='${this.viewerOptions.viewerSelector}']`);
|
8450
|
+
this.pagesAreaContainer = this.reportViewerWrapper.find('[data-id="trv-pages-area"]');
|
7078
8451
|
this.aiPromptDialogInitialized = false;
|
7079
8452
|
this.aiPromptInitialized = false;
|
7080
|
-
|
7081
|
-
this.
|
7082
|
-
this.
|
8453
|
+
this.requireConsent = false;
|
8454
|
+
this.allowCustomPrompts = true;
|
8455
|
+
this.predefinedPrompts = [];
|
7083
8456
|
this.init();
|
7084
8457
|
}
|
7085
8458
|
init() {
|
@@ -7087,10 +8460,8 @@ ${e3.text} (${e3.id})`;
|
|
7087
8460
|
return;
|
7088
8461
|
}
|
7089
8462
|
replaceStringResources(this.$element);
|
7090
|
-
|
7091
|
-
|
7092
|
-
this._attachAiConsentDialogCommands();
|
7093
|
-
}
|
8463
|
+
this._initAiConsentDialog();
|
8464
|
+
this._attachAiConsentDialogCommands();
|
7094
8465
|
this._initAiPromptDialog();
|
7095
8466
|
this._attachEvents();
|
7096
8467
|
this.aiPromptDialogInitialized = true;
|
@@ -7123,7 +8494,10 @@ ${e3.text} (${e3.id})`;
|
|
7123
8494
|
this.kendoAiConsentDialog.close();
|
7124
8495
|
this.controller.saveToSessionStorage("trvAiConsent", "true");
|
7125
8496
|
this.controller.setAiPromptInitiated(true);
|
7126
|
-
this.
|
8497
|
+
if (this.kendoAiPromptDialog) {
|
8498
|
+
this._initAiPrompt(this.predefinedPrompts);
|
8499
|
+
this.kendoAiPromptDialog.open();
|
8500
|
+
}
|
7127
8501
|
})
|
7128
8502
|
};
|
7129
8503
|
Binder.attachCommands(this.kendoAiConsentDialog.element.find(".trv-ai-consent-actions"), optionsCommandSet, this.viewerOptions);
|
@@ -7135,7 +8509,7 @@ ${e3.text} (${e3.id})`;
|
|
7135
8509
|
return;
|
7136
8510
|
}
|
7137
8511
|
this.kendoAiConsentDialog = new kendo.ui.Window(aiConsentDialogElement, {
|
7138
|
-
title: "
|
8512
|
+
title: stringResources["aiPromptDialogConsentTitle"] || "",
|
7139
8513
|
width: 500,
|
7140
8514
|
minWidth: 400,
|
7141
8515
|
minHeight: 106,
|
@@ -7237,14 +8611,14 @@ ${e3.text} (${e3.id})`;
|
|
7237
8611
|
if (this.allowCustomPrompts) {
|
7238
8612
|
return;
|
7239
8613
|
}
|
7240
|
-
let aiPromptTextAreaPlaceholder = "
|
8614
|
+
let aiPromptTextAreaPlaceholder = stringResources["aiPromptDialogTextAreaPlaceholder"];
|
7241
8615
|
const aiPromptTextArea = this.kendoAiPrompt.element.find(".k-prompt-content .k-prompt-view textarea");
|
7242
8616
|
if (!hasPromptSuggestions) {
|
7243
|
-
const aiPromptGenerateButton = this.kendoAiPrompt.element.find(".k-prompt-footer");
|
8617
|
+
const aiPromptGenerateButton = this.kendoAiPrompt.element.find(".k-prompt-footer .k-actions");
|
7244
8618
|
aiPromptGenerateButton && aiPromptGenerateButton.addClass("k-disabled");
|
7245
|
-
aiPromptTextAreaPlaceholder = "
|
8619
|
+
aiPromptTextAreaPlaceholder = stringResources["aiPromptDialogNoPredefinedAndCustomPromptsPlaceholder"] || "";
|
7246
8620
|
} else {
|
7247
|
-
aiPromptTextAreaPlaceholder = "
|
8621
|
+
aiPromptTextAreaPlaceholder = stringResources["aiPromptDialogNoCustomPromptsPlaceholder"] || "";
|
7248
8622
|
}
|
7249
8623
|
aiPromptTextArea && aiPromptTextArea.attr("placeholder", aiPromptTextAreaPlaceholder) && aiPromptTextArea.addClass("k-disabled");
|
7250
8624
|
}
|
@@ -7296,20 +8670,26 @@ ${e3.text} (${e3.id})`;
|
|
7296
8670
|
}
|
7297
8671
|
}
|
7298
8672
|
open() {
|
7299
|
-
|
7300
|
-
this.
|
7301
|
-
|
7302
|
-
|
7303
|
-
|
7304
|
-
|
8673
|
+
this.controller.createAIThread().then((data) => {
|
8674
|
+
this.predefinedPrompts = data?.predefinedPrompts;
|
8675
|
+
this.allowCustomPrompts = data?.allowCustomPrompts;
|
8676
|
+
if (this.kendoAiConsentDialog && data.requireConsent && this.controller.loadFromSessionStorage("trvAiConsent") !== "true") {
|
8677
|
+
$(".trv-ai-consent-content").html(data?.consentMessage);
|
8678
|
+
this.kendoAiConsentDialog.open();
|
8679
|
+
return;
|
8680
|
+
}
|
8681
|
+
if (this.kendoAiPromptDialog) {
|
7305
8682
|
this.controller.setAiPromptInitiated(true);
|
7306
|
-
this._initAiPrompt(
|
8683
|
+
this._initAiPrompt(this.predefinedPrompts);
|
7307
8684
|
this.kendoAiPromptDialog.open();
|
7308
|
-
}
|
7309
|
-
}
|
8685
|
+
}
|
8686
|
+
});
|
7310
8687
|
}
|
7311
8688
|
close() {
|
7312
8689
|
this.controller.setAiPromptInitiated(false);
|
8690
|
+
if (this.kendoAiConsentDialog) {
|
8691
|
+
this.kendoAiConsentDialog.close();
|
8692
|
+
}
|
7313
8693
|
if (this.kendoAiPromptDialog && this.kendoAiPromptDialog.options.visible) {
|
7314
8694
|
this.kendoAiPromptDialog.close();
|
7315
8695
|
}
|
@@ -7401,7 +8781,8 @@ ${e3.text} (${e3.id})`;
|
|
7401
8781
|
searchMetadataOnDemand: false,
|
7402
8782
|
initialPageAreaImageUrl: null,
|
7403
8783
|
keepClientAlive: true,
|
7404
|
-
webDesignerPreview: false
|
8784
|
+
webDesignerPreview: false,
|
8785
|
+
serverPreview: false
|
7405
8786
|
};
|
7406
8787
|
}
|
7407
8788
|
function ReportViewer(dom, options) {
|
@@ -7430,7 +8811,7 @@ ${e3.text} (${e3.id})`;
|
|
7430
8811
|
if (!validateOptions(options)) {
|
7431
8812
|
return;
|
7432
8813
|
}
|
7433
|
-
var version = "19.
|
8814
|
+
var version = "19.2.25.813";
|
7434
8815
|
options = $.extend({}, getDefaultOptions(svcApiUrl, version), options);
|
7435
8816
|
settings = new ReportViewerSettings(
|
7436
8817
|
persistanceKey,
|
@@ -7445,7 +8826,8 @@ ${e3.text} (${e3.id})`;
|
|
7445
8826
|
parametersAreaPosition: options.parametersAreaPosition,
|
7446
8827
|
documentMapAreaPosition: options.documentMapAreaPosition,
|
7447
8828
|
keepClientAlive: options.keepClientAlive,
|
7448
|
-
webDesignerPreview: options.webDesignerPreview
|
8829
|
+
webDesignerPreview: options.webDesignerPreview,
|
8830
|
+
serverPreview: options.serverPreview
|
7449
8831
|
}
|
7450
8832
|
);
|
7451
8833
|
notificationService = new NotificationService();
|
@@ -7923,7 +9305,7 @@ ${e3.text} (${e3.id})`;
|
|
7923
9305
|
function start() {
|
7924
9306
|
var pendingRefresh = false;
|
7925
9307
|
init();
|
7926
|
-
if (!options.webDesignerPreview) {
|
9308
|
+
if (!(options.webDesignerPreview || options.serverPreview)) {
|
7927
9309
|
if (controller.shouldShowLicenseBanner()) {
|
7928
9310
|
$(".trv-content-wrapper")?.prepend('<span class="trv-license-banner"></span>');
|
7929
9311
|
const licenseBanner = $(".trv-license-banner").kendoNotification({
|
@@ -8093,13 +9475,21 @@ ${e3.text} (${e3.id})`;
|
|
8093
9475
|
return Promise.resolve();
|
8094
9476
|
}
|
8095
9477
|
var kendoUrl = rTrim(svcApiUrl, "\\/") + "/resources/js/telerikReportViewer.kendo-" + version2 + ".min.js/";
|
8096
|
-
return
|
9478
|
+
return fetch(kendoUrl).then((response) => {
|
9479
|
+
if (!response.ok) {
|
9480
|
+
return Promise.reject({ error: "Failed to fetch data - status code " + response.status });
|
9481
|
+
}
|
9482
|
+
return response.text();
|
9483
|
+
}).then((kendoScript) => {
|
9484
|
+
const scriptElement = document.createElement("script");
|
9485
|
+
scriptElement.textContent = kendoScript;
|
9486
|
+
document.head.appendChild(scriptElement);
|
9487
|
+
}).catch((errorData) => {
|
8097
9488
|
logError("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: " + errorData.error);
|
8098
9489
|
});
|
8099
9490
|
}
|
8100
9491
|
function main(version2) {
|
8101
9492
|
ensureKendo(version2).then(() => {
|
8102
|
-
}).then(() => {
|
8103
9493
|
viewer.authenticationToken(options.authenticationToken);
|
8104
9494
|
controller.getServiceConfiguration().catch((ex) => {
|
8105
9495
|
var errorOutput = isApplicationExceptionInstance(ex) ? ex.exceptionMessage : stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]);
|
@@ -8135,6 +9525,15 @@ ${e3.text} (${e3.id})`;
|
|
8135
9525
|
}
|
8136
9526
|
return viewer;
|
8137
9527
|
}
|
9528
|
+
function ReportViewerServiceClient(serviceClientOptions) {
|
9529
|
+
return new distExports.ServiceClient(serviceClientOptions);
|
9530
|
+
}
|
9531
|
+
function ReportViewerController(controllerOptions) {
|
9532
|
+
return new distExports.ReportController(controllerOptions?.serviceClient, controllerOptions?.settings);
|
9533
|
+
}
|
9534
|
+
function ReportViewerNotificationService() {
|
9535
|
+
return new NotificationService();
|
9536
|
+
}
|
8138
9537
|
var pluginName = "telerik_ReportViewer";
|
8139
9538
|
$.fn[pluginName] = function(options) {
|
8140
9539
|
if (this.selector && !options.selector) {
|
@@ -8212,6 +9611,9 @@ ${e3.text} (${e3.id})`;
|
|
8212
9611
|
exports.PerspectiveManager = PerspectiveManager;
|
8213
9612
|
exports.PrintModes = PrintModes;
|
8214
9613
|
exports.ReportViewer = ReportViewer;
|
9614
|
+
exports.ReportViewerController = ReportViewerController;
|
9615
|
+
exports.ReportViewerNotificationService = ReportViewerNotificationService;
|
9616
|
+
exports.ReportViewerServiceClient = ReportViewerServiceClient;
|
8215
9617
|
exports.ReportViewerSettings = ReportViewerSettings;
|
8216
9618
|
exports.ScaleModes = ScaleModes;
|
8217
9619
|
exports.TouchBehavior = TouchBehavior;
|