UNPKG

@grapecity/wijmo

Version:

UI library for pure JS, Angular, React, Vue and more...

14 lines (13 loc) • 156 kB
/*! * * Wijmo Library 5.20252.42 * https://developer.mescius.com/wijmo * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the End-User License Agreement For MESCIUS Wijmo Software. * us.sales@mescius.com * https://developer.mescius.com/wijmo/licensing * */ "use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t;return e},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var selfModule=__importStar(require("@grapecity/wijmo")),Binding=function(){function Binding(e){this.path=e}Object.defineProperty(Binding.prototype,"path",{get:function(){return this._path},set:function(e){this._path=e;this._parts=e?e.split("."):[];for(var t=0;t<this._parts.length;t++){var n=this._parts[t],r=n.indexOf("[");if(r>-1){this._parts[t]=n.substr(0,r);this._parts.splice(++t,0,parseInt(n.substr(r+1)))}}this._key=1==this._parts.length?this._parts[0]:null},enumerable:!0,configurable:!0});Binding.prototype.getValue=function(e){if(e){if(this._key)return e[this._key];if(this._path&&this._path in e)return e[this._path];for(var t=0;t<this._parts.length&&e;t++)e=e[this._parts[t]]}return e};Binding.prototype.setValue=function(e,t){if(e)try{var n=this._path;if(n in e){e[n]=t;return e[n]==t}for(var r=0;r<this._parts.length-1;r++)if(null==(e=e[this._parts[r]]))return!1;e[n=this._parts[this._parts.length-1]]=t;return e[n]==t}catch(e){return!1}return!1};return Binding}();exports.Binding=Binding;var EventHandler=function EventHandler(e,t){this.handler=e;this.self=t},Event=function(){function Event(e){this._handlers=[];this._handlersChanged=e}Event.prototype.addHandler=function(e,t){e=asFunction(e);this._handlers.push(new EventHandler(e,t));isFunction(this._handlersChanged)&&this._handlersChanged()};Event.prototype.getHandler=function(e){void 0===e&&(e=0);var t=this._handlers[e];if(t)return t.handler};Event.prototype.removeHandler=function(e,t){var n=!1;e=asFunction(e);for(var r=0;r<this._handlers.length;r++){var i=this._handlers[r];if(!(i.handler!=e&&null!=e||i.self!=t&&null!=t)){this._handlers.splice(r--,1);n=!0;if(e&&t)break}}n&&isFunction(this._handlersChanged)&&this._handlersChanged()};Event.prototype.removeAllHandlers=function(){var e=this._handlers.length>0;this._handlers.length=0;e&&isFunction(this._handlersChanged)&&this._handlersChanged()};Event.prototype.raise=function(e,t){void 0===t&&(t=EventArgs.empty);for(var n=this._handlers,r=0;r<n.length;r++){var i=n[r];i.handler.call(i.self,e,t);n[r]!==i&&r--}};Object.defineProperty(Event.prototype,"hasHandlers",{get:function(){return this._handlers.length>0},enumerable:!0,configurable:!0});Object.defineProperty(Event.prototype,"handlerCount",{get:function(){return this._handlers.length},enumerable:!0,configurable:!0});return Event}();exports.Event=Event;var EventArgs=function(){function EventArgs(){}EventArgs.empty=new EventArgs;return EventArgs}();exports.EventArgs=EventArgs;var CancelEventArgs=function(e){__extends(CancelEventArgs,e);function CancelEventArgs(){var t=null!==e&&e.apply(this,arguments)||this;t.cancel=!1;return t}return CancelEventArgs}(EventArgs);exports.CancelEventArgs=CancelEventArgs;var PropertyChangedEventArgs=function(e){__extends(PropertyChangedEventArgs,e);function PropertyChangedEventArgs(t,n,r){var i=e.call(this)||this;i._name=t;i._oldVal=n;i._newVal=r;return i}Object.defineProperty(PropertyChangedEventArgs.prototype,"propertyName",{get:function(){return this._name},enumerable:!0,configurable:!0});Object.defineProperty(PropertyChangedEventArgs.prototype,"oldValue",{get:function(){return this._oldVal},enumerable:!0,configurable:!0});Object.defineProperty(PropertyChangedEventArgs.prototype,"newValue",{get:function(){return this._newVal},enumerable:!0,configurable:!0});return PropertyChangedEventArgs}(EventArgs);exports.PropertyChangedEventArgs=PropertyChangedEventArgs;var NotifyCollectionChangedAction,RequestErrorEventArgs=function(e){__extends(RequestErrorEventArgs,e);function RequestErrorEventArgs(t,n){var r=e.call(this)||this;r._xhr=t;r._msg=n;return r}Object.defineProperty(RequestErrorEventArgs.prototype,"request",{get:function(){return this._xhr},enumerable:!0,configurable:!0});Object.defineProperty(RequestErrorEventArgs.prototype,"message",{get:function(){return this._msg},set:function(e){this._msg=e},enumerable:!0,configurable:!0});return RequestErrorEventArgs}(CancelEventArgs);exports.RequestErrorEventArgs=RequestErrorEventArgs;!function(e){e[e.Add=0]="Add";e[e.Remove=1]="Remove";e[e.Change=2]="Change";e[e.Reset=3]="Reset"}(NotifyCollectionChangedAction=exports.NotifyCollectionChangedAction||(exports.NotifyCollectionChangedAction={}));var NotifyCollectionChangedEventArgs=function(e){__extends(NotifyCollectionChangedEventArgs,e);function NotifyCollectionChangedEventArgs(t,n,r){void 0===t&&(t=NotifyCollectionChangedAction.Reset);void 0===n&&(n=null);void 0===r&&(r=-1);var i=e.call(this)||this;i.action=t;i.item=n;i.index=r;return i}NotifyCollectionChangedEventArgs.reset=new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);return NotifyCollectionChangedEventArgs}(EventArgs);exports.NotifyCollectionChangedEventArgs=NotifyCollectionChangedEventArgs;var SortDescription=function(){function SortDescription(e,t){this._bnd=new Binding(e);this._asc=t}Object.defineProperty(SortDescription.prototype,"property",{get:function(){return this._bnd.path},enumerable:!0,configurable:!0});Object.defineProperty(SortDescription.prototype,"ascending",{get:function(){return this._asc},enumerable:!0,configurable:!0});return SortDescription}();exports.SortDescription=SortDescription;var PageChangingEventArgs=function(e){__extends(PageChangingEventArgs,e);function PageChangingEventArgs(t){var n=e.call(this)||this;n.newPageIndex=t;return n}return PageChangingEventArgs}(CancelEventArgs);exports.PageChangingEventArgs=PageChangingEventArgs;var GroupDescription=function(){function GroupDescription(){}GroupDescription.prototype.groupNameFromItem=function(e,t){return""};GroupDescription.prototype.namesMatch=function(e,t){return e===t};return GroupDescription}();exports.GroupDescription=GroupDescription;var PropertyGroupDescription=function(e){__extends(PropertyGroupDescription,e);function PropertyGroupDescription(t,n){var r=e.call(this)||this;r._bnd=new Binding(t);r._converter=n;return r}Object.defineProperty(PropertyGroupDescription.prototype,"propertyName",{get:function(){return this._bnd.path},enumerable:!0,configurable:!0});PropertyGroupDescription.prototype.groupNameFromItem=function(e,t){return this._converter?this._converter(e,this.propertyName):this._bnd.getValue(e)};PropertyGroupDescription.prototype.namesMatch=function(e,t){return e===t};return PropertyGroupDescription}(GroupDescription);exports.PropertyGroupDescription=PropertyGroupDescription;exports.empty={};exports.ClipboardClsNames={clipboard:"wj-clipboard"};exports.ControlClsNames={content:"wj-content",hostElement:"wj-control",template:"wj-template"};exports.ControlStateClsNames={active:"wj-state-active",checked:"wj-state-checked",collapsed:"wj-state-collapsed",collapsing:"wj-state-collapsing",disabled:"wj-state-disabled",dragSrc:"wj-state-dragsrc",empty:"wj-state-empty",focus:"wj-state-focus",focused:"wj-state-focused",invalid:"wj-state-invalid",lastSelected:"wj-state-last-selected",loading:"wj-state-loading",match:"wj-state-match",exactMatchSpace:"wj-state-exact-match-space",measuring:"wj-state-measuring",multiSelected:"wj-state-multi-selected",pinned:"wj-state-pinned",readOnly:"wj-state-readonly",selected:"wj-state-selected",sticky:"wj-state-sticky",updating:"wj-state-updating",labeledInput:".wj-labeled-input",wjError:".wj-error",errorVisible:"wj-error-visible"};exports.GlyphClsNames={backward:"wj-glyph-backward",btnGlyph:"wj-btn-glyph",calendar:"wj-glyph-calendar",circle:"wj-glyph-circle",clock:"wj-glyph-clock",down:"wj-glyph-down",downLeft:"wj-glyph-down-left",drag:"wj-glyph-drag",file:"wj-glyph-file",filter:"wj-glyph-filter",forward:"wj-glyph-forward",glyph:"wj-glyph",left:"wj-glyph-left",minus:"wj-glyph-minus",plus:"wj-glyph-plus",right:"wj-glyph-right",stepBackward:"wj-glyph-step-backward",stepForward:"wj-glyph-step-forward",up:"wj-glyph-up"};exports.InputFormElementsClsNames={btn:"wj-btn",btnDefault:"wj-btn-default",btnGroup:"wj-btn-group",btnGroupVertical:"wj-btn-group-vertical",btnsOutside:"wj-btns-outside",formControl:"wj-form-control",svgBtn:"wj-svg-btn"};exports.PrintDocumentClsNames={printDocument:"wj-printdocument"};exports.TooltipClsNames={hostElement:"wj-tooltip"};exports.UtilitesClsNames={align:"wj-align",alignVCenter:"wj-align-vcenter",animated:"wj-animated",centerVert:"wj-center-vert",close:"wj-close",hide:"wj-hide",hideOk:"wj-hide-ok",remove:"wj-remove",right:"wj-right",rtl:"wj-rtl",separator:"wj-separator"};exports.ForeignClsNames={InputClsNames:{input:"wj-input",inputBtnVisible:"wj-input-btn-visible",inputGroup:"wj-input-group",inputGroupBtn:"wj-input-group-btn"},SelectorClsNames:{columnSelector:"wj-column-selector",columnSelectorGroup:"wj-column-selector-group"}};var _agent="undefined"!=typeof navigator?navigator.userAgent:"";function isMobile(){var e=_agent.toLowerCase(),t=["android","webos","iphone","ipad","ipod","blackberry","windows phone","mobile","mobi","tablet"].some((function(t){return e.includes(t)})),n="ontouchstart"in window||navigator.maxTouchPoints>0;return t||n}exports.isMobile=isMobile;var _isiOS=null!=_agent.match(/iPad|iPhone|iPod/i);function isiOS(){return _isiOS}exports.isiOS=isiOS;var _isFF=null!=_agent.match(/Firefox\//);function isFirefox(){return _isFF}exports.isFirefox=isFirefox;var _isSafari=null!=_agent.match(/^((?!Chrome|Android).)*safari/i);function isSafari(){return _isSafari}exports.isSafari=isSafari;var _isEdge=null!=_agent.match(/Edge\/|Edg\//);function isEdge(){return _isEdge}exports.isEdge=isEdge;var _isIE=null!=_agent.match(/MSIE |Trident\/|Edge\//);function isIE(){return _isIE}exports.isIE=isIE;var _isIE9=!1;function isIE9(){return _isIE9}exports.isIE9=isIE9;var _isIE10=!1;function isIE10(){return _isIE10}exports.isIE10=isIE10;var _isChromiumBased=null;function isChromiumBased(){if(null!=_isChromiumBased)return _isChromiumBased;_isChromiumBased=!1;var e="undefined"!=typeof navigator?navigator.userAgentData:null;if(e&&e.brands)for(var t=0,n=e.brands;t<n.length;t++){if("Chromium"==n[t].brand){_isChromiumBased=!0;break}}return _isChromiumBased}exports.isChromiumBased=isChromiumBased;var _supportsPassive=!1;"undefined"!=typeof document&&document.addEventListener("test",(function(e){}),{get passive(){_supportsPassive=!0;return!0}});function getEventOptions(e,t){return _supportsPassive?{capture:e,passive:t}:e}exports.getEventOptions=getEventOptions;var _supportsFocusOptions=!1;"undefined"!=typeof document&&document.createElement("div").focus({get preventScroll(){_supportsFocusOptions=!0;return!0}});function supportsFocusOptions(){return _supportsFocusOptions}exports.supportsFocusOptions=supportsFocusOptions;function _startDrag(e,t){e.effectAllowed=t;isFirefox()&&e.setData("text","")}exports._startDrag=_startDrag;if("undefined"!=typeof document&&document.doctype){navigator.appVersion.indexOf("MSIE 10")>-1&&(_isIE10=!0);if(navigator.appVersion.indexOf("MSIE 9")>-1){_isIE9=!0;document.addEventListener("mousemove",(function(e){if(1==e.which){var t=closest(e.target,"."+exports.ControlClsNames.hostElement);if(t&&!t.style.cursor)for(var n=e.target;n;n=n.parentElement)if(n.attributes&&n.attributes.draggable){n.dragDrop();return!1}}}))}}if("undefined"!=typeof window){var raf="requestAnimationFrame",caf="cancelAnimationFrame";if(!window[raf]){var expectedTime_1=0;window[raf]=function(e){var t=Date.now(),n=16-(t-expectedTime_1),r=n>0?n:0;expectedTime_1=t+r;return setTimeout((function(){e(expectedTime_1)}),r)};window[caf]=clearTimeout}if(!window.atob){var keys_1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",keysRe_1=new RegExp("[^"+keys_1+"]");window.atob=function(e){var t,n,r,i,o=[],s=0,a=e.length;if(keysRe_1.test(e)||/=/.test(e)&&(/=[^=]/.test(e)||/={3}/.test(e)))throw new Error("Invalid base64 data");a%4>0&&(a=(e+=Array(4-a%4+1).join("=")).length);for(;s<a;){for(n=[],i=s;s<i+4;)n.push(keys_1.indexOf(e.charAt(s++)));r=[((t=(n[0]<<18)+(n[1]<<12)+((63&n[2])<<6)+(63&n[3]))&255<<16)>>16,64===n[2]?-1:(65280&t)>>8,64===n[3]?-1:255&t];for(i=0;i<3;++i)(r[i]>=0||0===i)&&o.push(String.fromCharCode(r[i]))}return o.join("")};window.btoa=function(e){for(var t,n,r=[],i=0,o=e.length;i<o;){t=((n=[e.charCodeAt(i++),e.charCodeAt(i++),e.charCodeAt(i++)])[0]<<16)+((n[1]||0)<<8)+(n[2]||0);r.push(keys_1.charAt((t&63<<18)>>18),keys_1.charAt((258048&t)>>12),keys_1.charAt(isNaN(n[1])?64:(4032&t)>>6),keys_1.charAt(isNaN(n[2])?64:63&t))}return r.join("")}}}var _FocusService=function(){function _FocusService(){this._hasDoc="undefined"!=typeof Document;this._ae=this._nativeAe();var e=window,t=this._onBlur.bind(this),n=this._onFocus.bind(this);e.addEventListener("focusout",t,!0);e.addEventListener("focusin",n,!0);if(!isIE()){e.addEventListener("blur",t,!0);e.addEventListener("focus",n,!0)}}Object.defineProperty(_FocusService.prototype,"activeElement",{get:function(){var e=this._ae,t=this._nativeAe();e===_FocusService._noAe?e=this._ae=t:e!=t&&(this._isSpecialRoot(e)||document.body.contains(e)||(e=this._ae=t));return e!==_FocusService._noAe?e:null},enumerable:!0,configurable:!0});_FocusService.prototype._onBlur=function(e){if(e.isTrusted){var t=e.relatedTarget;this._ae=this._isSpecialRoot(t)?this._nativeAe():t}};_FocusService.prototype._onFocus=function(e){e.isTrusted&&(this._ae=this._nativeAe())};_FocusService.prototype._isSpecialRoot=function(e){return null==e||e===document.body||this._hasDoc&&e instanceof Document};_FocusService.prototype._nativeAe=function(){var e;try{e="unknown"!=typeof document.activeElement?document.activeElement:_FocusService._noAe}catch(t){e=_FocusService._noAe}return e};_FocusService.prototype.dispose=function(){if(!isIE()){window.removeEventListener("blur",this._onBlur,!0);window.removeEventListener("focus",this._onFocus,!0)}window.removeEventListener("focusout",this._onBlur,!0);window.removeEventListener("focusin",this._onFocus,!0)};_FocusService._noAe={};return _FocusService}();exports._FocusService=_FocusService;var _getProxyTarget="undefined"!=typeof window&&window.Symbol?Symbol("_getProxyTarget"):"\t_get\tProxy\tTarget\t";function _getCalculatedArray(e,t,n){var r=new WeakMap;if(!n){var i={};if(e.length){var o=e[0];for(var s in o){var a=typeof o[s];i[s]="string"==a?"":"number"==a?0:null}n=i}}return new Proxy(e,{get:function(e,i){if(i===_getProxyTarget)return e;if("string"==typeof i||"number"==typeof i){if("indexOf"==i)return function(t,n){var r=e.indexOf(t,n);r<0&&t&&(t=t[_getProxyTarget])&&(r=e.indexOf(t,n));return r};var o=parseInt(i);if(!isNaN(o)){var s=e[o];if(s&&!s[_getProxyTarget]){var a=r.get(s);if(!a){a=_createItemProxy(s,t,n);r.set(s,a)}s=a}return s}}return Reflect.get(e,i)}})}exports._getCalculatedArray=_getCalculatedArray;function _createItemProxy(e,t,n){if(!e[_getProxyTarget]){if(isIE())for(var r in t)e[r]=null;var i={get:function(e,r,i){if(r===_getProxyTarget)return e;if("constructor"===r)return function(){return Object.assign({},n||{})};var o=t[r];if(o)switch(typeof o){case"function":return o(i);case"string":return _eval(o,i)}return e[r]}};if(!isIE()){i.ownKeys=function(e){return Object.keys(e).concat(Object.keys(t))};i.getOwnPropertyDescriptor=function(e,n){return n in t?{enumerable:!0,configurable:!0,writable:!1}:Reflect.getOwnPropertyDescriptor(e,n)}}e=new Proxy(e,i)}return e}function _getTargetObject(e){return(e?e[_getProxyTarget]:null)||e}exports._getTargetObject=_getTargetObject;function _eval(e,t){var n=[t];return(new(Function.bind.apply(Function,[void 0].concat(["$"],["return "+e])))).apply(void 0,n)}var Key,DataType,_VERSION="5.20252.42";exports._CLS_STATE_DISABLED=exports.ControlStateClsNames.disabled;function getVersion(){return _VERSION}exports.getVersion=getVersion;function setLicenseKey(e){Control._licKey=e}exports.setLicenseKey=setLicenseKey;!function(e){e[e.Back=8]="Back";e[e.Tab=9]="Tab";e[e.Enter=13]="Enter";e[e.Escape=27]="Escape";e[e.Space=32]="Space";e[e.PageUp=33]="PageUp";e[e.PageDown=34]="PageDown";e[e.End=35]="End";e[e.Home=36]="Home";e[e.Left=37]="Left";e[e.Up=38]="Up";e[e.Right=39]="Right";e[e.Down=40]="Down";e[e.Delete=46]="Delete";e[e.X=88]="X";e[e.F1=112]="F1";e[e.F2=113]="F2";e[e.F3=114]="F3";e[e.F4=115]="F4";e[e.F5=116]="F5";e[e.F6=117]="F6";e[e.F7=118]="F7";e[e.F8=119]="F8";e[e.F9=120]="F9";e[e.F10=121]="F10";e[e.F11=122]="F11";e[e.F12=123]="F12";e[e.PlusKey=107]="PlusKey";e[e.EqualPlusKey=187]="EqualPlusKey";e[e.MinusKey=109]="MinusKey";e[e.HyphenMinusKey=189]="HyphenMinusKey";e[e.S=83]="S";e[e.P=80]="P";e[e.F=70]="F"}(Key=exports.Key||(exports.Key={}));!function(e){e[e.Object=0]="Object";e[e.String=1]="String";e[e.Number=2]="Number";e[e.Boolean=3]="Boolean";e[e.Date=4]="Date";e[e.Array=5]="Array"}(DataType=exports.DataType||(exports.DataType={}));function tryCast(e,t){return null==e?null:isString(t)?isFunction(e.implementsInterface)&&e.implementsInterface(t)?e:null:e instanceof t?e:null}exports.tryCast=tryCast;function isPrimitive(e){return isString(e)||isNumber(e)||isBoolean(e)||isDate(e)}exports.isPrimitive=isPrimitive;function isString(e){return"string"==typeof e}exports.isString=isString;function isNullOrWhiteSpace(e){return!e||!/\S/.test(e)}exports.isNullOrWhiteSpace=isNullOrWhiteSpace;function isNumber(e){return"number"==typeof e}exports.isNumber=isNumber;function isInt(e){return isNumber(e)&&e==Math.round(e)}exports.isInt=isInt;function isBoolean(e){return"boolean"==typeof e}exports.isBoolean=isBoolean;function isFunction(e){return"function"==typeof e}exports.isFunction=isFunction;function isUndefined(e){return void 0===e}exports.isUndefined=isUndefined;function isNullOrUndefined(e){return null==e}exports.isNullOrUndefined=isNullOrUndefined;function isDate(e){return(e instanceof Date||"[object Date]"===Object.prototype.toString.call(e))&&!isNaN(e.getTime())}exports.isDate=isDate;function isArray(e){return e instanceof Array||Array.isArray(e)||"[object Array]"===Object.prototype.toString.call(e)}exports.isArray=isArray;function _isPlainArray(e){return Array.isArray(e)}exports._isPlainArray=_isPlainArray;function isObject(e){return null!=e&&"object"==typeof e&&!isDate(e)&&!isArray(e)}exports.isObject=isObject;function isEmpty(e){for(var t in e)return!1;return!0}exports.isEmpty=isEmpty;function _areObjectsEqual(e,t){var n=Object.entries(e),r=Object.entries(t);if(n.length!==r.length)return!1;for(var i=0,o=n;i<o.length;i++){var s=o[i],a=s[0],l=s[1];if(!t.hasOwnProperty(a)||t[a]!==l)return!1}return!0}exports._areObjectsEqual=_areObjectsEqual;function getUniqueId(e){for(var t=e,n=0;null!=document.getElementById(t);n++)t=e+n;return t}exports.getUniqueId=getUniqueId;function getSafeUniqueId(e,t,n){void 0===t&&(t="wj");var r=e;(r=(r=(r=r.trim().toLowerCase()).replace(/[^a-z0-9_-]+/g,"-")).replace(/-+/g,"-").replace(/^-|-$/g,""))?/^[a-z]/.test(r)&&!n||(r=t+"-"+r):r=t+"-"+Date.now();for(var i=0;null!=document.getElementById(r);i++)r+=i;return r}exports.getSafeUniqueId=getSafeUniqueId;function uidGenerator(){for(var e="",t="0123456789abcdef".split(""),n=0;n<32;n++){var r=Math.floor(16*Math.random());switch(n){case 8:e+="-";break;case 12:r=4;e+="-";break;case 16:r=3&r|8;e+="-";break;case 20:e+="-"}e+=t[r]}return e}exports.uidGenerator=uidGenerator;function mouseToPage(e){if(e instanceof Point)return e;e&&e.touches&&e.touches.length>0&&(e=e.touches[0]);if(isNumber(e.clientX)&&isNumber(e.clientY))return new Point(e.clientX+pageXOffset,e.clientY+pageYOffset);throw"Mouse or touch event expected."}exports.mouseToPage=mouseToPage;function getType(e){return isNumber(e)?DataType.Number:isBoolean(e)?DataType.Boolean:isDate(e)?DataType.Date:isString(e)?DataType.String:isArray(e)?DataType.Array:DataType.Object}exports.getType=getType;function getTypes(e,t){void 0===t&&(t=1e3);if(!e)return[];var n=e.length;(t<=0||n<t)&&(t=n);var r=[];if(t){for(var i=Object.keys(e[0]),o={},s=i.slice(),a=0;a<t;a++){for(var l=e[a],u=s.length-1;u>=0;u--){var c=s[u],p=l[c];if(isPrimitive(p)){var h=Object.getOwnPropertyDescriptor(e[a],c);o[c]={binding:c,dataType:getType(p),isReadOnly:h&&!h.writable&&!h.set};s.splice(u,1)}}if(!s.length)break}for(a=0;a<i.length;a++){var f=o[i[a]];f&&r.push(f)}}return r}exports.getTypes=getTypes;function changeType(e,t,n,r){if(null!=e){var i=DataType;if(isString(e))switch(t){case i.Number:var o=Globalize.parseFloat(e,n);return isNaN(o)?e:o;case i.Date:var s=Globalize.parseDate(e,n,isDate(r)?r:null);s||n||!e||(s=new Date(e));return s&&isFinite(s.getTime())?s:e;case i.Boolean:switch(e.toLowerCase()){case"true":return!0;case"false":return!1}return e;case i.Array:try{var a=e.split(",").map((function(e){return(e=e.trim()).match(/^(\+|\-)?\d+\.?\d*$/)?e:'"'+e+'"'}));return JSON.parse("["+a.join(",")+"]")}catch(e){}}if(t==DataType.String)return Globalize.format(e,n)}return e}exports.changeType=changeType;function toFixed(e,t,n){if(n){var r=e.toString(),i=r.indexOf("e"),o=r.indexOf(".");if(i>-1){if("-"===r[i+1]){var s=parseFloat(r.substr(i+2)),a=r.substr(0,i);o>-1&&(a=a.substr(0,o)+a.substr(o+1));r="0."+(Array(s).join("0")+a).substr(0,t);e=parseFloat(r)}}else if(o>-1){r=r.substr(0,o+1+t);e=parseFloat(r)}}else{var l=Math.pow(10,t);e=Math.round(e*l)/l}return e}exports.toFixed=toFixed;function format(e,t,n){if((e=asString(e)).match(/\{.*"count".*:.*"when".*:.*\}/))try{var r=JSON.parse(e);if(isString(r.count)){var i=t[r.count],o=r.when;if(isNumber(i)&&isObject(o)){var s=o[i]||o.other;isString(s)&&(e=s)}}}catch(e){}return e.replace(/\{(.*?)(:(.*?))?\}/g,(function(e,r,i,o){var s=e;if(r&&"{"!=r[0]&&t){s=new Binding(r).getValue(t);o&&(s=Globalize.format(s,o));n&&(s=n(t,r,o,s))}return null==s?"":s}))}exports.format=format;function glbz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[],r=-1;e[0].forEach((function(t,i){if(i>0&&i!=r){var o=e[i],s=t.match(/^:([a-z][0-9]*\b)/i)||t.match(/^:'(.+?)'/)||t.match(/^:"(.+?)"/);if(s){o=Globalize.format(o,s[1]);t=t.substr(s[0].length)}else if(":"==t&&i<e.length-1&&(isNumber(o)||isDate(o))){o=Globalize.format(o,e[i+1]);t="";r=i+1}n.push(o)}t&&n.push(t)}));return n.join("")}exports.glbz=glbz;function evalTemplate(e,t){if(isIE()){return(e=e.replace(/:\${([^}]*)}/g,(function(e,n){return":"+_evalExpression(n,t)}))).replace(/\${([^}]*)}(:(([A-Za-z]\d*)|"([^"]+)"|'([^']+)'))?/g,(function(e,n,r,i,o,s,a){var l=_evalExpression(n,t);return i?Globalize.format(l,o||s||a):l}))}return _evalExpression(e,t)}exports.evalTemplate=evalTemplate;function _evalExpression(e,t){(t=t||{}).glbz=glbz;var n=parseTpl(e,t);return isIE()?n:glbz(templateObject_1||(templateObject_1=__makeTemplateObject(["",""],["",""])),n)}function get(e,t,n){void 0===n&&(n="${"+e+"}");return e.split(".").reduce((function(e,t){return null!=e&&null!=e[t]?e[t]:n}),t)}function parseTpl(e,t,n){return e.replace(/\$\{.+?}/g,(function(e){return get(e.substr(2,e.length-3).trim(),t,n)}))}function clamp(e,t,n){if(null!=e){null!=n&&e>n&&(e=n);null!=t&&e<t&&(e=t)}return e}exports.clamp=clamp;function copy(e,t,n,r){void 0===n&&(n=!0);void 0===r&&(r=!1);if(t)for(var i in t)if("_"!=i[0]){assert(i in e,'Unknown property "'+i+'".');var o=t[i];if(!e._copy||!e._copy(i,o)){var s=e[i];e[i]instanceof Event?isFunction(o)&&e[i].addHandler(o):!n||!isObject(o)||"undefined"!=typeof Element&&o instanceof Element||!s||!isObject(s)||Object.getPrototypeOf(s).constructor==Object.prototype.constructor&&isWritable(e,i)||"itemsSource"==i?r&&isObject(o)&&Object.getPrototypeOf(o).isPrototypeOf(Object)&&isObject(s)&&!Object.getPrototypeOf(s).isPrototypeOf(Object)?copy(s,o):e[i]=o:copy(s,o)}}return e}exports.copy=copy;function _isPlainObject(e){return isObject(e)&&Object.getPrototypeOf(e).isPrototypeOf(Object)}exports._isPlainObject=_isPlainObject;function isWritable(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||{};return!!n.writable||isFunction(n.set)}exports.isWritable=isWritable;function deepClone(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e)){return e.map((function(e){return deepClone(e)}))}var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=deepClone(e[n]));return t}exports.deepClone=deepClone;function assert(e,t,n){void 0===n&&(n=!0);if(!e){t="** Assertion failed in Wijmo: "+t;var r=new Error;isString(r.stack)&&n&&(t+=" "+r.stack);throw t}}exports.assert=assert;function _deprecated(e,t){console.error('** WARNING: "'+e+'" has been deprecated; please use "'+t+'" instead.')}exports._deprecated=_deprecated;function _warning(e){console.error('** WARNING: "'+e)}exports._warning=_warning;function asString(e,t){void 0===t&&(t=!0);isUndefined(e)&&(e=null);assert(t&&null==e||isString(e),"String expected.");return e}exports.asString=asString;function asNumber(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!1);assert(t&&null==e||isNumber(e),"Number expected.");if(n&&e&&e<0)throw"Positive number expected.";return e}exports.asNumber=asNumber;function asInt(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!1);assert(t&&null==e||isInt(e),"Integer expected.");if(n&&e&&e<0)throw"Positive integer expected.";return e}exports.asInt=asInt;function asBoolean(e,t){void 0===t&&(t=!1);assert(t&&null==e||isBoolean(e),"Boolean expected.");return e}exports.asBoolean=asBoolean;function asDate(e,t){void 0===t&&(t=!1);if(isString(e)){var n=changeType(e,DataType.Date,"r");isDate(n)&&(e=n)}assert(t&&null==e||isDate(e),"Date expected.");return e}exports.asDate=asDate;function asFunction(e,t){void 0===t&&(t=!0);assert(t&&null==e||isFunction(e),"Function expected.");return e}exports.asFunction=asFunction;function asArray(e,t){void 0===t&&(t=!0);assert(t&&null==e||isArray(e),"Array expected.");return e}exports.asArray=asArray;function asType(e,t,n){void 0===n&&(n=!1);e=tryCast(e,t);assert(n||null!=e,t+" expected.");return e}exports.asType=asType;function asEnum(e,t,n){void 0===n&&(n=!1);if(null==e&&n)return null;var r=isString(e)?t[e]:e;assert(null!=r,'Invalid enum value: "'+e+'"');return isNumber(r)?r:e}exports.asEnum=asEnum;function asCollectionView(e,t){void 0===t&&(t=!0);if(null==e&&t)return null;var n=tryCast(e,"ICollectionView");if(null!=n)return n;isArray(e)||assert(!1,"Array or ICollectionView expected.");return new CollectionView(e)}exports.asCollectionView=asCollectionView;function hasItems(e){return null!=e&&null!=e.items&&e.items.length>0}exports.hasItems=hasItems;function toHeaderCase(e){return e&&e.length?e[0].toUpperCase()+e.substr(1).replace(/([a-z])([A-Z])/g,"$1 $2"):""}exports.toHeaderCase=toHeaderCase;function escapeHtml(e){e&&isString(e)&&(e=e.replace(/[&<>]/g,(function(e){return _ENTITYMAP[e]})));return null!=e?e.toString():""}exports.escapeHtml=escapeHtml;var _plainText,_ENTITYMAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},_specialCharsRegex=/"(.*?)"|[^\w]|_/g;function getSpecialCharsRegex(){return _specialCharsRegex}exports.getSpecialCharsRegex=getSpecialCharsRegex;function escapeRegExp(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}exports.escapeRegExp=escapeRegExp;function toPlainText(e){var t=asString(e);if(isString(t)&&t.indexOf("<")>-1){_plainText||(_plainText=document.createElement("div"));_plainText.innerHTML=t;t=_plainText.textContent}return t}exports.toPlainText=toPlainText;function hasClass(e,t){if(e&&t){if(e instanceof HTMLElement&&e.classList&&!isIE9())return e.classList.contains(t);if(e.getAttribute){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");return e&&n.test(e.getAttribute("class"))}}return!1}exports.hasClass=hasClass;function addClass(e,t){void 0===t&&(t="");if(e&&t){var n=t.trim();if(e instanceof HTMLElement&&e.classList&&!isIE9()){n.indexOf(" ")<0?e.classList.add(n):n.split(" ").forEach((function(t){t.length>0&&e.classList.add(t)}));return}e.setAttribute&&n.split(" ").forEach((function(t){if(t.length>0&&!hasClass(e,t)){var n=e.getAttribute("class");e.setAttribute("class",n?n+" "+t:t)}}))}}exports.addClass=addClass;function removeClass(e,t){if(e&&t){var n=t.trim();if(e instanceof HTMLElement&&e.classList&&!isIE9()){n.indexOf(" ")<0?e.classList.remove(n):n.split(" ").forEach((function(t){t.length>0&&e.classList.remove(t)}));0===e.classList.length&&e.removeAttribute("class");return}e.setAttribute&&n.split(" ").forEach((function(t){if(hasClass(e,t)){var n=new RegExp("((\\s|^)"+t+"(\\s|$))","g"),r=e.getAttribute("class");(r=r.replace(n," ").replace(/ +/g," ").trim())?e.setAttribute("class",r):e.removeAttribute("class")}}))}}exports.removeClass=removeClass;function toggleClass(e,t,n){null==n&&(n=!hasClass(e,t));n?addClass(e,t):removeClass(e,t)}exports.toggleClass=toggleClass;function setAttribute(e,t,n,r){e&&(null!=n?r&&e.getAttribute(t)||e.setAttribute(t,n.toString()):e.removeAttribute(t))}exports.setAttribute=setAttribute;function setChecked(e,t){var n=null==t;e.checked=isIE()?t||n:t;e.indeterminate=n}exports.setChecked=setChecked;function setAriaLabel(e,t){setAttribute(e,"aria-label",t)}exports.setAriaLabel=setAriaLabel;function setSelectionRange(e,t,n,r){void 0===n&&(n=t);void 0===r&&(r=!0);assert(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"INPUT or TEXTAREA element expected");if(contains(document.body,e)&&!e.disabled&&e.offsetHeight){try{e.setSelectionRange(t,n,"backward")}catch(e){}if(r)try{e.focus();return!0}catch(e){}}return!1}exports.setSelectionRange=setSelectionRange;function disableAutoComplete(e){var t="autocomplete",n=e.getAttribute(t);n&&"on"!=n||e.setAttribute(t,"off");"autocorrect,autocapitalize,spellcheck".split(",").forEach((function(t){e.setAttribute(t,"spellcheck"==t?"false":"off")}))}exports.disableAutoComplete=disableAutoComplete;function removeChild(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}exports.removeChild=removeChild;function getActiveElement(){var e=document.activeElement;if(e){var t=e.shadowRoot;t&&t.activeElement&&(e=t.activeElement)}return e}exports.getActiveElement=getActiveElement;function _getActiveElement(e){var t=e;if(t){var n=t.shadowRoot;n&&n.activeElement&&(t=n.activeElement)}return t}exports._getActiveElement=_getActiveElement;function moveFocus(e,t){var n=_getFocusableElements(e,t<0),r=0;if(t){var i=n.indexOf(getActiveElement());i>-1&&(r=(i+t+n.length)%n.length)}if(r<n.length){var o=n[r];o.focus();o instanceof HTMLInputElement&&o.select();return!0}return!1}exports.moveFocus=moveFocus;function _getFocusableElements(e,t){void 0===t&&(t=!1);var n=[],r=Array.prototype.slice.call(e.querySelectorAll("input,select,textarea,button,a,div,label,[tabindex]")),i={};r=r.filter((function(e){return-1!==e.tabIndex}));var isRb=function(e){return e instanceof HTMLInputElement&&"radio"===e.type};r.forEach((function(e){isRb(e)&&e.checked&&(i[e.name||""]=!0)}));(r=r.filter((function(e){return!isRb(e)||e.checked||!i[e.name||""]}))).sort((function(e,t){return e.tabIndex===t.tabIndex?0:0===e.tabIndex?1:0===t.tabIndex?-1:e.tabIndex-t.tabIndex}));for(var o=0;o<r.length;o++){var s=r[o];if(s.offsetHeight>0&&s.tabIndex>-1&&!s.disabled&&"hidden"!==window.getComputedStyle(s).visibility&&!closest(s,"[disabled],."+exports.ControlStateClsNames.disabled)){if(s instanceof HTMLAnchorElement&&!s.hasAttribute("href"))continue;if(isIE()&&!s.hasAttribute("tabindex")){if(s instanceof HTMLDivElement)continue;var a=Control.getControl(closest(s,".wj-flexgrid"));if(a&&0==a.keyActionTab)continue}if("radio"===s.type&&!s.checked&&n.length>0){var l=n[n.length-1],u=getActiveElement();if("radio"===l.type&&l.name===s.name){t&&l!=u&&(n[n.length-1]=s);continue}}(Control.getControl(s)||!_getFocusableElements(s).length||s.classList.contains("wj-detail"))&&n.push(s)}}return n}exports._getFocusableElements=_getFocusableElements;function saveFile(e,t,n){void 0===n&&(n="text/plain");var r=e instanceof Blob;r||!n.match(/\bcsv\b/i)&&!t.match(/\.csv$/i)||(e="\ufeff"+e);var i=r?e:new Blob([e],{type:n}),o=navigator;if(isFunction(o.msSaveOrOpenBlob))o.msSaveOrOpenBlob(i,t);else{var s=document.createElement("a"),click=function(e){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);e.dispatchEvent(t)};if("download"in s){var a=window.URL||window.webkitURL,l=a.createObjectURL(i);s.href=l;s.target="_blank";s.download=t;click(s);s=null;window.setTimeout((function(){a.revokeObjectURL(l)}),3e4)}else{var u=new FileReader;u.onloadend=function(){s.href=u.result;s.download=t;click(s);s=null};u.readAsDataURL(i)}}}exports.saveFile=saveFile;function getElement(e){if(e instanceof Element||e&&e.appendChild&&e.appendChild instanceof Function)return e;if(isString(e))try{return document.querySelector(e)}catch(e){}return e&&e.jquery?e[0]:null}exports.getElement=getElement;function processStyleProperty(e){var t=(e=e.replace(";base64,","_wj_")).split(";"),n=[];t.forEach((function(e){var t=[];e.indexOf("_wj_")>-1?2==(t=(e=e.replace("_wj_",";base64,").replace("data:image","_wjimg_")).split(":")).length&&(t[1]=t[1].replace("_wjimg_","data:image")):t=e.split(":");n.push(t)}));return n}function createElement(e,t,n){e=e.replace(/\bstyle\s*=\s*"/g,'_wj-style="');var r=document.createElement("div");r.innerHTML=e;if(e.indexOf("_wj-style")>-1)for(var i=r.querySelectorAll("[_wj-style]"),_loop_1=function(e){var t=i[e],n=t.getAttribute("_wj-style"),r=[];if(n.indexOf(";base64,")>-1)r=processStyleProperty(n);else{n.split(";").forEach((function(e){r.push(e.split(":"))}))}r.forEach((function(e){2==e.length&&(t.style[e[0].trim()]=e[1].trim())}));t.removeAttribute("_wj-style")},o=0;o<i.length;o++)_loop_1(o);1==r.children.length&&(r=r.children[0]);n&&setCss(r,n);t&&(t=getElement(t)).appendChild(r);return r}exports.createElement=createElement;function setText(e,t){e.textContent=t||""}exports.setText=setText;function contains(e,t,n){for(var r=t;r&&e;){if(r===e)return!0;r=(n?r[Control._OWNR_KEY]:null)||r.parentNode||r.host}return!1}exports.contains=contains;function closest(e,t){if(e){if(isFunction(e.closest))return e.closest(t);var n=e.matches||e.webkitMatchesSelector||e.msMatchesSelector||e.mozMatchesSelector;if(n)for(;e&&1===e.nodeType;e=e.parentElement||e.parentNode)if(n.call(e,t))return e}return null}exports.closest=closest;function closestClass(e,t){return closest(e,"."+t)}exports.closestClass=closestClass;function enable(e,t){var n=!t,r="disabled";toggleClass(e,exports.ControlStateClsNames.disabled,n);setAttribute(e,r,n?r:null);for(var i=e.querySelectorAll("input,button"),o=0;o<i.length;o++)setAttribute(i[o],r,n?r:null)}exports.enable=enable;function getElementRect(e){var t=e.getBoundingClientRect();return new Rect(t.left+pageXOffset,t.top+pageYOffset,t.width,t.height)}exports.getElementRect=getElementRect;function setCss(e,t){assert(isObject(t),"css parameter should be an object");if(e instanceof Array)for(var n=0;n<e.length;n++)setCss(e[n],t);else if(e&&e.style){var r=e.style;for(var i in t){var o=t[i];"number"==typeof o&&i.match(/width|height|left|top|right|bottom|size|padding|margin'/i)&&(o+="px");r[i]!==o&&(r[i]=o)}}}exports.setCss=setCss;function animate(e,t,n){null==t&&(t=Control._ANIM_DEF_DURATION);null==n&&(n=Control._ANIM_DEF_STEP);e=asFunction(e);t=asNumber(t,!1,!0);n=asNumber(n,!1,!0);var r,i=Date.now(),o=setInterval((function(){var n=Math.min(1,(Date.now()-i)/t);n=Math.sin(n*Math.PI/2);n*=n;r&&cancelAnimationFrame(r);r=requestAnimationFrame((function(){r=null;e(n)}));n>=1&&clearInterval(o)}),n);return o}exports.animate=animate;var Point=function(){function Point(e,t){void 0===e&&(e=0);void 0===t&&(t=0);this.x=asNumber(e);this.y=asNumber(t)}Point.prototype.equals=function(e,t,n){void 0===t&&(t=0);void 0===n&&(n=0);return e instanceof Point&&Math.abs(this.x-e.x)<=t&&Math.abs(this.y-e.y)<=n};Point.prototype.clone=function(){return new Point(this.x,this.y)};return Point}();exports.Point=Point;var Size=function(){function Size(e,t){void 0===e&&(e=0);void 0===t&&(t=0);this.width=asNumber(e);this.height=asNumber(t)}Size.prototype.equals=function(e){return e instanceof Size&&this.width==e.width&&this.height==e.height};Size.prototype.clone=function(){return new Size(this.width,this.height)};return Size}();exports.Size=Size;var Rect=function(){function Rect(e,t,n,r){this.left=asNumber(e);this.top=asNumber(t);this.width=asNumber(n);this.height=asNumber(r)}Object.defineProperty(Rect.prototype,"right",{get:function(){return this.left+this.width},enumerable:!0,configurable:!0});Object.defineProperty(Rect.prototype,"bottom",{get:function(){return this.top+this.height},enumerable:!0,configurable:!0});Rect.prototype.equals=function(e){return e instanceof Rect&&this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height};Rect.prototype.clone=function(){return new Rect(this.left,this.top,this.width,this.height)};Rect.fromBoundingRect=function(e){if(null!=e.left)return new Rect(e.left,e.top,e.width,e.height);if(null!=e.x)return new Rect(e.x,e.y,e.width,e.height);assert(!1,"Invalid source rectangle.")};Rect.union=function(e,t){var n=Math.min(e.left,t.left),r=Math.min(e.top,t.top);return new Rect(n,r,Math.max(e.right,t.right)-n,Math.max(e.bottom,t.bottom)-r)};Rect.intersection=function(e,t){var n=Math.max(e.left,t.left),r=Math.max(e.top,t.top);return new Rect(n,r,Math.min(e.right,t.right)-n,Math.min(e.bottom,t.bottom)-r)};Rect.prototype.contains=function(e){if(e instanceof Point)return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom;if(e instanceof Rect){var t=e;return t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom}assert(!1,"Point or Rect expected.")};Rect.prototype.inflate=function(e,t,n,r){return null!=n&&null!=r?new Rect(this.left-e,this.top-t,this.width+e+n,this.height+t+r):new Rect(this.left-e,this.top-t,this.width+2*e,this.height+2*t)};return Rect}();exports.Rect=Rect;var DateTime=function(){function DateTime(){}DateTime.addDays=function(e,t){(e=new Date(e.getTime())).setDate(e.getDate()+t);return e};DateTime.addMonths=function(e,t){var n=(e=new Date(e.getTime())).getDate();e.setMonth(e.getMonth()+t);e.getDate()!=n&&e.setDate(0);return e};DateTime.addYears=function(e,t){(e=new Date(e.getTime())).setFullYear(e.getFullYear()+t);return e};DateTime.addHours=function(e,t){(e=new Date(e.getTime())).setHours(e.getHours()+t);return e};DateTime.addMinutes=function(e,t){(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t);return e};DateTime.addSeconds=function(e,t){(e=new Date(e.getTime())).setSeconds(e.getSeconds()+t);return e};DateTime.weekFirst=function(e,t){void 0===t&&(t=Globalize.getFirstDayOfWeek());return DateTime.addDays(e,-(e.getDay()-t))};DateTime.weekLast=function(e,t){void 0===t&&(t=Globalize.getFirstDayOfWeek());e=DateTime.weekFirst(e,t);return DateTime.addDays(e,6)};DateTime.monthFirst=function(e){return DateTime.addDays(e,1-e.getDate())};DateTime.monthLast=function(e){e=DateTime.monthFirst(e);e=DateTime.addMonths(e,1);return DateTime.addDays(e,-1)};DateTime.yearFirst=function(e){return new Date(e.getFullYear(),0,1)};DateTime.yearLast=function(e){return new Date(e.getFullYear(),11,31)};DateTime.sameDate=function(e,t){return isDate(e)&&isDate(t)&&e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()};DateTime.sameTime=function(e,t){return isDate(e)&&isDate(t)&&e.getHours()==t.getHours()&&e.getMinutes()==t.getMinutes()&&e.getSeconds()==t.getSeconds()&&e.getMilliseconds()==t.getMilliseconds()};DateTime.equals=function(e,t){return null==e&&null==t||isDate(e)&&isDate(t)&&e.getTime()==t.getTime()};DateTime.fromDateTime=function(e,t){if(!e&&!t)return null;e||(e=t);t||(t=e);return DateTime.newDate(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())};DateTime.toFiscal=function(e,t){var n=exports.culture.Globalize.calendar;return isArray(n.fiscalYearOffsets)?DateTime.addMonths(e,-n.fiscalYearOffsets[t?0:1]):e};DateTime.fromFiscal=function(e,t){var n=exports.culture.Globalize.calendar;return isArray(n.fiscalYearOffsets)?DateTime.addMonths(e,+n.fiscalYearOffsets[t?0:1]):e};DateTime.newDate=function(e,t,n,r,i,o,s){if(null==e||null==t||null==n){var a=new Date;null==e&&(e=a.getFullYear());null==t&&(t=a.getMonth());null==n&&(n=a.getDate())}null==r&&(r=0);null==i&&(i=0);null==o&&(o=0);null==s&&(s=0);var l=new Date(e,t,n,r,i,o,s),u=l.getFullYear();e<100&&u>=1900&&l.setFullYear(l.getFullYear()-1900);return l};DateTime.clone=function(e){return DateTime.fromDateTime(e,e)};return DateTime}();exports.DateTime=DateTime;function httpRequest(e,t){var n=t||{},r=n.method?asString(n.method).toUpperCase():"GET",i=null==n.async||asBoolean(n.async),o=n.data;if(null!=o&&"GET"==r){var s=[];for(var a in o){var l=o[a];isDate(l)&&(l=l.toJSON());s.push(a+"="+encodeURIComponent(l))}if(s.length){var u=e.indexOf("?")<0?"?":"&";e+=u+s.join("&")}o=null}var c=new XMLHttpRequest;c.URL_DEBUG=e;var p=!1;if(null!=o&&!isString(o)){p=isObject(o);o=JSON.stringify(o)}c.onload=function(){if(4==c.readyState){c.status<300?n.success&&asFunction(n.success)(c):n.error&&asFunction(n.error)(c);n.complete&&asFunction(n.complete)(c)}};c.onerror=function(){if(!isFunction(n.error))throw"HttpRequest Error: "+c.status+" "+c.statusText;n.error(c)};c.open(r,e,i,n.user,n.password);n.user&&n.password&&c.setRequestHeader("Authorization","Basic "+btoa(n.user+":"+n.password));p&&function(){for(var e in n.requestHeaders)if("content-type"===e.toLowerCase())return!1;return!0}()&&c.setRequestHeader("Content-Type","application/json");if(n.requestHeaders)for(var h in n.requestHeaders)c.setRequestHeader(h,n.requestHeaders[h]);isNumber(n.timeout)&&(c.timeout=n.timeout);isFunction(n.beforeSend)&&n.beforeSend(c);c.send(o);return c}exports.httpRequest=httpRequest;var _modules={};function _registerModule(e,t){_modules[e]=t;if("wijmo"===e){var n="undefined"!=typeof window?window:"undefined"!=typeof self?self:null;n&&(n.wijmo=t)}}exports._registerModule=_registerModule;function _getModule(e){return _modules[e]}exports._getModule=_getModule;function focusFirst(e,t){var n=e.querySelectorAll(t||'button, [href], input, [tabindex]:not([tabindex="-1"])'),r=Array.from(n).filter((function(e){return e.offsetWidth>0&&e.offsetHeight>0&&!e.hasAttribute("disabled")&&e.tabIndex>=0}));if(r.length>0){r[0].focus();return!0}return!1}exports.focusFirst=focusFirst;exports.cellCoordinateParserRegex=new RegExp(/(\'?\w+\'?\!)?(\$?[A-Za-z]+)(\$?\d+)/,"g");function getScrollableParent(e){for(var t=document.scrollingElement,n="absolute"==getComputedStyle(e).position?e.offsetParent:e.parentElement;n&&n!=t;){if(n.clientHeight!=n.scrollHeight)return n;e=n="absolute"==getComputedStyle(n).position?n.offsetParent:n.parentElement}return t}exports.getScrollableParent=getScrollableParent;function getOffsetFromAncestor(e,t){for(var n=0,r=0,i=0,o=0;e;){r+=e.offsetLeft;n+=e.offsetTop;e=e.offsetParent}for(;t;){o+=t.offsetLeft;i+=t.offsetTop;t=t.offsetParent}return{top:n-i,left:r-o}}exports.getOffsetFromAncestor=getOffsetFromAncestor;function _isMacOS(){return-1!==navigator.userAgent.indexOf("Mac")}exports._isMacOS=_isMacOS;function _setAriaLabelBy(e,t,n,r){var i=""===n?null:n;if(i!==e.ariaLabelledBy){e._ariaLabelledby=i;setAttribute(t,"aria-labelledby",i);r&&r()}}exports._setAriaLabelBy=_setAriaLabelBy;function deepElementFromPoint(e,t){for(var n=document.elementFromPoint(e,t);n&&n.shadowRoot;){var r=n.shadowRoot.elementFromPoint(e,t);if(!r||r===n)break;n=r}return n}exports.deepElementFromPoint=deepElementFromPoint;function roundTo(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}exports.roundTo=roundTo;function addAttributeValueToElement(e,t,n){var r=e.getAttribute(t);if(r){if(!r.split(/\s+/).includes(n)){setAttribute(e,t,r+" "+n)}}else setAttribute(e,t,n)}exports.addAttributeValueToElement=addAttributeValueToElement;function removeAttributeValueFromElement(e,t,n){var r=e.getAttribute(t);if(r){var i=n.toString(),o=r.split(/\s+/).filter((function(e){return e!==i}));o.length>0?e.setAttribute(t,o.join(" ")):e.removeAttribute(t)}}exports.removeAttributeValueFromElement=removeAttributeValueFromElement;function replaceItems(e,t){var n=new Map(t.map((function(e){return[""+e.value,e]})));return e.map((function(e){var t=""+e.value;return n.has(t)?n.get(t):e}))}exports.replaceItems=replaceItems;var _Map=function(){function _Map(e){void 0===e&&(e=!0);if(e)this._h={};else{var t=_getGlobal(),n=t&&t.Map;this._m=n&&new Map||new _ArrayMap}}Object.defineProperty(_Map.prototype,"isPojoHash",{get:function(){return null!=this._h},enumerable:!0,configurable:!0});Object.defineProperty(_Map.prototype,"size",{get:function(){return this._h&&Object.keys(this._h).length||this._m.size},enumerable:!0,configurable:!0});_Map.prototype.clear=function(){this._h?this._h={}:this._m.clear()};_Map.prototype.delete=function(e){this._h?delete this._h[e]:this._m.delete(e)};_Map.prototype.get=function(e){return this._h?this._h[e]:this._m.get(e)};_Map.prototype.has=function(e){return this._h?e in this._h:this._m.has(e)};_Map.prototype.set=function(e,t){this._h?this._h[e]=t:this._m.set(e,t);return this};return _Map}();exports._Map=_Map;var _ArrayMap=function(){function _ArrayMap(){this._d=[]}Object.defineProperty(_ArrayMap.prototype,"size",{get:function(){return this._d.length},enumerable:!0,configurable:!0});_ArrayMap.prototype.clear=function(){this._d=[]};_ArrayMap.prototype.delete=function(e){var t=this._kIdx(e);if(t>-1){this._d.splice(t,1);return!0}return!1};_ArrayMap.prototype.get=function(e){var t=this._kIdx(e);return t>-1?this._d[t].v:void 0};_ArrayMap.prototype.has=function(e){return this._kIdx(e)>-1};_ArrayMap.prototype.set=function(e,t){var n=this._kIdx(e);n>-1?this._d[n].v=t:this._d.push({k:e,v:t});return this};_ArrayMap.prototype._kIdx=function(e){var t=this._d,n=t.length;if(e==e){for(var r=0;r<n;r++)if(t[r].k===e)return r}else for(r=0;r<n;r++){var i=t[r].k;if(i!=i)return r}return-1};return _ArrayMap}();function _getGlobal(){var e=null;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self);return e}var Color=function(){function Color(e){this._r=0;this._g=0;this._b=0;this._a=1;e&&this._parse(e)}Object.defineProperty(Color.prototype,"r",{get:function(){return this._r},set:function(e){this._r=clamp(asNumber(e),0,255)},enumerable:!0,configurable:!0});Object.defineProperty(Color.prototype,"g",{get:function(){return this._g},set:function(e){this._g=clamp(asNumber(e),0,255)},enumerable:!0,configurable:!0});Object.defineProperty(Color.prototype,"b",{get:function(){return this._b},set:function(e){this._b=clamp(asNumber(e),0,255)},enumerable:!0,configurable:!0});Object.defineProperty(Color.prototype,"a",{get:function(){return this._a},set:function(e){this._a=clamp(asNumber(e),0,1)},enumerable:!0,configurable:!0});Color.prototype.equals=function(e){return e instanceof Color&&this.r==e.r&&this.g==e.g&&this.b==e.b&&this.a==e.a};Color.prototype.toString=function(){var e=Math.round(100*this.a);return e>99?"#"+((1<<24)+(this.r<<16)+(this.g<<8)+this.b).toString(16).slice(1):"rgba("+this.r+","+this.g+","+this.b+","+e/100+")"};Color.fromRgba=function(e,t,n,r){void 0===r&&(r=1);var i=new Color(null);i.r=Math.round(clamp(asNumber(e),0,255));i.g=Math.round(clamp(asNumber(t),0,255));i.b=Math.round(clamp(asNumber(n),0,255));i.a=clamp(asNumber(r),0,1);return i};Color.fromHsb=function(e,t,n,r){void 0===r&&(r=1);var i=Color._hsbToRgb(clamp(asNumber(e),0,1),clamp(asNumber(t),0,1),clamp(asNumber(n),0,1));return Color.fromRgba(i[0],i[1],i[2],r)};Color.fromHsl=function(e,t,n,r){void 0===r&&(r=1);var i=Color._hslToRgb(clamp(asNumber(e),0,1),clamp(asNumber(t),0,1),clamp(asNumber(n),0,1));return Color.fromRgba(i[0],i[1],i[2],r)};Color.fromString=function(e){var t=new Color(null);return t._parse(asString(e))?t:null};Color.prototype.getHsb=function(){return Color._rgbToHsb(this.r,this.g,this.b)};Color.prototype.getHsl=function(){return Color._rgbToHsl(this.r,this.g,this.b)};Color.interpolate=function(e,t,n){n=clamp(asNumber(n),0,1);var r=Color._rgbToHsl(e.r,e.g,e.b),i=Color._rgbToHsl(t.r,t.g,t.b),o=1-n,s=e.a*o+t.a*n,a=[r[0]*o+i[0]*n,r[1]*o+i[1]*n,r[2]*o+i[2]*n],l=Color._hslToRgb(a[0],a[1],a[2]);return Color.fromRgba(l[0],l[1],l[2],s)};Color.toOpaque=function(e,t){if(1==(e=isString(e)?Color.fromString(e):asType(e,Color)).a)return e;t=null==t?Color.fromRgba(255,255,255,1):isString(t)?Color.fromString(t):asType(t,Color);var n=e.a,r=1-n;return Color.fromRgba(e.r*n+t.r*r,e.g*n+t.g*r,e.b*n+t.b*r)};Color.prototype._parse=function(e){if("transparent"==(e=e.toLowerCase())){this._r=this._g=this._b=this._a=0;return!0}if(e&&0!=e.indexOf("#")&&0!=e.indexOf("rgb")&&0!=e.indexOf("hsl")){var t=document.createElement("div");t.style.color=e;var n=t.style.color;if(n==e&&!(n=window.getComputedStyle(t).color)){document.body.appendChild(t);n=window.getComputedStyle(t).color;removeChild(t)}e=n.toLowerCase()}if(0==e.indexOf("#")){if(this._isValidHexColor(e)){if(4==e.length){this.r=parseInt(e[1]+e[1],16);this.g=parseInt(e[2]+e[2],16);this.b=parseInt(e[3]+e[3],16);this.a=1;return!0}if(7==e.length){this.r=parseInt(e.substr(1,2),16);this.g=parseInt(e.substr(3,2),16);this.b=parseInt(e.substr(5,2),16);this.a=1;return!0}}return!1}if(0==e.indexOf("rgb")){var r=e.indexOf("("),i=e.indexOf(")");if(r>-1&&i>-1){if((o=e.substr(r+1,i-(r+1)).split(",")).length>2){this.r=parseInt(o[0]);this.g=parseInt(o[1]);this.b=parseInt(o[2]);this.a=o.length>3?parseFloat(o[3]):1;return!0}}}if(0==e.indexOf("hsl")){r=e.indexOf("("),i=e.indexOf(")"