@wavemaker/app-runtime-wm-build 11.3.4-rc.5292 → 11.3.4-rc.5300

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.
@@ -40,7 +40,7 @@
40
40
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
41
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
42
  PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function h(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function m(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}Object.create;function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function v(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var y=function(){},b=function(){},w=new t.InjectionToken("Context Provider Reference"),P=new Set([i.FormWidgetType.SELECT,i.FormWidgetType.CHECKBOXSET,i.FormWidgetType.RADIOSET,i.FormWidgetType.SWITCH,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.CHIPS,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.RATING]),O=function(e){var t,n,i,o,r,a,s,l,c,p="";for(e=e.replace(/\$\[data\[\$i\]/g,"$[__1"),i=0;i<e.length;i++)if(t=e[i],n=e[i+1],"$"===t&&"["===n){for(a=1,c=!1,s=!1,o=i+2;o<e.length;o++)if(" "!==(r=e[o])&&(c||(s='"'===e[o]||"'"===e[o],c=!0),"["===r?a++:"]"===r&&a--,!a)){l=e.substring(i+2,o),p+=s?"__1["+l+"]":l;break}i=o}else p+=t;return p},S=function(e,t){var n;return t?(t.replace(/\[(\w+)\]/g,".$1").split(".").forEach((function(t){n=n&&n[t]||(_.isNull(e)?e:e[t])})),n):e},E=function(e,t,n){var o,r=t.field,a=t.expression,s=t.bindExpression;return s?(o=s.replace("bind:",""),i.checkIsCustomPipeExpression(o)&&(o+=": __1"),o=O(o)):o=a||r,s||a?i.$parseExpr(o)(n,Object.assign({},e,{__1:e})):_.get(e,r)},T=function(e){return P.has(e)},R=function(e,t,n){return i.isValidWebURL(e)||(e||(e=n||"resources/images/imagelists/default-image.png"),e=t?i.encodeUrl(e):e,i.stringStartsWith(e,"services/prefabs")),e},C=function(e){return""===e||"none"===e?e:"url("+R(e)+")"};function A(e,n,i){return{provide:n,useExisting:t.forwardRef((function(){return e})),multi:i}}function I(e){return A(e,y)}var D,N=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join("_")},x={number:["number","integer","big_integer","short","float","big_decimal","double","long","byte"],string:["string","text"],character:["character"],date:["date","time","timestamp","datetime"]},M={number:["exact","notequals","lessthan","lessthanequal","greaterthan","greaterthanequal","null","isnotnull"],string:["anywhereignorecase","anywhere","startignorecase","start","endignorecase","end","exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],character:["exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],date:["exact","lessthan","lessthanequal","greaterthan","greaterthanequal","null","notequals","isnotnull"]},k={boolean:["exact","null","isnotnull"],clob:[],blob:[]},L=function(e){var t=[];return _.isArray(e)?(e.forEach((function(e){t=t.concat(L(e))})),t):_.isObject(e)?(_.forEach(e,(function(e,n){e&&(t=t.concat(n.split(" ")))})),t):void 0},F=function(e,t){var n,i,o=e.toAdd||e,r=e.toRemove||t;return _.isObject(e)?(n=_.isArray(o)?o:L(o||[]),i=r?_.isArray(r)?r:L(r):[]):(n=o?[o]:[],i=r?[r]:[]),{toAdd:n,toRemove:i}},j=function(e,t,n,o){var r,a,s,l,c,p;o||(o={}),_.forEach(e,(function(e,u){_.includes(u,".")&&(l=_.split(u,"."),a=l[0],s=l[1],p=!0),o.noModifyTitle?r=u:_.isString(u)?(r=i.prettifyLabel(u),r=i.deHyphenate(r),r=n?i.initCaps(n)+" "+r:r):r=u,u=n?n+"."+u:u,c=p?(c=_.split(r," ")).length>1?c[c.length-2]+" "+c[c.length-1]:c[0]:r;var d=o.setBindingField?{displayName:c,field:u,relatedTable:a,relatedField:s||r}:{displayName:c,relatedTable:a,relatedField:s||r};if(!_.isObject(e)||_.isArray(e)&&!e[0]){if(o.upperBound&&o.columnCount===o.upperBound)return;t.terminals.push(d),o.columnCount+=1}else o.columnCount!==o.upperBound&&t.objects.push(d),_.isArray(e)&&e[0]?j(e[0],t,u+"[0]",o):j(e,t,u,o)}))},B=function(e){var t;return _.isArray(e)?_.isObject(e[0])?(t=i.getClonedObject(e[0]),_.forEach(e,(function(e,n){if(n+1>=10)return!1;_.assignWith(t,e,(function(e,t){return null==e?t:e}))}))):t=e[0]:t=e,t};e.APPLY_STYLES_TYPE=void 0,(D=e.APPLY_STYLES_TYPE||(e.APPLY_STYLES_TYPE={}))[D.CONTAINER=0]="CONTAINER",D[D.SCROLLABLE_CONTAINER=1]="SCROLLABLE_CONTAINER",D[D.INNER_SHELL=2]="INNER_SHELL",D[D.SHELL=3]="SHELL";var G={backgroundattachment:"backgroundAttachment",backgroundcolor:"backgroundColor",backgroundgradient:"backgroundGradient",backgroundimage:"backgroundImage",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",backgroundsize:"backgroundSize",bordercolor:"borderColor",borderradius:"borderRadius",borderstyle:"borderStyle",borderwidth:"borderWidth",borderbottomwidth:"borderBottomWidth",borderleftwidth:"borderLeftWidth",borderrightwidth:"borderRightWidth",bordertopwidth:"borderTopWidth",color:"color",cursor:"cursor",display:"display",fontsize:"fontSize",fontfamily:"fontFamily",fontstyle:"fontStyle",fontunit:"fontunit",fontvariant:"fontVariant",fontweight:"fontWeight",height:"height",horizontalalign:"textAlign",lineheight:"lineHeight",margin:"margin",marginbottom:"marginBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",opacity:"opacity",overflow:"overflow",padding:"padding",paddingbottom:"paddingBottom",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",picturesource:"backgroundImage",textalign:"textAlign",textdecoration:"textDecoration",verticalalign:"verticalAlign",visibility:"visibility",whitespace:"whiteSpace",width:"width",wordbreak:"wordbreak",zindex:"zIndex"},V=function(e){return!!G[e]},U={height:!0,overflow:!0,padding:!0,paddingbottom:!0,paddingleft:!0,paddingright:!0,paddingtop:!0},W={textalign:!0},q={textalign:!0,width:!0};function z(t,n,o,r){var a=Object.create(null);r&&r.forEach((function(e){return a[e]=!0})),n.registerStyleChangeListener((function(r,s){if(!(a[r]||o===e.APPLY_STYLES_TYPE.SHELL&&U[r])){if(o===e.APPLY_STYLES_TYPE.INNER_SHELL){if(!U[r])return;"height"===r&&i.setCSS(t,"overflow",s?"auto":"")}if(o!==e.APPLY_STYLES_TYPE.CONTAINER||!W[r]){if(o===e.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER){if(q[r])return;"height"===r&&i.setCSS(t,"overflow",s?"auto":"")}"fontsize"===r||"fontunit"===r?i.setCSS(t,"fontSize",""===n.fontsize?"":n.fontsize+(n.fontunit||"px")):"backgroundimage"===r?i.setCSS(t,"backgroundImage",n.picturesource||C(s)):G[r]&&i.setCSS(t,G[r],s)}}}))}var H,Y="wm-form-field-",K=function(){var e=new Map;for(var t in i.FormWidgetType)e.set(Y+i.FormWidgetType[t],new Map);return e}(),Q=function(e){return K.get(e)},X=function(e,t){K.set(e,t),window.WM_LOADED_COMPONENTS=v(v([],g(window.WM_LOADED_COMPONENTS||[])),[e])};e.PROP_TYPE=void 0,(H=e.PROP_TYPE||(e.PROP_TYPE={}))[H.BOOLEAN=1]="BOOLEAN",H[H.NUMBER=2]="NUMBER",H[H.STRING=3]="STRING";var J={type:e.PROP_TYPE.STRING},Z={type:e.PROP_TYPE.NUMBER},ee={type:e.PROP_TYPE.BOOLEAN},te={arrayType:!0},ne=function(){X("wm-container",new Map([["animation",J],["class",J],["conditionalclass",te],["conditionalstyle",te],["content",J],["name",J],["show",Object.assign({value:!0},ee)]]))},ie=new Map,oe=new i.IDGenerator("widget-id"),re=new Map([["tap","click"]]),ae={BLOCK:"block",INLINE_BLOCK:"inline-block",INLINE:"inline"},se=new Set(["readonly","autofocus","disabled","startchecked","multiple","selected","required","controls","autoplay","loop","muted","show"]),le=function(e){return se.has(e)},ce=new Set(["width","height","iconheight","iconwidth","popoverwidth","popoverheight","imagewidth","imageheight"]),pe=function(e){return ce.has(e)},ue=function(t,n,o){return o===e.PROP_TYPE.BOOLEAN?i.toBoolean(n,le(t)&&t):o===e.PROP_TYPE.NUMBER?+n:n},de=function(e,t,n){var o=e.widgetId,r=e[t];i.isChangeFromWatch()||i.$unwatch(N(o,t)),i.resetChangeFromWatch();var a=Q(e.getWidgetSubType()).get(t);if(a){var s=a.type;s&&(n=ue(t,n,s))}if(n!==r||i.isObject(n)||i.isObject(r)){if(pe(t))n=i.toDimension(n);else if(_.startsWith(n,"resources/")){var l=e;void 0===l._parentPrefab_&&(l._parentPrefab_=e.$element.parent().closest('[prefabname][prefabname!="__self__"]').attr("prefabname")||""),l._parentPrefab_?n="./app/prefabs/"+l._parentPrefab_+"/"+n:a&&n!=a.value&&(n="./"+n)}e[t]=n,V(t)?e.notifyStyleChange(t,n,r):("conditionalclass"===t&&(n=F(n,r)),a&&e.notifyPropertyChange(t,n,r)),i.$appDigest()}},he={set:function(e,t,n){return de(e,t,n),!0},get:function(e,t){var n=e[t];return _.isFunction(n)?n.bind(e):n}},me=window.requestAnimationFrame,fe=[],ge=function(e){fe.length||me((function(){fe.forEach((function(e){return e()})),fe.length=0})),fe.push(e)},ve=function(){function e(){}return e.create=function(e,t,n){if(window.Proxy)return new Proxy(e,he);var i=Object.create(e);return ge((function(){for(var t in e)_.isFunction(e[t])&&"constructor"!==t&&"super"!==t&&!_.startsWith(t,"ng")&&(e[t]=e[t].bind(e))})),Object.keys(G).forEach((function(t){Object.defineProperty(i,t,{get:function(){return e[t]},set:function(n){return de(e,t,n)}})})),n&&n.forEach((function(t,n){Object.defineProperty(i,n,{get:function(){return e[n]},set:function(t){return de(e,n,t)}})})),i},e}(),ye=function(e,t,n){t&&t.length&&i.removeClass(n,_.join(t," ")),e&&e.length&&i.addClass(n,_.join(e," "))},be=function(e,t,n){t&&_.isObject(t)&&Object.keys(t||{}).forEach((function(e){i.setCSS(n,e,"")}));e&&_.isObject(e)&&i.setCSSFromObj(n,e)},we=function(){function e(e,n,o){var r=this;this.inj=e,this.isAttached=!1,this.styleChange=new s.ReplaySubject,this.propertyChange=new s.Subject,this.readyState=new s.Subject,this.destroy=new s.Subject,this.eventHandlers=new Map,this.toBeSetupEventsQueue=[],this.__cloneable__=!1,this.$attrs=new Map,this.isMuted=!1;var l=e.get(t.ElementRef);this.nativeElement=l.nativeElement,this.widgetType=n.widgetType,this.widgetSubType=n.widgetSubType||n.widgetType,this.viewParent=e.view.component,this.displayType=n.displayType||ae.BLOCK,this.context=e.view.context,this.widget=this.createProxy(),this.eventManager=e.get(a.EventManager),this.nativeElement.widget=this.widget,this.appLocale=e.get(i.App).appLocale||{},this.initContext(),n.hostClass&&i.addClass(this.nativeElement,n.hostClass),this.widgetId=this.generateWidgetId(),i.setAttr(this.nativeElement,"widget-id",this.widgetId,!0),this.registerStyleChangeListener(this.onStyleChange,this),this.registerPropertyChangeListener(this.onPropertyChange,this),o?(this.delayedInit=!0,o.then((function(){r.initWidget(),r.setInitProps()}))):this.initWidget()}return Object.defineProperty(e.prototype,"$element",{get:function(){return $(this.nativeElement)},enumerable:!1,configurable:!0}),e.prototype.getNativeElement=function(){return this.nativeElement},e.prototype.getWidgetType=function(){return this.widgetType},e.prototype.getWidgetSubType=function(){return this.widgetSubType},e.prototype.getWidget=function(){return this.widget},e.prototype.setProperty=function(e,t){this.widget[e]=t},e.prototype.getViewParent=function(){return this.viewParent},e.prototype.notifyStyleChange=function(e,t,n){this.styleChange.next({key:e,nv:t,ov:n})},e.prototype.notifyPropertyChange=function(e,t,n){this.propertyChange.next({key:e,nv:t,ov:n})},e.prototype.registerStyleChangeListener=function(e,t){t&&(e=e.bind(t)),this.styleChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerReadyStateListener=function(e,t){t&&(e=e.bind(t)),this.readyState.isStopped?e():this.readyState.subscribe((function(){return e()}))},e.prototype.registerPropertyChangeListener=function(e,t){t&&(e=e.bind(t)),this.propertyChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerDestroyListener=function(e,t){t&&(e=e.bind(t)),this.destroy.subscribe((function(){}),(function(){}),(function(){return e()}))},e.prototype.getDisplayType=function(){return this.displayType},e.prototype.createProxy=function(){return ve.create(this,this.widgetSubType,Q(this.widgetSubType))},e.prototype.initContext=function(){var e=this.inj.view.context,t=this.inj.get(w,{});if(this.viewParent!==e?this.context=e:this.context={},t){var n={};_.isArray(t)?_.forEach(t,(function(e){Object.assign(n,e)})):n=t,this.context=Object.assign({},n,this.context)}},e.prototype.setWidgetProperty=function(e,t){this.widget[e]=t},e.prototype.getAttr=function(e){return this.$attrs.get(e)},e.prototype.getAppInstance=function(){return this.inj.get(i.App)},e.prototype.generateWidgetId=function(){return oe.nextUid()},e.prototype.onPropertyChange=function(e,t,n){if("show"===e)this.nativeElement.hidden=!t;else if("hint"===e)i.isMobileApp()||i.setAttr(this.nativeElement,"title",t);else if("class"===e){i.switchClass(this.nativeElement,t,n);var o=t.match(/(\W|^)(h([0-6]))(?=\s|$)/);o&&(i.setAttr(this.nativeElement,"role","heading"),i.setAttr(this.nativeElement,"aria-level",o[3]))}else if("name"===e||"tabindex"===e)i.setAttr(this.nativeElement,e,t),"name"===e&&t&&function(e,t,n,o){i.isDefined(e.Widgets)&&(o&&(e.Widgets[o]=void 0),n&&(e.Widgets[n]=t))}(this.viewParent,this.widget,t,n);else if("conditionalclass"===e)ye(t.toAdd,t.toRemove,this.nativeElement);else if("autoplay"===e){var r="wm-audio"===this.widgetType?"audio":"video";this.nativeElement.querySelector(r).load()}else"conditionalstyle"===e?be(t,n,this.nativeElement):"animation"===e?i.addClass(this.nativeElement,"animated "+t):"disabled"===e&&(!0===t?i.setAttr(this.nativeElement,"disabled","true",!0):i.removeAttr(this.nativeElement,"disabled",!0))},e.prototype.onStyleChange=function(e,t,n){},e.prototype.registerWidget=function(e){var t,n,o,r,a;this.registerDestroyListener((t=this.widget,n=this.viewParent,o=this.widgetId,r=e,a=!1,ie.set(o,t),r&&i.isDefined(n.Widgets)&&(a=!0,n.Widgets[r]=t),function(){ie.delete(o),a&&(n.Widgets[r]=void 0)}))},e.prototype.getMappedEventName=function(e){return re.get(e)||e},e.prototype.handleEvent=function(e,t,n,i,o){this.eventManager.addEventListener(e,t,(function(e){if(i.$event=e,"delayed"!==o)return n();setTimeout((function(){return n()}),150)}))},e.prototype.processEventAttr=function(e,t,n){var o=this,r=i.$parseEvent(t),a=this.context;a.widget=this.widget;var s=r.bind(void 0,this.viewParent,a),l=function(){var t;i.$invokeWatchers(!0);try{if(a.$event=a.$event||new window.CustomEvent(e),!((t=s())instanceof Promise))return t;t.then((function(e){return e}),(function(e){return e}))}catch(e){console.error(e)}};this.eventHandlers.set(this.getMappedEventName(e),{callback:l,locals:a}),this[_.camelCase("on-"+e)]=l,this.toBeSetupEventsQueue.push((function(){o.handleEvent(o.nativeElement,o.getMappedEventName(e),l,a,n)}))},e.prototype.processBindAttr=function(e,t){var n=this;this.initState.delete(e),this.registerDestroyListener(i.$watch(t,this.viewParent,this.context,(function(t){return n.widget[e]=t}),N(this.widgetId,e),"datasource"===e,this.widgetProps.get(e),(function(){return n.isMuted})))},e.prototype.removePropertyBinding=function(e){i.$unwatch(N(this.widgetId,e))},e.prototype.invokeEventCallback=function(e,t){var n=this.eventHandlers.get(e);if(n){var i=n.callback,o=n.locals||{};if(i)return i(Object.assign(o,t))}},e.prototype.processAttr=function(e,t){var n=e.split("."),o=n[0],r=n[1],a=n[2],s=n.length;"bind"===r?("show"===o&&(this.nativeElement.hidden=!0),this.processBindAttr(o,t)):"event"===r?this.processEventAttr(o,t,a):1===s&&("class"===e?i.removeClass(this.nativeElement,t):"tabindex"!==e&&"name"!==e||i.removeAttr(this.nativeElement,e),this.initState.set(o,t))},e.prototype.processAttrs=function(){var e,t,n=this.inj.elDef;try{for(var i=f(n.element.attrs),o=i.next();!o.done;o=i.next()){var r=g(o.value,3),a=r[1],s=r[2];this.$attrs.set(a,s),this.processAttr(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.initWidget=function(){var e=this;this.initState=new Map;var t=Q(this.widgetSubType);t.forEach((function(t,n){i.isDefined(t.value)&&e.initState.set(n,t.value)})),this.widgetProps=t,this.processAttrs(),this.registerWidget(this.initState.get("name"))},e.prototype.setInitProps=function(){var e=this;this.initState.get("name")&&(this.widget.name=this.initState.get("name")),this.initState.forEach((function(t,n){(e.widgetProps.get(n)||V(n))&&"name"!==n&&(e.widget[n]=t)})),this.initState.clear(),this.initState=void 0,this.readyState.next(),this.readyState.complete()},e.prototype.hasEventCallback=function(e){return this.eventHandlers.has(e)},e.prototype.focus=function(){var e=this.$element[0].querySelector("[focus-target]");e||(e=this.$element[0]),e.focus()},e.prototype.execute=function(e,t){},e.prototype.mute=function(){this.isMuted=!0},e.prototype.unmute=function(){this.isMuted=!1},e.prototype.ngOnAttach=function(){this.isAttached=!0},e.prototype.ngOnDetach=function(){this.isAttached=!1},e.prototype.ngOnInit=function(){this.delayedInit||this.setInitProps()},e.prototype.ngAfterViewInit=function(){var e,t;if(this.toBeSetupEventsQueue.length)try{for(var n=f(this.toBeSetupEventsQueue),i=n.next();!i.done;i=n.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.toBeSetupEventsQueue.length=0,this.isAttached=!0},e.prototype.ngAfterContentInit=function(){},e.prototype.ngOnDestroy=function(){this.isDestroyed=!0,this.widget=Object.create(null),this.styleChange.complete(),this.propertyChange.complete(),this.destroy.complete(),this.isAttached=!1},e}();we.decorators=[{type:t.Injectable}],we.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(we);Pe.decorators=[{type:t.Injectable}];var _e=function(e){this.redraw=function(){var t=e.$element.closest("[wmtabpane]"),n=e.$element.closest("[wmaccordionpane]").find(".panel-heading");if(!(t.length&&!t.hasClass("active")||n.length&&!n.hasClass("active")))return e.redraw&&e.redraw()}};_e.decorators=[{type:t.Directive,args:[{selector:"[redrawable]"}]}],_e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.updateRedrawableComponents=function(e){var t=this;_.pickBy(e,(function(e){e&&e.nativeElement&&e.nativeElement.hasAttribute("redrawable")&&!_.includes(t.reDrawableComponents._results,e)&&t.reDrawableComponents._results.push(e),e&&e.Widgets&&t.updateRedrawableComponents(e.Widgets)}))},t.prototype.redrawChildren=function(){var e=this;this.content&&this.Widgets&&this.updateRedrawableComponents(this.Widgets),setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}))}),100)},t.prototype.onPropertyChange=function(t,n,i){e.prototype.onPropertyChange.call(this,t,n,i),"show"===t&&n&&this.redrawChildren()},t}(Pe);Oe.decorators=[{type:t.Directive}],Oe.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[_e,{descendants:!0}]}]};var Se="app-container",Ee={widgetType:"wm-container",hostClass:Se},Te=function(t){function n(n){var o=t.call(this,n,Ee)||this;return i.addClass(o.nativeElement,Se),z(o.nativeElement,o,e.APPLY_STYLES_TYPE.CONTAINER),o}return d(n,t),n}(Oe);Te.initializeProps=ne(),Te.decorators=[{type:t.Directive,args:[{selector:"[wmContainer]",providers:[I(Te)]}]}],Te.ctorParameters=function(){return[{type:t.Injector}]};var Re=function(){function e(){}return e.prototype.transform=function(e,t,n){return i.transformFileURI(R(e,t,n))},e}();Re.decorators=[{type:t.Pipe,args:[{name:"image"}]}];var Ce=function(){X("wm-item-template",new Map([["content",J]]))},Ae={widgetType:"wm-item-template"},Ie=function(e){function t(t,n,i){var o=e.call(this,t,Ae)||this;return o.app=i,o.nativeElement=n.nativeElement,o.context=t.view.context,o}return d(t,e),Object.defineProperty(t.prototype,"$index",{get:function(){return this.context.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wmItemTemplate",{set:function(e){this.widget.content=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.partialParams.item=this.userComponentParams.dataObject},t}(Pe);Ie.initializeProps=Ce(),Ie.decorators=[{type:t.Directive,args:[{selector:"[wmItemTemplate]",exportAs:"itemTemplateRef",providers:[I(Ie)]}]}],Ie.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},Ie.propDecorators={userComponentParams:[{type:t.Input}],wmItemTemplate:[{type:t.Input}]};var De=function(){X("wm-repeat-template",new Map([["show",ee]]))},Ne={widgetType:"wm-repeat-template",hostClass:"app-repeat-item"},xe=function(e){function t(t){var n=e.call(this,t,Ne)||this;return z(n.nativeElement,n),n}return d(t,e),t}(Pe);xe.initializeProps=De(),xe.decorators=[{type:t.Directive,args:[{selector:"[wmRepeatTemplate]"}]}],xe.ctorParameters=function(){return[{type:t.Injector}]};var Me=function(){function e(e,t,n){this.templateRef=t,this.viewContainer=n,this.viewParent=e.view.component,this.context=e.view.context}return Object.defineProperty(e.prototype,"lazyLoad",{set:function(e){var t=this;this.unSubscribeFn=i.$watch(e,this.viewParent,this.context,(function(e){!t.embeddedView&&e&&(t.embeddedView=t.viewContainer.createEmbeddedView(t.templateRef,t.context),t.unSubscribeFn())}))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.unSubscribeFn()},e}();Me.decorators=[{type:t.Directive,args:[{selector:"[lazyLoad]"}]}],Me.ctorParameters=function(){return[{type:t.Injector},{type:t.TemplateRef},{type:t.ViewContainerRef}]},Me.propDecorators={lazyLoad:[{type:t.Input}]};var ke=function(){X("wm-message",new Map([["animation",J],["caption",Object.assign({value:"Message"},J)],["class",J],["hideclose",Object.assign({value:!1},ee)],["name",J],["show",Object.assign({value:!0},ee)],["type",Object.assign({value:"success"},J)]]))},Le={widgetType:"wm-message",hostClass:"alert app-message"},Fe=function(e){function t(t){var n=e.call(this,t,Le)||this;return n.messageClass="",n.messageIconClass="",n.type="",z(n.nativeElement,n),n}return d(t,e),t.prototype.showMessage=function(e,t){e&&(this.caption=e),t&&this.setWidgetProperty("type",t),this.setWidgetProperty("show",!0)},t.prototype.hideMessage=function(){this.setWidgetProperty("show",!1)},t.prototype.dismiss=function(e){this.hideMessage(),this.invokeEventCallback("close",{$event:e})},t.prototype.onMessageTypeChange=function(e){var t,n;switch(e){case"success":t="alert-success",n="wm-sl-l sl-check";break;case"error":t="alert-danger",n="wi wi-cancel";break;case"warn":case"warning":t="alert-warning",n="wm-sl-l sl-alarm-bell";break;case"info":t="alert-info",n="wi wi-info";break;case"loading":t="alert-info alert-loading",n="fa fa-spinner fa-spin"}i.switchClass(this.nativeElement,t,this.messageClass),this.messageClass=t,this.messageIconClass=n},t.prototype.onPropertyChange=function(t,n,i){"type"===t?this.onMessageTypeChange(n):e.prototype.onPropertyChange.call(this,t,n,i)},t}(Pe);Fe.initializeProps=ke(),Fe.decorators=[{type:t.Component,args:[{selector:"[wmMessage]",template:'<i aria-hidden="true" [title]="type + \'Alert\'" class="icon {{type}} {{messageIconClass}}"></i>\n<span [innerHtml]="caption"></span>\n<button title="Close" type="button" class="btn-transparent close" [hidden]="hideclose" (click)="dismiss($event)" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n</button>\n',providers:[I(Fe)],exportAs:"wmMessage"}]}],Fe.ctorParameters=function(){return[{type:t.Injector}]};var je=function(){X("wm-partial",new Map([["name",J]]))},Be={widgetType:"wm-partial",hostClass:"app-partial clearfix"},Ge=function(e){function t(t,n){var i=e.call(this,t,Be)||this;return i.viewport=n,i.registerDestroyListener(i.viewport.subscribe("resize",(function(e){return i.callback("resize",e)}))),i.registerDestroyListener(i.viewport.subscribe("orientationchange",(function(e){return i.callback("orientationchange",e)}))),i}return d(t,e),t.prototype.callback=function(e,t){t=_.assign({widget:this},t),this.invokeEventCallback(e,t)},t.prototype.ngOnAttach=function(){this.callback("attach")},t.prototype.ngOnDetach=function(){this.callback("detach")},t.prototype.ngOnDestroy=function(){this.callback("destroy")},t}(Pe);Ge.initializeProps=je(),Ge.decorators=[{type:t.Directive,args:[{selector:"[wmPartial]",providers:[I(Ge)]}]}],Ge.ctorParameters=function(){return[{type:t.Injector},{type:i.Viewport}]};var Ve=function(){function e(e){this.widgetRef=e,this.widgetRef.partialParams={},this.widgetRef.pageParams=this.widgetRef.partialParams,this.widgetRef.params$=new s.Subject}return e.prototype.registerParams=function(e,t,n,o){var r=this;this.widgetRef.partialParams[e]=t,!t&&n?this.widgetRef.registerDestroyListener(i.$watch(n,this.widgetRef.getViewParent(),_.get(this.widgetRef,"context"),(function(t){r.widgetRef.partialParams[e]=t,r.widgetRef.params$.next()}))):this.widgetRef.params$.next()},e}();Ve.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],Ve.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var $e=function(){function e(e,t,n){this.bindValue=e,this.type=t,this.partialParamsProvider=n}return e.prototype.ngOnInit=function(){this.partialParamsProvider.registerParams(this.name,this.value,this.bindValue,this.type)},e}();$e.decorators=[{type:t.Directive,args:[{selector:"[wmParam]"}]}],$e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Attribute,args:["value.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]},{type:Ve}]},$e.propDecorators={name:[{type:t.Input}],value:[{type:t.Input}]};var Ue=function(){function e(e,t,n,o,r,a,s,c){var p=this;this.componentInstance=e,this.vcRef=t,this.elRef=n,this.inj=o,this.app=r,this.resolver=s,this.partialRefProvider=c,this.contentInitialized=!1,this.renderPartial=_.debounce(this._renderPartial,200),e.registerPropertyChangeListener((function(t,n,o){"content"===t&&(e.$lazyLoad?e.$lazyLoad=function(){p.renderPartial(n),e.$lazyLoad=i.noop}:p.renderPartial(n))}));var u=e.params$.pipe(l.filter((function(){return p.contentInitialized})),l.debounceTime(200)).subscribe((function(){return p.renderPartial(e.content)}));e.registerDestroyListener((function(){return u.unsubscribe()}))}return Object.defineProperty(e.prototype,"name",{get:function(){return this.componentInstance.name},enumerable:!1,configurable:!0}),e.prototype._renderPartial=function(e){return h(this,void 0,void 0,(function(){var t,n,o,r,a=this;return m(this,(function(s){switch(s.label){case 0:return this.vcRef.clear(),i.$invokeWatchers(!0),(t=$(this.elRef.nativeElement).closest(".app-prefab")).length?n=t.attr("prefabname"):this.componentInstance.viewParent&&(n=this.componentInstance.viewParent.prefabName),[4,this.partialRefProvider.getComponentFactoryRef(e,i.ComponentType.PARTIAL,{prefab:n})];case 1:return(o=s.sent())&&((r=this.vcRef.createComponent(o,0,this.inj))&&r._component&&n&&(r._component.prefabName=n),this.$target||(this.$target=this.elRef.nativeElement.querySelector("[partial-container-target]")||this.elRef.nativeElement),this.$target.innerHTML="",this.$target.appendChild(r.location.nativeElement),this.contentInitialized=!0,setTimeout((function(){return a.onLoadSuccess()}),200)),[2]}}))}))},e.prototype.onLoadSuccess=function(){this.componentInstance.invokeEventCallback("load"),this.app.notify("partialLoaded")},e}();Ue.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],Ue.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:t.Injector},{type:i.App},{type:String,decorators:[{type:t.Attribute,args:["content"]}]},{type:t.ComponentFactoryResolver},{type:i.PartialRefProvider}]};var We=function(){function e(e,t,n,i,o){this.elRef=e,this.widget=t,this.viewContainerRef=n,this.templateRef=o,this.context=i.view.context,window.addEventListener("resize",this.onResize.bind(this))}return Object.defineProperty(e.prototype,"showInDevice",{set:function(e){this.devices=e.split(","),this.onResize()},enumerable:!1,configurable:!0}),e.prototype.onResize=function(e){this.devices.indexOf("lg")>-1&&window.matchMedia("(min-width: 1200px)").matches&&!i.isLargeTabletLandscape()||this.devices.indexOf("md")>-1&&(i.isLargeTabletLandscape()||window.matchMedia("(min-width: 992px) and (max-width: 1199px)").matches&&!i.isLargeTabletPortrait())||this.devices.indexOf("sm")>-1&&(window.matchMedia("(min-width: 768px) and (max-width: 991px)").matches||i.isLargeTabletPortrait())||this.devices.indexOf("xs")>-1&&window.matchMedia("(max-width: 767px)").matches||this.devices.indexOf("all")>-1?this.embeddedView||(this.embeddedView=this.viewContainerRef.createEmbeddedView(this.templateRef,this.context)):(this.viewContainerRef.clear(),this.embeddedView="")},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.onResize)},e}();We.decorators=[{type:t.Directive,args:[{selector:"[showInDevice]"}]}],We.ctorParameters=function(){return[{type:t.ElementRef},{type:we,decorators:[{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.Injector},{type:t.TemplateRef}]},We.propDecorators={showInDevice:[{type:t.Input}]};var qe=function(){function e(e,t,n){this._isEnabled=!1,this._lastScrollY=-1,this._waitRefreshTill=-1,this.pendingIscrolls=[],this._$el=$(t.nativeElement),this.app=n}return e.prototype.ngOnInit=function(){var e=this;this.cancelSubscription=this.app.subscribe("no-iscroll",(function(t){e.pendingIscrolls.push(t)}))},e.prototype.ngDoCheck=function(){this._isEnabled?this._smoothScrollInstance?this.refreshIScroll():this._smoothScrollInstance=this.applySmoothScroll():this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy()},e.prototype.ngOnDestroy=function(){this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy(),this.cancelSubscription&&this.cancelSubscription()},Object.defineProperty(e.prototype,"wmSmoothscroll",{set:function(e){this._isEnabled=!0===e||"true"===e,this._isEnabled?this._smoothScrollInstance||(this._smoothScrollInstance=this.applySmoothScroll()):this.ngOnDestroy()},enumerable:!1,configurable:!0}),e.prototype.applySmoothScroll=function(e,t){var n=this;if(!i.isMobileApp()||i.isKitkatDevice())return null;var o={scrollbars:!0,preventDefault:!1,momentum:!0,bounce:!1,mouseWheel:!0,disablePointer:!0,disableTouch:!1,disableMouse:!1},r=this._$el[0];if(!r.children.length)return null;this._$el.addClass("smoothscroll-wrapper"),r.onscroll=function(e){e.target.iscroll&&e.target.scrollTop&&(e.target.iscroll.scrollTo(e.target.iscroll.x,e.target.iscroll.y-e.target.scrollTop),e.target.scrollTop=0)},t&&"INPUT"===t.tagName&&t.focus(),e&&(o.fadeScrollbars=!0);var a=new IScroll(r,o);if(e){_.forEach(e,(function(e,t){_.forEach(e,(function(e){a.on(t,e)}))}));var s=this;a.on("scrollStart",(function(){this._scrolling=!0,i.isMobileApp()&&s.app.notify("iscroll-start",{})})),a.on("scrollEnd",(function(){this._scrolling=!1})),a.refresh()}return this.app.notify("iscroll-start",{}),a.indicatorRefresh=function(){var e,t=n._$el[0].iscroll.indicators;if(t.length)for(e=0;e<t.length;e++)t[e].refresh()},this._$el[0].iscroll=a,_.forEach(this.pendingIscrolls,(function(e,t){if(e.isSameNode(n._$el[0]))return n.app.notify("iscroll-update",{el:e}),void n.pendingIscrolls.splice(t,1)})),this.app.notify("iscroll-update",{}),{iScroll:a,destroy:function(){a.destroy(),$(a.scroller).css({"transition-timing-function":"","transition-duration":"",transform:""}),a=null,delete r.iscroll}}},e.prototype.refreshIScroll=function(){var e=this._smoothScrollInstance.iScroll;if(!(e._scrolling||this._waitRefreshTill>Date.now())){if(e.wrapper&&!_.includes(e.wrapper.children[0].classList,"smoothscroll-container")&&e.wrapper.scrollHeight>e.wrapper.clientHeight){var t=e._events,n=document.activeElement;$(e.wrapper.children).wrapAll('<div class="smoothscroll-container"></div>'),this._smoothScrollInstance.destroy(),this._smoothScrollInstance=this.applySmoothScroll(t,n)}this._lastScrollY!==this._$el[0].iscroll.maxScrollY?(ze(this._smoothScrollInstance.iScroll),this._lastScrollY=this._$el[0].iscroll.maxScrollY):this._smoothScrollInstance.iScroll.refresh(),this._waitRefreshTill=Date.now()+500}},e}();qe.decorators=[{type:t.Directive,args:[{selector:"[wmSmoothscroll]"}]}],qe.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},qe.propDecorators={wmSmoothscroll:[{type:t.Input}]};var ze=function(e){var t=!e&&$(".smoothscroll-container");e&&e.wrapper&&e.wrapper.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&$(document.activeElement).offset().top+document.activeElement.clientHeight>.9*window.innerHeight&&document.activeElement.scrollIntoView({behavior:"auto",block:"end",inline:"end"}),e?(e.indicatorRefresh&&e.indicatorRefresh(),e.refresh&&e.refresh()):t.length&&t.parent().each((function(e,t){t.iscroll.indicatorRefresh(),t.iscroll.refresh()}))},He=ze;window.addEventListener("resize",i.debounce(ze,200));var Ye=function(){function e(e){this.elRef=e}return Object.defineProperty(e.prototype,"textContent",{set:function(e){var t=e;null==e&&(t=""),this.elRef.nativeElement.textContent=t},enumerable:!1,configurable:!0}),e}();Ye.decorators=[{type:t.Directive,args:[{selector:"[textContent]"}]}],Ye.ctorParameters=function(){return[{type:t.ElementRef}]},Ye.propDecorators={textContent:[{type:t.Input}]};var Ke=function(e){return _.isDate(e)||isNaN(e)||(e=parseInt(e,10)),moment(e).valueOf()||moment((new Date).toDateString()+" "+e).valueOf()},Qe=function(){function e(e){this.decimalPipe=e}return e.prototype.transform=function(e,t,n,i,o,r,a,s){n=o&&!a?"1."+r.length+"-16":n;var l=s?s.number:void 0;return this.decimalPipe.transform(e,n,i||l||t)},e}();Qe.decorators=[{type:t.Pipe,args:[{name:"trailingZeroDecimalPipe"}]}],Qe.ctorParameters=function(){return[{type:n.DecimalPipe}]};var Xe=function(){function e(e,t){this.datePipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n,o){var r;if("null"===e||""===e)return"";if(!i.isDefined(e))return"";if(r=Ke(e)){if("timestamp"===t)return r;if("UTC"===t)return new Date(r).toISOString();var a=this.i18nService?this.i18nService.getTimezone(o):n;return a&&(e===r||i.hasOffsetStr(e))?moment(r).tz(a).format(t.replaceAll("y","Y").replaceAll("d","D").replace("a","A")):this.datePipe.transform(r,t)}return""},e}();Xe.decorators=[{type:t.Pipe,args:[{name:"toDate"}]}],Xe.ctorParameters=function(){return[{type:n.DatePipe},{type:i.AbstractI18nService}]};var Je=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t){if(t&&!String(t).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)&&(t="1."+t+"-"+t),!_.isNaN(+e)){var n=this.i18nService&&this.i18nService.getwidgetLocale()?this.i18nService.getwidgetLocale():void 0,i=n?n.number:null;return this.decimalPipe.transform(e,t,i)}},e}();Je.decorators=[{type:t.Pipe,args:[{name:"toNumber"}]}],Je.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var Ze=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n){var o=(i.CURRENCY_INFO[t]||{}).symbol||t||"",r=new Je(this.decimalPipe,this.i18nService).transform(e,n),a=_.startsWith(r,"-");return a&&(r=r.replace("-","")),r?a?"-"+o+r:o+r:""},e}();Ze.decorators=[{type:t.Pipe,args:[{name:"toCurrency"}]}],Ze.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var et=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:(t||"")+e},e}();et.decorators=[{type:t.Pipe,args:[{name:"prefix"}]}];var tt=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:e+(t||"")},e}();tt.decorators=[{type:t.Pipe,args:[{name:"suffix"}]}];var nt=function(){function e(e){this.custmeUserPipe=e}return e.prototype.transform=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n.push(arguments[i]);var o=this.custmeUserPipe.getCustomPipe(t);if(!o||!_.isFunction(o.formatter))return console.warn("formatter is not defined, please check the custom pipes documentation"),e;try{return o.formatter.apply(o,v([e],g(n)))}catch(n){return console.error("Pipe name: "+t,n),e}},e}();nt.decorators=[{type:t.Pipe,args:[{name:"custom"}]}],nt.ctorParameters=function(){return[{type:i.CustomPipeManager}]};var it=function(){function e(){}return e.prototype.transform=function(e){var t;if(i.isDefined(e))return(t=Ke(e))?moment(t).fromNow():void 0},e}();it.decorators=[{type:t.Pipe,args:[{name:"timeFromNow"}]}];var ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(Je);ot.decorators=[{type:t.Pipe,args:[{name:"numberToString"}]}];var rt=function(){function e(){}return e.prototype.transform=function(e){return Number(e)||void 0},e}();rt.decorators=[{type:t.Pipe,args:[{name:"stringToNumber"}]}];var at=function(){function e(){}return e.prototype.transform=function(e,t,n){return e?_.isObject(t)?_.filter(e,t):_.filter(e,(function(e){return _.includes(e[t],n)})):[]},e}();at.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var st=function(){function e(){}return e.prototype.transform=function(e,t){for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+["bytes","KB","MB","GB","TB","PB"][n]},e}();st.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e){return"fa "+({zip:"fa-file-zip-o",pdf:"fa-file-pdf-o",rar:"fa-file-archive-o",txt:"fa-file-text-o",ppt:"fa-file-powerpoint-o",pot:"fa-file-powerpoint-o",pps:"fa-file-powerpoint-o",pptx:"fa-file-powerpoint-o",potx:"fa-file-powerpoint-o",ppsx:"fa-file-powerpoint-o",mpg:"fa-file-movie-o",mp4:"fa-file-movie-o",mov:"fa-file-movie-o",avi:"fa-file-movie-o",mp3:"fa-file-audio-o",docx:"fa-file-word-o",js:"fa-file-code-o",md:"fa-file-code-o",html:"fa-file-code-o",css:"fa-file-code-o",xlsx:"fa-file-excel-o",png:"fa-file-image-o",jpg:"fa-file-image-o",jpeg:"fa-file-image-o",file:"fa-file-o",default:"fa-file-o"}[e]||"fa-file-o")},e}();lt.decorators=[{type:t.Pipe,args:[{name:"fileIconClass"}]}];var ct=function(){function e(){}return e.prototype.transform=function(e){return{success:"wi wi-done text-success",error:"wi wi-error text-danger"}[e.toLowerCase()]},e}();ct.decorators=[{type:t.Pipe,args:[{name:"stateClass"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e){return{"audio/aac":".aac","application/x-abiword":".abw","application/vnd.android.package-archive":".apk","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/ecmascript":".es","image/gif":".gif","text/html":".html","image/x-icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":[".jpeg",".jpg"],"application/javascript":".js","application/json":".json","audio/midi":".mid","audio/x-midi":".midi","video/mpeg":".mpeg","application/vnd.apple.installer+xml":"mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/x-rar-compressed":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-shockwave-flash":".swf","application/x-tar":".tar","image/tiff":".tiff","application/typescript":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","application/xml":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","audio/3gpp":".3gp","video/3gpp2":".3g2","audio/3gpp2":".3g2","application/x-7z-compressed":".7z"}[e]},e}();pt.decorators=[{type:t.Pipe,args:[{name:"fileExtensionFromMime"}]}];var ut=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.bypassSecurityTrustHtml(e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.bypassSecurityTrustStyle(e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.bypassSecurityTrustScript(e);case"url":case t.SecurityContext.URL:return this.domSanitizer.bypassSecurityTrustUrl(e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.bypassSecurityTrustResourceUrl(e)}},e}();ut.decorators=[{type:t.Pipe,args:[{name:"trustAs"}]}],ut.ctorParameters=function(){return[{type:a.DomSanitizer}]};var dt=[],ht=[],mt=function(){function e(){this.dialogRefsCollection=new Map,this.appConfirmDialog="_app-confirm-dialog"}return e.prototype.register=function(e,t,n){e&&(this.dialogRefsCollection.get(e)?this.dialogRefsCollection.get(e).set(n,t):this.dialogRefsCollection.set(e,new Map([[n,t]])))},e.prototype.getDialogRefsCollection=function(){return this.dialogRefsCollection},e.prototype.deRegister=function(e,t){e&&this.dialogRefsCollection.get(e)&&this.dialogRefsCollection.get(e).delete(t)},e.prototype.getDialogRef=function(e,t){var n,i=this.dialogRefsCollection.get(e);return t?(n=i.get(t))||(t.pageName||t.partialName||t.prefabName?console.error('No dialog with the name "'+e+'" found in the given scope.'):i.forEach((function(t,i){i&&"Common"===i.partialName?n=t:console.error('No dialog with the name "'+e+'" found in the App scope.')}))):1===i.size?n=i.entries().next().value[1]:console.error("There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists."),n},e.prototype.open=function(e,t,n){var i=this.getDialogRef(e,t);i&&i.open(n)},e.prototype.close=function(e,t,n){var i=this.getDialogRef(e,t);i&&(i.closeCallBackFn=n,i.close())},e.prototype.closeAllDialogs=function(){_.forEach(dt.reverse(),(function(e){e.close()}))},e.prototype.showAppConfirmDialog=function(e){this.open(this.getAppConfirmDialog(),void 0,e)},e.prototype.closeAppConfirmDialog=function(){this.close(this.getAppConfirmDialog())},e.prototype.getAppConfirmDialog=function(){return this.appConfirmDialog},e.prototype.setAppConfirmDialog=function(e){this.appConfirmDialog=e},e.prototype.addToOpenedDialogs=function(e){dt.push(e)},e.prototype.getLastOpenedDialog=function(){return dt[dt.length-1]},e.prototype.removeFromOpenedDialogs=function(e){-1!==dt.indexOf(e)&&dt.splice(dt.indexOf(e),1)},e.prototype.getOpenedDialogs=function(){return dt},e.prototype.addToClosedDialogs=function(e){ht.push(e)},e.prototype.removeFromClosedDialogs=function(e){-1!==ht.indexOf(e)&&ht.splice(ht.indexOf(e),1)},e.prototype.getDialogRefFromClosedDialogs=function(){return ht[ht.length-1]},e}();mt.decorators=[{type:t.Injectable}],mt.ctorParameters=function(){return[]};var ft=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.sanitize(t.SecurityContext.HTML,e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.sanitize(t.SecurityContext.STYLE,e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.sanitize(t.SecurityContext.SCRIPT,e);case"url":case t.SecurityContext.URL:return this.domSanitizer.sanitize(t.SecurityContext.URL,e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.sanitize(t.SecurityContext.RESOURCE_URL,e);case"none":case t.SecurityContext.NONE:return this.domSanitizer.sanitize(t.SecurityContext.NONE,e)}},e}();ft.decorators=[{type:t.Pipe,args:[{name:"sanitize"}]}],ft.ctorParameters=function(){return[{type:a.DomSanitizer}]};var gt=[Te,Ie,xe,Me,Fe,Ge,Ve,$e,Ue,_e,We,qe,Ye],vt=[Xe,lt,pt,at,st,Je,Ze,et,tt,it,ot,ct,rt,Qe,ut,Re,nt,ft],yt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Xe,at,Qe,ut,Re,nt,ft,n.Location,{provide:i.AbstractDialogService,useClass:mt}]}},e}();yt.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.SecurityModule],declarations:v(v([],g(gt)),g(vt)),exports:v(v([],g(gt)),g(vt))}]}];var bt,wt=function(){};e.Live_Operations=void 0,(bt=e.Live_Operations||(e.Live_Operations={})).INSERT="insert",bt.UPDATE="update",bt.DELETE="delete",bt.READ="read";var Pt="All Fields",_t={EMPTY_KEY:"EMPTY_NULL_FILTER",EMPTY_VALUE:"No Value",LABEL_KEY:"key",LABEL_VALUE:"value",NULL_EMPTY:["null","empty"],NULL:"null",EMPTY:"empty"};function Ot(e){return _.includes([i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.CHIPS],e)}var St=function(e,t,n){var o=i.debounce((function(){_.isFunction(n)&&n(t)}),300);o();var r=t?_.isObject(t)?t:JSON.parse(t):{},a=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,s=i.processFilterExpBindNode(e,r).subscribe((function(e){t=JSON.stringify(e.filterExpressions),o()}));a((function(){return s.unsubscribe()}))},Et=function(e,t){var n,o={};return t["is-related"]?(o.tableName=t["lookup-type"],n=t["lookup-field"],o.distinctField=n,o.aliasColumn=n.replace(".","$"),o.filterExpr=t.filterexpressions?_.isObject(t.filterexpressions)?t.filterexpressions:JSON.parse(t.filterexpressions):{}):(o.tableName=e.execute(i.DataSource.Operation.GET_ENTITY_NAME),n=t.field||t.key,o.distinctField=n,o.aliasColumn=n),o};function Tt(e,t,n){var o;return new Promise((function(r,a){!T(t[n])||t.isDataSetBound&&"filterwidget"!==n||(o=Et(e,t),e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:o.distinctField,entityName:o.tableName,pagesize:t.limit,filterExpr:t.filterexpressions?JSON.parse(t.filterexpressions):{}}).then((function(e){r({field:t,data:e.data,aliasColumn:o.aliasColumn})}),a))}))}function Rt(e,t){if(Ot(e[t.widget]))return e.datafield=t.aliasColumn||_t.LABEL_KEY,e.searchkey=t.distinctField||_t.LABEL_KEY,void(e.displaylabel=e.displayfield=t.aliasColumn||_t.LABEL_VALUE);e.datafield=_t.LABEL_KEY,e.displayfield=_t.LABEL_VALUE}function Ct(e,t,n){var o=[i.FormWidgetType.SELECT,i.FormWidgetType.RADIOSET],r={},a=[];n.isEnableEmptyFilter&&_.includes(o,e[n.widget])&&!e["is-range"]&&!e.multiple&&(r[_t.LABEL_KEY]=_t.EMPTY_KEY,r[_t.LABEL_VALUE]=n.EMPTY_VALUE||_t.EMPTY_VALUE,a.push(r)),_.each(t,(function(e){var t=e[n.aliasColumn],i={};null!==t&&""!==t&&(i[_t.LABEL_KEY]=t,i[_t.LABEL_VALUE]=t,a.push(i))})),Rt(e,n),e.dataset=a}function At(e,t,n){if(e&&t&&!t.isDataSetBound)if(Ot(t[n.widget])){var i=Et(e,t);t.dataoptions=i,Rt(t,Object.assign(n||{},i)),t.datasource=e}else St(t.viewParent,t.filterexpressions,(function(i){t.filterexpressions=i,Tt(e,t,n.widget).then((function(e){Ct(e.field,e.data,{aliasColumn:e.aliasColumn,widget:n.widget,isEnableEmptyFilter:xt(n.enableemptyfilter),EMPTY_VALUE:n.EMPTY_VALUE})}))}))}function It(e){return i.isDefined(e)&&""!==e&&null!==e}function Dt(e,t){var n;return It(e)&&It(t)?n=[e,t]:It(e)?n=e:It(t)&&(n=t),n}function Nt(e,t){var n;return It(e)&&It(t)?n=i.MatchMode.BETWEEN:It(e)?n=i.MatchMode.GREATER:It(t)&&(n=i.MatchMode.LESSER),n}function xt(e){return e&&_.intersection(e.split(","),_t.NULL_EMPTY).length>0}function Mt(e){var t,n=_.split(e,",");return 2===_.intersection(n,_t.NULL_EMPTY).length?t=i.MatchMode.NULLOREMPTY:_.includes(n,_t.NULL)?t=i.MatchMode.NULL:_.includes(n,_t.EMPTY)&&(t=i.MatchMode.EMPTY),t}var kt=function(e){return _.isUndefined(e)||_.isNull(e)?[]:(_.isString(e)&&(e=e.split(",").map(Function.prototype.call,String.prototype.trim)),_.isArray(e)||(e=[e]),e)};var Lt,Ft=moment.localeData(),jt=i.getClonedObject(Ft._calendar),Bt=Ft._calendarDay||{lastDay:"[Yesterday]",lastWeek:"[Last] dddd",nextDay:"[Tomorrow]",nextWeek:"dddd",sameDay:"[Today]",sameElse:"L"},Gt="alphabet",Vt="Others",$t={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",YEAR:"year"},Ut="yyyy-MM-dd",Wt="w 'Week', yyyy",qt="MMM, yyyy",zt="YYYY",Ht="hh:mm a",Yt=function(e,t,n){if(!t)return _.cloneDeep(e);var i=t.split(","),o=[],r=[];return i.forEach((function(e){var t=e.split(":");o.push(n?n+"."+t[0]:t[0]),r.push(t[1])})),_.orderBy(e,o,r)},Kt=function(e){return _.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),e},Qt=function(e){return"wm-search"===e},Xt=function(e,t,n,o){if(e&&Qt(e.widgetType))if(e.groupby)if(_.includes(e.groupby,"(")){var r=i.$parseEvent(e.groupby);n.groupby=r(t,{row:n.dataObject||n})}else n.groupby=nn(e.groupby,e.match,o,e.dateformat,e.datePipe,e.appDefaults,n);else n.groupby=""},Jt=function(e,t,n){var i=[];return _.forEach(_.keys(e),(function(o,r){var a=Yt(e[o],n,"dataObject");i.push({key:o,data:_.sortBy(a,(function(e){return e._groupIndex=r+1,_.get(e,t)||_.get(e.dataObject,t)}))})})),i},Zt=function(e,t,n,i,o,r,a,s){n===$t.DAY&&(Ft._calendar=Bt),e=_.orderBy(e,(function(e){var n=_.get(a?e[a]:e,t);if(n)return _.toLower(n)}));var l=_.groupBy(e,nn.bind(void 0,t,n,a,o,r,s));return Ft._calendar=jt,l},en=function(e,t,n,o){return"timestamp"===t?e:i.getFormattedDate(o,e,t||n)},tn=function(e,t,n,i,o){var r,a=moment(e),s=n,l=moment(),c=function(){return"["+en(this.valueOf(),s,Ut,i)+"]"};switch(t){case $t.HOUR:s=s||o.timeFormat,a.isValid()||(a=moment((new Date).toDateString()+" "+e)).isValid()&&(Ft._calendar.sameDay=function(){return"["+en(this.valueOf(),s,Ht,i)+"]"}),a=a.startOf("hour"),Ft._calendar.sameElse=c,r=a.calendar(l);break;case $t.WEEK:r=en(a.valueOf(),s,Wt,i);break;case $t.MONTH:r=en(a.valueOf(),s,qt,i);break;case $t.YEAR:r=a.format(zt);break;case $t.DAY:s=s||o.dateFormat,a=a.startOf("day"),Ft._calendar.sameElse=c,r=a.calendar(l)}return"Invalid date"===r?Vt:r},nn=function(e,t,n,i,o,r,a){var s=_.get(n?a[n]:a,e);return _.isUndefined(s)||_.isNull(s)||""===s.toString().trim()?Vt:(t===Gt&&(s=s.substr(0,1)),_.includes(_.values($t),t)&&(s=tn(s,t,i,o,r)),s)},on=function(){},rn="default",an="label",sn=function(e,t,n,i){_.forEach(e,(function(e){_.get(e,"isGroup")&&(e.field===n?e.columns[i]=t:sn(e.columns,t,n,i))}))},ln=function(e){return"true"===e||"false"!==e&&(/^\d+$/.test(e)?+e:e)},cn={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},pn=function(e){if(e)return/^(\/|#\/|#)(?!\W).*/.test(e)?"#/"+(e=_.first(e.match(/[\w]+.*/g))||""):_.startsWith(e,"www.")?"//"+e:e},un=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.nodes=[],i.nodes$=new s.Subject,i._resetNodes=_.debounce(i.resetNodes,50),i.securityService=i.inj.get(o.SecurityService),i.binditemlabel=i.nativeElement.getAttribute("itemlabel.bind"),i.binditemicon=i.nativeElement.getAttribute("itemicon.bind"),i.binditemaction=i.nativeElement.getAttribute("itemaction.bind"),i.binditembadge=i.nativeElement.getAttribute("itembadge.bind"),i.binditemchildren=i.nativeElement.getAttribute("itemchildren.bind"),i.binditemid=i.nativeElement.getAttribute("itemid.bind"),i.binditemlink=i.nativeElement.getAttribute("itemlink.bind"),i.binditemtarget=i.nativeElement.getAttribute("itemtarget.bind"),i.binduserrole=i.nativeElement.getAttribute("userrole.bind"),i.bindisactive=i.nativeElement.getAttribute("isactive.bind"),i}return d(t,e),t.prototype.getNode=function(e,t){var n=this.viewParent.pageScope||this.viewParent,o=E(t,{field:this.itemchildren,bindExpression:this.binditemchildren},n)||_.get(t,e.childrenField),r={action:E(t,{field:this.itemaction,bindExpression:this.binditemaction},n)||_.get(t,e.actionField),badge:E(t,{field:this.itembadge,bindExpression:this.binditembadge},n)||_.get(t,e.badgeField),children:Array.isArray(o)?this.getNodes(o):[],class:_.get(t,e.classField),disabled:t.disabled,icon:E(t,{field:this.itemicon,bindExpression:this.binditemicon},n)||_.get(t,e.iconField),id:E(t,{field:this.itemid,bindExpression:this.binditemid},n)||_.get(t,e.idField),label:E(t,{field:this.itemlabel,bindExpression:this.binditemlabel},n)||_.get(t,e.labelField),link:pn(E(t,{field:this.itemlink,bindExpression:this.binditemlink},n)||_.get(t,e.linkField)),target:pn(E(t,{field:this.itemtarget,bindExpression:this.binditemtarget},n)||_.get(t,e.targetField)),role:E(t,{field:this.userrole,bindExpression:this.binduserrole},n),isactive:E(t,{field:this.isactive,bindExpression:this.bindisactive},n),value:this.datafield?"All Fields"===this.datafield?t:i.findValueOf(t,this.datafield):t};return _.omitBy(r,_.isUndefined)},t.prototype.resetItemFieldMap=function(){this._itemFieldMap=null},t.prototype.getItemFieldsMap=function(){return this._itemFieldMap||(this._itemFieldMap={idField:this.itemid||"itemid",iconField:this.itemicon||"icon",labelField:this.itemlabel||"label",linkField:this.itemlink||"link",targetField:this.itemtarget||"target",badgeField:this.itembadge||"badge",childrenField:this.itemchildren||"children",classField:this.itemclass||"class",actionField:this.itemaction||"action",isactiveField:this.isactive||"isactive"}),this._itemFieldMap},t.prototype.prepareNodeDataSet=function(e){return(e=kt(e)).map((function(e){return i.isObject(e)?e:{label:e,value:e}}))},t.prototype.getNodes=function(e){var t=this;void 0===e&&(e=this.dataset||{});var n=Yt(this.prepareNodeDataSet(e),this.orderby)||[];if(n.length){var o=this.userrole,r=this.getItemFieldsMap();n=n.reduce((function(e,n){return i.validateAccessRoles(n[o],t.securityService.loggedInUser)&&e.push(t.getNode(r,n)),e}),[])}return n},t.prototype.resetNodes=function(){this.resetItemFieldMap(),this.nodes=this.getNodes(),i.$appDigest(),this.nodes$.next()},t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":case"itemicon":case"itemlabel":case"itemlink":case"itemtarget":case"itemclass":case"itemchildren":case"isactive":case"orderby":this._resetNodes()}e.prototype.onPropertyChange.call(this,t,n,i)},t}(Pe),dn={pattern:"regexp",max:"maxvalue",min:"minvalue",required:"required",maxlength:"maxchars",mindate:"mindate",maxdate:"maxdate",excludedates:"excludedates",excludedays:"excludedays"},hn=function(){function e(e,t,n,i,o,r){this.instance=e,this.formwidget=t,this.widgettype=n,this.widgetControl=i,this.widgetContext=o,this.defaultValidatorMessages=[],r&&(this.tableFieldType=r)}return e.prototype.getDefaultValidators=function(){var e=[];return this.instance.required&&!1!==this.instance.show&&(this.widgettype===i.FormWidgetType.CHECKBOX||this.widgettype===i.FormWidgetType.TOGGLE?e.push(c.Validators.requiredTrue):e.push(c.Validators.required)),this.instance.maxchars&&e.push(c.Validators.maxLength(this.instance.maxchars)),this.instance.minvalue&&e.push(c.Validators.min(this.instance.minvalue)),this.instance.maxvalue&&this.widgettype!==i.FormWidgetType.RATING&&e.push(c.Validators.max(this.instance.maxvalue)),this.instance.regexp&&e.push(c.Validators.pattern(this.instance.regexp)),this.formwidget&&_.isFunction(this.formwidget.validate)&&e.push(this.formwidget.validate.bind(this.formwidget)),e},e.prototype.setUpValidators=function(e){if(!this.hasValidators&&(this.instance._validators=this.getDefaultValidators(),e&&this.instance._validators.push(e),this.widgetContext.ngform)){this.widgetControl.setValidators(this.instance._validators);var t={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(t.emitEvent=!1),this.widgetControl.updateValueAndValidity(t)}},e.prototype.getPromiseList=function(e){var t=this,n=[];return _.forEach(e,(function(e,i){var o=e;e instanceof Function&&e.bind&&(o=e(t.widgetControl,t.widgetContext)),o instanceof Promise&&n.push(o)})),n},e.prototype.setAsyncValidators=function(e){var t=this;this._asyncValidatorFn=function(){return function(){return Promise.all(t.getPromiseList(e)).then((function(){return t.instance.validationmessage="",null}),(function(e){if(e.hasOwnProperty("errorMessage"))t.instance.validationmessage=_.get(e,"errorMessage");else{var n=_.keys(e);t.instance.validationmessage=e[n[0]].toString()}return e})).then((function(e){var n=function(){setTimeout((function(){"PENDING"===t.widgetControl.status?n():t.instance.onStatusChange(t.widgetControl.status,t.tableFieldType)}),100)};return n(),e}))}},this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetContext.ngform.touched&&this.widgetControl.updateValueAndValidity()},e.prototype.isDefaultValidator=function(e){return _.get(i.VALIDATOR,_.toUpper(e))},e.prototype.setDefaultValidator=function(e,t){t&&t instanceof Function?this.watchDefaultValidatorExpr(t.bind(void 0,this.widgetControl,this.widgetContext),e):(this.instance.widget[e]=t,this.instance[e]=t)},e.prototype.setValidators=function(e){var t=this,n=_.cloneDeep(e);this.hasValidators=!0,this._syncValidators=[],_.forEach(n,(function(e,i){if(e&&e instanceof Function)n[i]=e.bind(void 0,t.widgetControl,t.widgetContext),t._syncValidators.push(n[i]);else{var o=_.get(e,"type");if(t.defaultValidatorMessages[o]=_.get(e,"errorMessage"),t.isDefaultValidator(o)){var r=_.get(e,"validator");t.setDefaultValidator(o,r),n[i]=""}}})),this._syncValidators=_.filter(n,(function(e){if(e)return e})),this.applyDefaultValidators()},e.prototype.observeOn=function(e,t){var n=this;_.forEach(e,(function(e){var i=_.find(n.widgetContext[t],{key:e});i&&(i.notifyForFields||(i.notifyForFields=[]),i.notifyForFields.push(n.instance))}))},e.prototype.validate=function(){this.applyDefaultValidators(),this._asyncValidatorFn&&(this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetControl.updateValueAndValidity()),this.widgetContext.ngform.touched&&this.widgetControl.markAsTouched()},e.prototype.watchDefaultValidatorExpr=function(e,t){var n=this,o=this.instance.widgetId+"_"+t+"_formField";i.$unwatch(o),this.instance.registerDestroyListener(i.$watch("boundFn(fn)",_.extend(this.instance,this.instance.viewParent),{fn:e},(function(e,i){n.instance.widget[t]=e,n.applyDefaultValidators()}),o))},e.prototype.applyDefaultValidators=function(){var e=this.getDefaultValidators();this.widgetControl.setValidators(_.concat(this._syncValidators||[],e)),this.widgetControl.updateValueAndValidity(),this.setCustomValidationMessage()},e.prototype.setCustomValidationMessage=function(){var e=this.widgetControl&&this.widgetControl.errors;if(e)if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=_.get(e,"errorMessage");else{var t=_.keys(e)[0],n=_.get(dn,t)||this.formwidget.validateType;if(n){var i=_.get(this.defaultValidatorMessages,n)||this.instance.validationmessage;this.instance.validationmessage=i&&i instanceof Function?i(this.widgetControl,this.widgetContext):i}else this.instance.validationmessage=""}},e}(),mn=function(e){function t(t,n,o){var r=e.call(this)||this;r.$el=t,r.app=n,r.onPullToRefresh=o,r.count=0;return r.$el.prepend('<div class="refresh-container"></div>'),r.infoContainer=r.$el.find(".refresh-container"),i.isIos()&&r.infoContainer.addClass("ios-refresh-container"),r.init(r.$el),r}return d(t,e),t.prototype.threshold=function(){return 10},t.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.VERTICAL},t.prototype.subscribe=function(){var e=this;this.cancelSubscription=this.app.subscribe("toggle-variable-state",(function(t){t.active&&e.animationInProgress?(e.count++,e.wait()):e.count>0&&e.count--,!e.count&&e.animationInProgress&&e.stopAnimation()}))},t.prototype.bounds=function(e,t){var n=this.$el[0].iscroll;return t<0||n&&!isNaN(n.y)&&0!==n.y?{lower:void 0,upper:void 0}:(this.spinner||(this.spinner=i.isIos()?new gn(this.infoContainer):new fn(this.infoContainer),this.subscribe()),{lower:0,center:0,upper:i.isIos()?0:150,strict:!i.isIos()})},t.prototype.context=function(){var e=this;return this.infoContainer.show(),i.isIos()&&this.infoContainer.addClass("entry"),{spin:function(t){e.spinner.setRotation(2*t)}}},t.prototype.animation=function(){return i.isIos()?{css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}"}}:{target:this.infoContainer,css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}",opacity:"${{min(($D + $d) / 100, 1)}}"}}},t.prototype.onAnimation=function(){var e=this;this.animationInProgress=!0,this.spinner.start(),this.onPullToRefresh&&this.onPullToRefresh(),setTimeout((function(){e.runAnimation||e.stopAnimation()}))},t.prototype.stopAnimation=function(){var e=this;setTimeout((function(){e.runAnimation=!1,e.animationInProgress=!1,e.spinner.stop(),e.infoContainer.hide(),i.setCSS(e.infoContainer[0],"transform","none"),i.isIos()||i.setCSS(e.infoContainer[0],"opacity",0),e.infoContainer.removeClass("entry")}),800)},t.prototype.wait=function(){this.runAnimation=!0},t}(p.SwipeAnimation),fn=function(){function e(e,t){this.$el=e,this.options=t||{}}return e.prototype.polarToCartesian=function(e,t,n,i){var o=(i-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},e.prototype.describeArc=function(e,t,n,i,o){var r=this.polarToCartesian(e,t,n,o),a=this.polarToCartesian(e,t,n,i),s=o-i<=180?"0":"1";return["M",r.x,r.y,"A",n,n,0,s,0,a.x,a.y,"L",a.x,a.y].join(" ")},e.prototype.init=function(){if(!this.initialized){var e=$('<svg><path id="arc1"/></svg>'),t=$('<div class="android-spinner"></div>');t.append(e),this.$el.append(t),this.cx=t.outerWidth()/2,this.cy=t.outerHeight()/2,this.r=.6*this.cx,this.path=t.find("path"),this.initialized=!0,this.container=t}},e.prototype.setRotation=function(e){this.init(),this.path.attr("d",this.describeArc(this.cx,this.cy,this.r,0,e))},e.prototype.start=function(){var e=this;this.init();var t=this,n=this.options.time||1800,i=0;this.container.addClass("spin"),this.intervalId=setInterval((function(){var n;n=(i+=10)>720?i=0:i>360?720-i:i,t.path.attr("d",e.describeArc(t.cx,t.cy,t.r,0,n))}),10*n/360)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0),this.container.removeClass("spin")},e}(),gn=function(){function e(e){this.$el=e}return e.prototype.init=function(){if(!this.svg){var e=$('<div class="ios-spinner"><svg></svg></div>'),t=e.find("svg");this.$el.append(e);for(var n=e.width(),i=0;i<12;i++)t[0].innerHTML+='<line y1="'+.15*n+'" y2="'+.3*n+'"\n transform="translate('+.5*n+", "+.5*n+") rotate("+30*i+')">\n </line>';e.append(t),this.svg=t}},e.prototype.setRotation=function(e){this.init(),this.svg.css("transform","rotateZ( "+30*Math.round(e/30)+"deg)")},e.prototype.start=function(){var e=this;this.init();var t=0;this.intervalId=setInterval((function(){t+=10,e.setRotation(t)}),20)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0)},e}(),vn=this;!function(e){e.LEFT_PANEL="page-left-panel",e.RIGHT_PANEL="page-right-panel",e.SWIPE_ELEM="page-left-panel-icon",e.CONTENT="app-content-column",e.HEADER="page-header",e.SEARCH="app-search"}(Lt||(Lt={}));var yn=function(e){return"[data-role='"+e+"']"},bn=(yn("pageContainer"),function(e,t){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.removeEventListener("click",t),e.addEventListener("click",t))}),wn=function(e,t){if(i.isMobile()){if(e)try{e.widget.collapse()}catch(e){}t&&i.setCSS(t,"display","none")}},Pn=function(e,t,n,i){void 0===i&&(i=!1),i||bn(t,wn.bind(vn,e,n))},_n=function(e,t){bn(yn(Lt.SWIPE_ELEM),(function(){e&&(e.widget.toggle(),e.classList.contains("visible")&&t&&i.setCSS(t,"display","none"))}))},On=function(e){bn(e,wn)},Sn=function(e,t){"none"===$(e).css("display")?(wn(t),i.setCSS(e,"display","inline-table")):wn(t,e)},En=function(e,t){$(e).each((function(e,n){var i=$('<a class="app-header-action"><i class="wi wi-search"></i></a>');$(n).before(i),bn(i,(function(){return Sn(n,t)}))}))};e.ALLFIELDS=Pt,e.AUTOCLOSE_TYPE={OUTSIDECLICK:"outsideClick",ALWAYS:"always",DISABLED:"disabled"},e.BaseComponent=we,e.BaseContainerComponent=Oe,e.BaseFieldValidations=hn,e.ContainerDirective=Te,e.Context=w,e.CustomPipe=nt,e.DEBOUNCE_TIMES={PAGINATION_DEBOUNCE_TIME:250},e.DISPLAY_TYPE=ae,e.DataSetItem=on,e.DatasetAwareNavComponent=un,e.DialogRef=b,e.DialogServiceImpl=mt,e.EDIT_MODE={QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog"},e.EVENTS_MAP=re,e.FileExtensionFromMimePipe=pt,e.FileIconClassPipe=lt,e.FileSizePipe=st,e.FilterPipe=at,e.INPUTMODE={FINANCIAL:"financial",NATURAL:"natural"},e.ImagePipe=Re,e.ItemTemplateDirective=Ie,e.LIVE_CONSTANTS=_t,e.LazyLoadDirective=Me,e.MessageComponent=Fe,e.NAVIGATION_TYPE={ADVANCED:"Advanced",BASIC:"Basic",CLASSIC:"Classic",INLINE:"Inline",NONE:"None",ONDEMAND:"On-Demand",PAGER:"Pager",SCROLL:"Scroll"},e.NumberToStringPipe=ot,e.PROP_ANY=te,e.PROP_BOOLEAN=ee,e.PROP_NUMBER=Z,e.PROP_STRING=J,e.PartialContainerDirective=Ue,e.PartialDirective=Ge,e.PartialParamDirective=$e,e.PartialParamHandlerDirective=Ve,e.PrefixPipe=et,e.PullToRefresh=mn,e.RedrawableDirective=_e,e.RepeatTemplateDirective=xe,e.SanitizePipe=ft,e.ShowInDeviceDirective=We,e.SmoothScrollDirective=qe,e.StateClassPipe=ct,e.StringToNumberPipe=rt,e.StylableComponent=Pe,e.SuffixPipe=tt,e.TextContentDirective=Ye,e.TimeFromNowPipe=it,e.ToCurrencyPipe=Ze,e.ToDatePipe=Xe,e.ToNumberPipe=Je,e.TrailingZeroDecimalPipe=Qe,e.TrustAsPipe=ut,e.WidgetRef=y,e.WmComponentsModule=yt,e.applyFilterOnField=function(e,t,n,o,r){void 0===r&&(r={});var a=t.field||t.key,s=_.filter(n,{"filter-on":a});o=t["is-range"]?Dt(t.minValue,t.maxValue):i.isDefined(o)?o:t.value,!e||r.isFirst&&(_.isUndefined(o)||""===o)||_.forEach(s,(function(n){var a,s,l,c=n.field||n.key,p=t["lookup-field"]||t._primaryKey,u=n["edit-widget-type"]||n.widgettype,d={},h=n["filter-on"];T(u)&&!n.isDataSetBound&&h!==c&&(t&&t["is-related"]&&(h+="."+p),i.isDefined(o)?(l=t["is-range"]?Nt(t.minValue,t.maxValue):xt(r.enableemptyfilter)&&o===_t.EMPTY_KEY?Mt(r.enableemptyfilter):i.MatchMode.EQUALS,a=_.isObject(o)&&!_.isArray(o)?o[p]:o,d[h]={value:a,matchMode:l}):d={},s=c,Ot(u)&&n.dataoptions?n.dataoptions.filterFields=d:e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:s,filterFields:d,pagesize:n.limit}).then((function(e){Ct(n,e.data,{aliasColumn:s,widget:r.widget||"widgettype",isEnableEmptyFilter:xt(r.enableemptyfilter),EMPTY_VALUE:r.EMPTY_VALUE})}),wt))}))},e.configureDnD=function(e,t,n,i,o){var r=Object.assign({containment:e,delay:100,opacity:.8,helper:"clone",zIndex:1050,tolerance:"pointer",start:n,update:i,sort:o},t);e.sortable(r)},e.convertDataToObject=Kt,e.createArrayFrom=kt,e.extractDataAsArray=function(e){return _.isUndefined(e)||_.isNull(e)||""===_.trim(e)?[]:(_.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),_.isArray(e)||(e=[e]),e)},e.extractDataSourceName=function(e){if(e){var t,n=e.split(".");return n.length>1&&"Variables"===n[0]&&(t=n[1]),t}},e.fetchDistinctValues=function(e,t,n){_.isEmpty(t)||t.forEach((function(t){At(e,t,n)}))},e.fetchRelatedFieldData=function(e,t,n){var o,r,a=n.relatedField,s=n.datafield;e&&(o=e.execute(i.DataSource.Operation.GET_RELATED_PRIMARY_KEYS,a),t.datafield=s,t._primaryKey=_.isEmpty(o)?void 0:o[0],t.compareby=o&&o.join(","),r=s===Pt?void 0:s,t.displayfield=r=t.displayfield||r||t._primaryKey,Ot(t[n.widget])?(t.dataoptions={relatedField:a,filterExpr:t.filterexpressions?t.filterexpressions:{}},t.datasource=e,t.searchkey=t.searchkey||r,t.displaylabel=t.displayfield=t.displaylabel||r,t.showPendingSpinner&&(t.showPendingSpinner=!1)):St(t.viewParent,t.filterexpressions,(function(n){t.filterexpressions=n,e.execute(i.DataSource.Operation.GET_RELATED_TABLE_DATA,{relatedField:a,pagesize:t.limit,orderBy:t.orderby?_.replace(t.orderby,/:/g," "):"",filterFields:{},filterExpr:t.filterexpressions?t.filterexpressions:{}}).then((function(e){t.dataset=e.data,t.displayfield=t.displayfield||_.head(_.keys(_.get(e,"[0]"))),t.showPendingSpinner&&(t.showPendingSpinner=!1)}),wt)})))},e.filterDate=en,e.getBackGroundImageUrl=C,e.getConditionalClasses=F,e.getContainerTargetClass=function(e){return".wm-app"},e.getDataTableFilterWidget=function(e){var t=cn[e]&&cn[e][0];return e===i.DataType.BOOLEAN&&(t=i.FormWidgetType.SELECT),_.includes([i.FormWidgetType.TEXT,i.FormWidgetType.NUMBER,i.FormWidgetType.SELECT,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.DATE,i.FormWidgetType.TIME,i.FormWidgetType.DATETIME],t)?t:i.FormWidgetType.TEXT},e.getDefaultValue=function(e,t,n){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?ln(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?ln(e):e},e.getDefaultViewModeWidget=function(e){return _.includes(["checkbox","toggle","rating"],e)?rn:an},e.getDistinctFieldProperties=Et,e.getDistinctValues=Tt,e.getDistinctValuesForField=At,e.getEditModeWidget=function(e){return e["related-entity-name"]&&e["primary-key"]?i.FormWidgetType.SELECT:cn[e.type]&&cn[e.type][0]||i.FormWidgetType.TEXT},e.getEmptyMatchMode=Mt,e.getEnableEmptyFilter=xt,e.getEvaluatedData=E,e.getFieldLayoutConfig=function(e,t,n){var o="",r="";return"top"===(t=t||"top")||"floating"===t?n&&"android"===n||!i.isMobileApp()||i.isAndroid()?o=r="col-xs-12":i.isMobileApp()&&(o="col-xs-4",r="col-xs-8"):e&&_.forEach(_.split(e," "),(function(e){var t,n,i=_.split(e,"-"),a=i[0];t=parseInt(i[1],10),o+=" col-"+a+"-"+t,r+=" col-"+a+"-"+(n=(n=12-t)<=0?12:n)})),{captionCls:o,widgetCls:r}},e.getFieldTypeWidgetTypesMap=function(){return cn},e.getImageUrl=R,e.getKeyboardFocusableElements=function(e){return[e.querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex="-1"])')].filter((function(e){return!e[0].hasAttribute("disabled")&&!e[0].hasAttribute("hidden")}))[0]},e.getMatchModeMsgs=function(e){return{start:e.LABEL_STARTS_WITH,startignorecase:e.LABEL_STARTS_WITH_IGNORECASE,end:e.LABEL_ENDS_WITH,endignorecase:e.LABEL_ENDS_WITH_IGNORECASE,anywhere:e.LABEL_CONTAINS,anywhereignorecase:e.LABEL_CONTAINS_IGNORECASE,exact:e.LABEL_IS_EQUAL_TO,exactignorecase:e.LABEL_IS_EQUAL_TO_IGNORECASE,notequals:e.LABEL_IS_NOT_EQUAL_TO,notequalsignorecase:e.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,lessthan:e.LABEL_LESS_THAN,lessthanequal:e.LABEL_LESS_THAN_OR_EQUALS_TO,greaterthan:e.LABEL_GREATER_THAN,greaterthanequal:e.LABEL_GREATER_THAN_OR_EQUALS_TO,null:e.LABEL_IS_NULL,isnotnull:e.LABEL_IS_NOT_NULL,empty:e.LABEL_IS_EMPTY,isnotempty:e.LABEL_IS_NOT_EMPTY,nullorempty:e.LABEL_IS_NULL_OR_EMPTY,in:e.LABEL_IN,notin:e.LABEL_NOT_IN,between:e.LABEL_BETWEEN}},e.getMatchModeTypesMap=function(e){return e&&(M.number.push("in","notin","between"),M.date.push("between"),M.string.push("in","notin"),M.character.push("in","notin")),_.forEach(x,(function(e,t){_.forEach(e,(function(e){k[e]=M[t]}))})),k.default=_.union(M.number,M.string,M.character,M.date,M.date),k},e.getObjValueByKey=S,e.getOrderByExpr=function(e){e=e||[];var t=[];return _.forEach(e,(function(e){e.direction&&t.push(e.property+" "+e.direction.toLowerCase())})),_.join(t,",")},e.getOrderedDataset=Yt,e.getRangeFieldValue=Dt,e.getRangeMatchMode=Nt,e.getRowOperationsColumn=function(){return{field:"rowOperations",type:"custom",displayName:"Actions",width:"120px",readonly:!0,sortable:!1,searchable:!1,resizable:!1,selectable:!1,show:!0,operations:[],opConfig:{},pcDisplay:!0,mobileDisplay:!0,tabletDisplay:!0,include:!0,isRowOperation:!0}},e.getUniqObjsByDataField=function(e,t,n,i){var o,r=t===Pt;return o=r?_.uniqWith(e,_.isEqual):_.uniqBy(e,"key"),!n||i?o:_.filter(o,(function(e){return(r||_.trim(e.key))&&_.trim(e.label)}))},e.getWatchIdentifier=N,e.getWidgetPropsByType=Q,e.groupData=function(e,t,n,o,r,a,s,l,c){var p={};if(_.includes(n,"(")){var u=i.$parseEvent(n);p=_.groupBy(t,(function(t){return u(e.viewParent,{row:t.dataObject||t})}))}else p=Zt(t,n,o,r,a,s,l,c);return Jt(p,n,r)},e.handleHeaderClick=function(e){var t=$(e.target).closest(".item-group"),n=t.find("li.list-group-header .app-icon");n.hasClass("wi-chevron-down")?n.removeClass("wi-chevron-down").addClass("wi-chevron-up"):n.removeClass("wi-chevron-up").addClass("wi-chevron-down"),t.find(".group-list-item").toggle()},e.interpolateBindExpressions=St,e.isActiveNavItem=function(e,t){return!(!e||!t)&&(t=-1===t.indexOf("?")?t:t.substring(0,t.indexOf("?")),e=-1===e.indexOf("?")?e:e.substring(0,e.indexOf("?")),new RegExp("^(#/|#)"+t+"$").test(e))},e.isBooleanAttr=le,e.isDataSetWidget=T,e.isDimensionProp=pe,e.isStyle=V,e.parseValueByType=function(e,t,n,o){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:o?e:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?ln(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?ln(e):e},e.performDataOperation=function(t,n,o){return new Promise((function(r,a){if(t.execute(i.DataSource.Operation.SUPPORTS_CRUD)){var s=void 0;switch(o.operationType){case e.Live_Operations.UPDATE:s=i.DataSource.Operation.UPDATE_RECORD;break;case e.Live_Operations.INSERT:s=i.DataSource.Operation.INSERT_RECORD;break;case e.Live_Operations.DELETE:s=i.DataSource.Operation.DELETE_RECORD}t.execute(s,n).then((function(e){return function(e,t,n){e.error?n(e):t(e)}(e,r,a)}),a)}else if(t.execute(i.DataSource.Operation.IS_API_AWARE))if("wm.CrudVariable"===t.category){var l="insert"===o.operationType?"create":"delete"===o.operationType?"delete":"update";t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0,operation:l,inputFields:n}).then(r,a)}else t.execute(i.DataSource.Operation.SET_INPUT,n),t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0}).then(r,a);else r(n)}))},e.prepareFieldDefs=function(e,t){var n,i={objects:[],terminals:[]};if(e||(e=[]),t||(t={}),t.setBindingField=!0,t.columnCount=0,n=B(e),j(n,i,"",t),!t||t&&!t.filter)return i.terminals;switch(t.filter){case"all":return i;case"objects":return i.objects;case"terminals":return i.terminals}return i},e.propNameCSSKeyMap=G,e.provideAs=A,e.provideAsDialogRef=function(e){return A(e,b)},e.provideAsWidgetRef=I,e.refreshDataSource=function(e,t){return new Promise((function(n,o){e?e.execute(i.DataSource.Operation.LIST_RECORDS,{filterFields:t.filterFields||{},orderBy:t.orderBy,page:t.page||1,logicalOp:t.condition||""}).then(n,o):o()}))},e.register=X,e.registerFormWidget=function(e,t){var n=Y+e,i=K.get(n);i&&t.forEach((function(e,t){return i.set(t,e)}))},e.setFocusTrap=function(e,t,n){return r.createFocusTrap(e,{onActivate:function(){return e.classList.add("is-active")},onDeactivate:function(){return e.classList.remove("is-active")},allowOutsideClick:t,setReturnFocus:n})},e.setHeaderConfig=sn,e.setHeaderConfigForTable=function(e,t,n,i){n?sn(e,t,n,i):e[i]=t},e.setItemByCompare=function(e,t,n){_.forEach(e,(function(e){if(i.isEqualWithFields(e.value,t,n))return e.selected=!0,!1}))},e.styler=z,e.toggleAllHeaders=function(e){var t=$(e.nativeElement).find(".item-group");t.find(".group-list-item").toggle();var n=t.find("li.list-group-header .app-icon");n&&_.forEach(n,(function(e){(e=$(e)).hasClass("wi-chevron-down")?e.removeClass("wi-chevron-down").addClass("wi-chevron-up"):e.removeClass("wi-chevron-up").addClass("wi-chevron-down")}))},e.transformData=function(e,t){var n,i,o,r,a,s,l;return e=e||[],_.isArray(e)?_.isString(e[0])&&(i=[],_.forEach(e,(function(e){(n={})[t.split(".").join("-")]=e,i.push(n)})),e=i):(_.isString(e)&&(o=t.substring(t.indexOf(".")+1,t.length).split("."),r=[],a=o.length,l=s={},o.forEach((function(t,n){r.forEach((function(e){l=s[e]})),l[t]=n===a-1?e:{},r.push(t)})),e=s),e=[e]),e},e.transformDataWithKeys=function(e){var t=[];if(_.isObject(e[0])||_.isObject(e)&&!(e instanceof Array)){var n=Object.keys(e[0]||e);_.forEach(n,(function(e,n){t.push({key:e,label:e,value:e,index:n+1})}))}return t},e.transformFormData=function(e,t,n,o,r,a){var s=[];if(t){if(t=Kt(t),_.isUndefined(r)&&(r=1),_.isString(t))(t=t.split(",").map((function(e){return e.trim()}))).forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:r+n};Xt(a,e,o,"value"),s.push(o)}));else if(_.isArray(t)&&!_.isObject(t[0]))t.forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:r+n};Xt(a,e,o,"value"),s.push(o)}));else if(t instanceof Array||!_.isObject(t))n||(n=Pt),t.forEach((function(t,l){var c=n===Pt?r+l:S(t,n);if(!_.isUndefined(c)&&!_.isNull(c)){var p=E(t,{field:o.displayField,expression:o.displayExpr,bindExpression:o.bindDisplayExpr},e),u={key:c,label:i.isDefined(p)&&null!==p?p.toString():"",value:n===Pt?t:c,dataObject:t,index:r+l};(o.displayImgSrc||o.bindDisplayImgSrc)&&(u.imgSrc=E(t,{expression:o.displayImgSrc,bindExpression:o.bindDisplayImgSrc},e)),Xt(a,e,u,"dataObject"),s.push(u)}}));else{_.forEach(t,(function(n,o){var l={key:_.trim(o),value:o,label:i.isDefined(n)&&null!==n?n.toString():"",index:r,dataObject:t};Xt(a,e,l,"value"),s.push(l)}))}return s}},e.unsupportedStatePersistenceTypes=["On-Demand","Scroll"],e.updateDeviceView=function(e,t){void 0===t&&(t=!1);var n=e.querySelector(yn(Lt.LEFT_PANEL)),i=e.querySelector(yn(Lt.RIGHT_PANEL)),o=e.querySelector(yn(Lt.HEADER)),r=o&&o.querySelector("."+Lt.SEARCH),a=e.querySelector("."+Lt.CONTENT);Pn(n,a,r,t),n?_n(n,r):$(o).find(yn(Lt.SWIPE_ELEM)).remove(),i&&On(i),r&&En(r,n)},e["\u02750"]=He,e["\u0275a"]=ne,e["\u0275b"]=Ce,e["\u0275c"]=De,e["\u0275d"]=ke,e["\u0275e"]=je,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/transpiler"),require("@wm/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@wm/buildTask",["exports","@wm/transpiler","@wm/core","@angular/compiler"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.buildTask={}),e.wm.transpiler,e.wm.core,e.ng.compiler)}(this,(function(e,t,n,i){"use strict";var o=new n.IDGenerator("wm_carousel_ref_"),r=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},a=r;t.register("wm-carousel",(function(){return{pre:function(e,n){var i=o.nextUid();return n.set("carousel_ref",i),'<div class="app-carousel carousel"><carousel wmCarousel #'+i+'="wmCarousel" '+t.getAttrMarkup(e)+' interval="0" [ngClass]="'+i+'.navigationClass">'},post:function(){return"</carousel></div>"},template:function(e){if(r(e)){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(!i)return;var a=t.getBoundToExpr(i.value);if(!a)return;n.updateTemplateAttrs(e,a,o.value)}},provide:function(e,t){var n=new Map;return n.set("carousel_ref",t.get("carousel_ref")),n}}}));var s=Object.freeze({__proto__:null,default:function(){},"\u02750":a}),l=1;t.register("wm-carousel-content",(function(){return{pre:function(e){return"<slide wmCarouselTemplate "+t.getAttrMarkup(e)+">"},post:function(){return"</slide>"}}})),t.register("wm-carousel-template",(function(){return{requires:["wm-carousel"],pre:function(e,n,i){var o=i.get("carousel_ref");return'<div *ngIf="!'+o+'.fieldDefs">{{'+o+".nodatamessage}}</div>\n <"+"slide wmCarouselTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+o+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="carouselTempRef'+l+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </'+"slide>\n <ng-template #carouselTempRef"+l+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var c=Object.freeze({__proto__:null,default:function(){}});t.register("wm-login",(function(){return{pre:function(e){return"<div wmLogin "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction">'},post:function(){return"</div>"},provide:function(){var e=new Map;return e.set("isLogin",!0),e}}}));var p=Object.freeze({__proto__:null,default:function(){}});t.register("wm-marquee",(function(){return{pre:function(e){return'<marquee onmouseover="this.stop();" onmouseout="this.start();" wmMarquee role="marquee" aria-live="off" '+t.getAttrMarkup(e)+">"},post:function(){return"</marquee>"}}}));var u=Object.freeze({__proto__:null,default:function(){}}),d=new n.IDGenerator("wm_anchor");t.register("wm-anchor",(function(){return{pre:function(e){var n=d.nextUid();return"<a wmAnchor #"+n+'="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</a>"}}}));var h=Object.freeze({__proto__:null,default:function(){}});t.register("wm-audio",(function(){return{pre:function(e){return"<div wmAudio "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var m=Object.freeze({__proto__:null,default:function(){}}),f=new n.IDGenerator("wm_html");t.register("wm-html",(function(){return{pre:function(e){var n=f.nextUid();return"<div wmHtml #"+n+'="wmHtml" [attr.aria-label]="'+n+".hint || 'HTML content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var g=Object.freeze({__proto__:null,default:function(){}});t.register("wm-icon",(function(){return{pre:function(e){return'<span wmIcon aria-hidden="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</span>"}}}));var v=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframe",(function(){return{pre:function(e){return"<div wmIframe "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var y=Object.freeze({__proto__:null,default:function(){}}),b=new n.IDGenerator("wm_label");t.register("wm-label",(function(){return{pre:function(e){var n=b.nextUid();return"<label wmLabel #"+n+'="wmLabel" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</label>"}}}));var w=Object.freeze({__proto__:null,default:function(){}}),P=new n.IDGenerator("wm_picture");t.register("wm-picture",(function(){return{pre:function(e){var n=P.nextUid();return"<img wmPicture #"+n+'="wmPicture" alt="image" wmImageCache="'+(e.get("offline")||"true")+'" [attr.aria-label]="'+n+".hint || 'Image'\" "+t.getAttrMarkup(e)+">"}}}));var O=Object.freeze({__proto__:null,default:function(){}}),S=new n.IDGenerator("wm_spinner");t.register("wm-spinner",(function(){return{pre:function(e){var n=S.nextUid();return"<div wmSpinner #"+n+'="wmSpinner" role="alert" [attr.aria-label]="'+n+'.hint || \'Loading...\'" aria-live="assertive" aria-busy="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var E=Object.freeze({__proto__:null,default:function(){}}),T=function(e,t){return e.attrs.find((function(e){return e.name===t}))},R=T,C=function(e,t){var n=T(e,t);if(n)return n.value},A=C,I=function(e){return new RegExp("bind:("+e+"|"+e+"\\[\\$i])\\.","g")},D=I;t.register("wm-progress-bar",(function(){return{template:function(e){var n=C(e,"dataset"),i=t.getBoundToExpr(n);if(i){var o=C(e,"type"),r=C(e,"datavalue"),a=I(i);o&&o.includes(i)&&(o=o.replace(a,""),T(e,"type").value=o),r&&r.includes(i)&&(r=r.replace(a,""),T(e,"datavalue").value=r)}},pre:function(e){return"<div wmProgressBar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var N=Object.freeze({__proto__:null,default:function(){},"\u02750":R,"\u02751":A,"\u02752":D});t.register("wm-progress-circle",(function(){return{pre:function(e){return"<div wmProgressCircle "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var x=Object.freeze({__proto__:null,default:function(){}}),M=new n.IDGenerator("wm_richtexteditor");t.register("wm-richtexteditor",(function(){return{pre:function(e){var n=M.nextUid();return"<div wmRichTextEditor #"+n+'="wmRichTextEditor" role="textbox" [attr.aria-label]="'+n+".hint || 'Richtext editor'\" "+t.getFormMarkupAttr(e)+">"},post:function(){return"</div>"}}}));var k=Object.freeze({__proto__:null,default:function(){}});t.register("wm-search",(function(){return{pre:function(e){return"<div wmSearch "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var L=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tree",(function(){return{pre:function(e){return"<div wmTree "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var F=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card",(function(){return{pre:function(e){return"<div wmCard "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var j=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-content",(function(){return{pre:function(e){return"<div wmCardContent partialContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var B=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-actions",(function(){return{pre:function(e){return"<div wmCardActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var G=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-footer",(function(){return{pre:function(e){return"<div wmCardFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var V=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chart",(function(){return{pre:function(e){return'<div wmChart redrawable aria-label="'+e.get("type")+' Chart" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var $=Object.freeze({__proto__:null,default:function(){}}),U=new n.IDGenerator("wm_accordion_ref_"),W=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},q=W;t.register("wm-accordion",(function(){return{pre:function(e,n){var i=U.nextUid();return n.set("accordion_ref",i),"<div wmAccordion #"+i+'="wmAccordion" role="tablist" aria-multiselectable="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(W(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),r=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var a=t.getBoundToExpr(o.value);if(!a)return;n.updateTemplateAttrs(e,a,r.value)}},provide:function(e,t){var n=new Map;return n.set("accordion_ref",t.get("accordion_ref")),n}}}));var z=Object.freeze({__proto__:null,default:function(){},"\u02750":q}),H=new n.IDGenerator("wm_accordionpane");t.register("wm-accordionpane",(function(){return{pre:function(e){var n=H.nextUid();return"<div #"+n+'="wmAccordionPane" [attr.aria-expanded]="'+n+'.isActive" wmAccordionPane partialContainer wm-navigable-element="true" role="tab" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Y=Object.freeze({__proto__:null,default:function(){}});t.register("wm-container",(function(){return{pre:function(e){return'<div wmContainer partialContainer wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var K=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridcolumn",(function(){return{pre:function(e){return"<div wmLayoutGridColumn "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Q=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridrow",(function(){return{pre:function(e){return"<div wmLayoutGridRow "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var X=Object.freeze({__proto__:null,default:function(){}});t.register("wm-layoutgrid",(function(){return{pre:function(e){return"<div wmLayoutGrid "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var J=Object.freeze({__proto__:null,default:function(){}}),Z=new n.IDGenerator("wm_panel");t.register("wm-panel",(function(){return{pre:function(e){return"<div wmPanel #"+Z.nextUid()+'="wmPanel" partialContainer wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}})),t.register("wm-panel-footer",(function(){return{pre:function(e){return"<div wmPanelFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ee=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segmented-control",(function(){return{pre:function(e){return"<div wmSegmentedControl "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var te=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segment-content",(function(){return{pre:function(e){return"<li wmSegmentContent partialContainer wmSmoothscroll="+(e.get("smoothscroll")||"false")+' wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var ne=Object.freeze({__proto__:null,default:function(){}}),ie=1;t.register("wm-repeat-template",(function(){return{requires:["wm-accordion","wm-tabs"],pre:function(e,n,i,o){var r=i&&i.get("accordion_ref")||o&&o.get("tabs_ref");if(r)return'<div *ngIf="'+r+".fieldDefs && !"+r+'.fieldDefs.length">{{'+r+".nodatamessage}}</div>\n <div wmRepeatTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+r+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="widgetRef'+ie+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </div>\n <ng-template #widgetRef'+ie+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var oe=Object.freeze({__proto__:null,default:function(){}}),re=new n.IDGenerator("wm_tabs_ref_"),ae=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},se=ae;t.register("wm-tabs",(function(){return{pre:function(e,n){var i=re.nextUid();return n.set("tabs_ref",i),"<div wmTabs #"+i+'="wmTabs" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(ae(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),r=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var a=t.getBoundToExpr(o.value);if(!a)return;n.updateTemplateAttrs(e,a,r.value)}},provide:function(e,t){var n=new Map;return n.set("tabs_ref",t.get("tabs_ref")),n}}}));var le=Object.freeze({__proto__:null,default:function(){},"\u02750":se});t.register("wm-tabpane",(function(){return{pre:function(e){return"<div wmTabPane partialContainer "+t.getAttrMarkup(e)+' wm-navigable-element="true" role="tabpanel">'},post:function(){return"</div>"}}}));var ce=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tile",(function(){return{pre:function(e){return'<div wmTile aria-describedby="Tile" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-wizard",(function(){return{pre:function(e){return'<div wmWizard role="tablist" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ue=Object.freeze({__proto__:null,default:function(){}}),de=new n.IDGenerator("wizard_step_id_");t.register("wm-wizardstep",(function(){return{pre:function(e){var n=de.nextUid();return"<form wmWizardStep #"+n+'="wmWizardStep" '+t.getAttrMarkup(e)+'>\n <ng-template [ngIf]="'+n+'.isInitialized">'},post:function(){return"</ng-template></form>"}}}));var he=Object.freeze({__proto__:null,default:function(){}}),me=new n.IDGenerator("wm_barcodescanner");t.register("wm-barcodescanner",(function(){return{pre:function(e){var n=me.nextUid();return"<button wmBarcodescanner #"+n+'="wmBarcodescanner" [attr.aria-label]="'+n+".hint || 'Barcode scanner'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var fe=Object.freeze({__proto__:null,default:function(){}}),ge=new n.IDGenerator("wm_camera");t.register("wm-camera",(function(){return{pre:function(e){var n=ge.nextUid();return"<button type='button' wmCamera #"+n+'="wmCamera" [attr.aria-label]="'+n+".hint || 'Camera'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ve=Object.freeze({__proto__:null,default:function(){}});t.register("wm-alertdialog",(function(){return{pre:function(e){return'<div wmAlertDialog role="alertdialog" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ye=Object.freeze({__proto__:null,default:function(){}});t.register("wm-confirmdialog",(function(){return{pre:function(e){return'<div wmConfirmDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var be=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialogactions",(function(){return{pre:function(e){return'<ng-template #dialogFooter><div wmDialogFooter data-identfier="actions" '+t.getAttrMarkup(e)+">"},post:function(){return"</div></ng-template>"}}}));var we=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialog",(function(){return{pre:function(e){return"<div wmDialog "+t.getAttrMarkup(e)+' aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}})),t.register("wm-view",(function(){return{pre:function(e){return""},post:function(){return""}}}));var Pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframedialog",(function(){return{pre:function(e){return'<div wmIframeDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _e=Object.freeze({__proto__:null,default:function(){}});t.register("wm-logindialog",(function(){return{pre:function(e){return"<div wmDialog wmLoginDialog "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}}));var Oe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagedialog",(function(){return{pre:function(e,n){var i=e.get("content");e.delete("content");var o=e.get("content.bind");e.delete("content.bind");var r=e.get("load.event");e.delete("load.event");var a="",s="";r&&(a='load.event="'+r+'"'),o?s='content.bind="'+o+'"':i&&(s='content="'+i+'"');var l="";return s&&(n.set("hasPartialContent",!0),l+="<ng-template><div wmContainer #partial partialContainer "+s+' width="100%" height="100%" '+a+">"),"<div wmPartialDialog "+t.getAttrMarkup(e)+">"+l},post:function(e,t){var n="";return t.get("hasPartialContent")&&(n="</div></ng-template>"),n+"</div>"}}}));var Se=Object.freeze({__proto__:null,default:function(){}}),Ee="quickedit",Te="form",Re="dialog",Ce={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},Ae=new Set([n.FormWidgetType.SELECT,n.FormWidgetType.CHECKBOXSET,n.FormWidgetType.RADIOSET,n.FormWidgetType.SWITCH,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.CHIPS,n.FormWidgetType.TYPEAHEAD,n.FormWidgetType.RATING]),Ie=function(e){var t=Ce[e]&&Ce[e][0];return e===n.DataType.BOOLEAN&&(t=n.FormWidgetType.SELECT),[n.FormWidgetType.TEXT,n.FormWidgetType.NUMBER,n.FormWidgetType.SELECT,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.DATE,n.FormWidgetType.TIME,n.FormWidgetType.DATETIME].includes(t)?t:n.FormWidgetType.TEXT},De=new n.IDGenerator("formfield_"),Ne=function(e){var n=new Map;return e.has("focus.event")||e.set("focus.event",""),e.has("blur.event")||e.set("blur.event",""),e.forEach((function(t,i){i.endsWith(".event")&&("focus.event"===i?t="_onFocusField($event);"+t:"blur.event"===i&&(t="_onBlurField($event);"+t),n.set(i,t),e.delete(i))})),t.getFormMarkupAttr(n)},xe=Ne,Me=new Map([[n.FormWidgetType.SELECT,["Select Min value","Select Max value","Select value"]],[n.FormWidgetType.DATETIME,["Select Min date time","Select Max date time","Select date time"]],[n.FormWidgetType.TIME,["Select Min time","Select Max time","Select time"]],[n.FormWidgetType.DATE,["Select Min date","Select Max date","Select date"]],[n.FormWidgetType.TEXTAREA,["","","Enter value"]],[n.FormWidgetType.RICHTEXT,["","","Enter value"]],[n.FormWidgetType.COLORPICKER,["Select Color","Select Color","Select Color"]],[n.FormWidgetType.CHIPS,["","","Type here..."]],[n.FormWidgetType.PASSWORD,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.NUMBER,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.TEXT,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.CURRENCY,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.AUTOCOMPLETE,["","","Search"]]]),ke=function(e,t,n){var i=1===n?"maxplaceholder":"placeholder",o=e.get(i);o||""===o||(o=Me.get(t)&&Me.get(t)[n])&&e.set(i,o)},Le=ke,Fe=function(e,t){var i=e.get("name"),o=(e.get("key")||i||"").trim(),r=t.isMaxWidget?'formControlName="'+o+'_max"':t.isInList?'[formControlName]="'+t.counter+'._fieldName"':'formControlName="'+o+'"',a=t.isMaxWidget?"#formWidgetMax":"#formWidget",s=i?t.isMaxWidget?'name="'+i+'_formWidgetMax"':'name="'+i+'_formWidget"':"",l='[ngClass]="'+e.get("ngclass")+'"',c='[class.hidden]="!'+t.pCounter+".isUpdateMode && "+t.counter+".viewmodewidget !== 'default'\" "+r+" "+t.eventsTmpl+" "+l+" "+a+" "+s;return n.getFormWidgetTemplate(t.widgetType,c,e,{counter:t.counter,pCounter:t.pCounter})},je=Fe,Be=function(e,t,i,o,r,a){if(!("true"===e.get("is-range")))return Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r,isInList:a});var s=n.isMobileApp()?"col-xs-6":"col-sm-6";return'<div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r})+'</div>\n <div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r,isMaxWidget:!0})+"</div>"},Ge=Be,Ve=function(e,t,i){if("true"===e.get("is-related"))return i+".getDisplayExpr()";if(t===n.FormWidgetType.PASSWORD)return"'********'";var o,r=i+".value";return t===n.FormWidgetType.DATETIME||t===n.FormWidgetType.TIMESTAMP?r+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MM-dd hh:mm:ss a'":t===n.FormWidgetType.TIME?r+=" | toDate:"+i+".formWidget.timepattern || 'hh:mm a'":t===n.FormWidgetType.DATE?r+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MMM-dd'":t===n.FormWidgetType.RATING||t===n.FormWidgetType.UPLOAD?"":(o=t,Ae.has(o)&&"All Fields"===e.get("datafield")?i+".getDisplayExpr()":i+".getCaption()")},$e=Ve,Ue=function(e){return{requires:["wm-form","wm-liveform","wm-livefilter","wm-list"],pre:function(i,o,r,a,s,l){var c=De.nextUid(),p=r||a||s,u=p&&p.get("form_reference")||"form",d=i.get("widget")||n.FormWidgetType.TEXT,h=e?"form-field":"filter-field",m="wmform-field-error-"+n.generateGUId(),f=e?'<p *ngIf="'+c+"._control?.invalid && "+c+"._control?.touched && "+u+'.isUpdateMode"\n class="help-block text-danger" aria-hidden="false" role="alert"\n aria-live="assertive" [attr.aria-label]="'+c+'.validationmessage" id="'+m+'"><span aria-hidden="true" [textContent]="'+c+'.validationmessage"></span></p>':"",g=d===n.FormWidgetType.UPLOAD?"":Ne(i),v=n.isMobileApp()?"col-xs-12":"col-sm-12",y=u===(l&&l.get("parent_form_reference"));return i.set("__errormsg",m),i.set("__widgetType",d),i.delete("widget"),o.set("counter",c),"true"===i.get("is-range")?(ke(i,d,0),ke(i,d,1)):ke(i,d,2),'<div data-role="'+h+'" [formGroup]="'+u+'.ngform" wmFormField captionPosition #'+c+'="wmFormField" widgettype="'+d+'" '+t.getFormMarkupAttr(i)+'>\n <div class="live-field form-group app-composite-widget clearfix caption-{{'+u+'.captionposition}}" widget="'+d+'">\n <label [hidden]="!'+c+'.displayname" class="app-label control-label formfield-label {{'+u+'._captionClass}}"\n [ngStyle]="{width: '+u+".captionsize}\" [ngClass]=\"{'text-danger': "+c+"._control?.invalid && "+c+"._control?.touched && "+u+".isUpdateMode,\n required: "+u+".isUpdateMode && "+c+'.required}" [textContent]="'+c+'.displayname"> </label>\n <div [ngClass]="'+c+".displayname ? "+u+"._widgetClass : '"+v+'\'">\n <label class="form-control-static app-label"\n [hidden]="'+u+".isUpdateMode || "+c+".viewmodewidget === 'default' || "+c+".widgettype === 'upload'\" [innerHTML]=\""+Ve(i,d,c)+'"></label>\n '+Be(i,d,g,c,u,y)+'\n <span aria-hidden="true" *ngIf="'+c+'.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <p *ngIf="!('+c+"._control?.invalid && "+c+"._control?.touched) && "+u+'.isUpdateMode"\n class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="'+c+'.hint"></p>\n '+f+"\n </div>\n </div>"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n},imports:function(e){var t=n.getRequiredFormWidget(e.get("__widgetType")||e.get("type"));return e.delete("__widgetType"),[t,"wm-form"]}}},We=Ue;t.register("wm-form-field",Ue.bind(this,!0)),t.register("wm-filter-field",Ue.bind(this,!1));var qe=Object.freeze({__proto__:null,default:function(){},"\u02750":xe,"\u02751":Le,"\u02752":je,"\u02753":Ge,"\u02754":$e,"\u02755":We}),ze=function(e){return{pre:function(n){return'<div wmFormAction name="'+(n.get("name")||n.get("key"))+'" '+t.getAttrMarkup(n)+" "+e+">"},post:function(){return"</div>"}}},He=ze;t.register("wm-form-action",ze.bind(this,"")),t.register("wm-filter-action",ze.bind(this,' update-mode="true" '));var Ye,Ke=Object.freeze({__proto__:null,default:function(){},"\u02750":He}),Qe=new n.IDGenerator("form_"),Xe=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-richtexteditor","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-upload","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker","wm-table"]),Je=function(e){void 0===e&&(e=[]),e.forEach((function(e){if("wm-form-field"===e.name&&Ye++,Xe.has(e.name)){var t=e.attrs.find((function(e){return"key"===e.name||"name"===e.name}));if(!(t=t&&t.value)){var n=e.attrs.find((function(e){return"datavalue"===e.name}));if(n&&n.value){(n=n.value.match(/\((.*)\)/))&&n.length>1&&(t=n[1].replace(/["']/g,""))}}e.attrs.push(new i.Attribute("formControlName",t,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("wmFormWidget","",1,1,1,void 0,void 0))}Je(e.children)}))},Ze=Je,et=function(e){if(e.get("formdata.bind")){var n=t.getDataSource(e.get("formdata.bind"));n&&e.set("formdatasource.bind",n)}},tt=et,nt=function(e){return void 0===e&&(e=""),{requires:["wm-livetable","wm-login"],template:function(e){Ye=0,Je(e.children)},pre:function(n,i,o,r){var a,s,l=r&&r.get("isLogin")?"app-login":"",c=Qe.nextUid(),p=n.get("dependson")?'dependson="'+n.get("dependson")+'"':"",u="page"===n.get("formlayout")?"app-device-liveform panel liveform-inline":"";n.delete("dependson");var d='<form wmForm data-role="'+l+'" '+e+" #"+c+' ngNativeValidate [formGroup]="'+c+'.ngform" [noValidate]="'+c+".validationtype !== 'html'\"\n class=\""+u+'" [class]="'+c+'.captionAlignClass" [autocomplete]="'+c+".autocomplete ? 'on' : 'off'\" captionposition="+n.get("captionposition");if(n.set("numberOfFields",""+Ye),i.set("counter",c),et(n),"dialog"===n.get("formlayout")){s=o?o.get("liveform_dialog_id"):"liveform_dialog_id_"+c,n.set("dialogId",s);var h=new Map;return["title","title.bind","iconclass","iconclass.bind","width"].forEach((function(e){n.get(e)&&h.set(e,n.get(e))})),n.set("width","100%"),a=t.getAttrMarkup(n),'<div data-identifier="liveform" init-widget class="app-liveform liveform-dialog" '+p+' dialogid="'+s+'">\n <div wmDialog class="app-liveform-dialog" name="'+s+'" role="form" '+t.getAttrMarkup(h)+' modal="true">\n <ng-template #dialogBody>\n '+d+" "+a+">"}var m="",f="";if("page"===n.get("formlayout")){var g="device_liveform_header_"+c,v=new Map;v.set("title",n.get("title")),v.set("backbtnclick.event",n.get("backbtnclick.event")),f='<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" class="navbar-btn btn-primary btn-transparent" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="'+c+'.invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="btn.disabled"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !'+c+".isUpdateMode : "+c+'.isUpdateMode"></button>\n </ng-template>',m='<header wmMobileNavbar name="'+g+'" '+t.getAttrMarkup(v)+'>\n <ng-container *ngFor="let btn of '+c+'.buttonArray" [ngTemplateOutlet]="buttonRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </header>\n <div class="form-elements panel-body" >'}return d+" "+(a=t.getAttrMarkup(n))+" "+p+">\n "+f+" "+m},post:function(e){return"dialog"===e.get("formlayout")?"</form></ng-template></div></div>":"page"===e.get("formlayout")?"</div></form>":"</form>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n}}},it=nt;t.register("wm-form",nt),t.register("wm-liveform",(function(){return nt("wmLiveForm")})),t.register("wm-livefilter",(function(){return nt("wmLiveFilter")}));var ot=Object.freeze({__proto__:null,default:function(){},"\u02750":Ze,"\u02751":tt,"\u02752":it});t.register("wm-calendar",(function(){return{pre:function(e){return'<div wmCalendar redrawable style="width:100%" aria-label="'+(e.get("view")?e.get("view")+" view":"month view")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chips",(function(){return{pre:function(e){return'<ul wmChips role="listbox" '+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var at=Object.freeze({__proto__:null,default:function(){}});t.register("wm-colorpicker",(function(){return{pre:function(e){return"<div wmColorPicker "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var st=Object.freeze({__proto__:null,default:function(){}});t.register("wm-currency",(function(){return{pre:function(e){return"<div wmCurrency "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-buttongroup",(function(){return{pre:function(e){return'<div wmButtonGroup role="group" aria-labelledby="button group" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ct=Object.freeze({__proto__:null,default:function(){}}),pt=new n.IDGenerator("wm_button");t.register("wm-button",(function(){return{pre:function(e){var n=pt.nextUid();return"<button wmButton #"+n+'="wmButton" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ut=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkbox",(function(){return{pre:function(e){return"<div wmCheckbox "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var dt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkboxset",(function(){return{pre:function(e){return'<ul role="group" wmCheckboxset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var ht=Object.freeze({__proto__:null,default:function(){}});t.register("wm-composite",(function(){return{pre:function(e){return"<div wmComposite captionPosition "+t.setChildAttrs(e)+" "+t.getAttrMarkup(e)+">"},post:function(){return"</div"+t.clearChildAttrs()+">"}}}));var mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-number",(function(){return{pre:function(e){return"<div wmNumber "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-radioset",(function(){return{pre:function(e){return'<ul role="radiogroup" wmRadioset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-select",(function(){return{pre:function(e){return"<wm-select "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-select>"}}}));var vt=Object.freeze({__proto__:null,default:function(){}}),yt=new n.IDGenerator("wm_switch");t.register("wm-switch",(function(){return{pre:function(e){var i=yt.nextUid();return"<div wmSwitch #"+i+'="wmSwitch" [attr.aria-label]="'+i+".hint || 'Switch button'\" "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-text",(function(){return{pre:function(e){return"<wm-input "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-input>"}}}));var wt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-textarea",(function(){return{pre:function(e){return"<wm-textarea "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-textarea>"}}}));var Pt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-datetime",(function(){return{pre:function(e){return"<div wmDateTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var _t=Object.freeze({__proto__:null,default:function(){}});t.register("wm-date",(function(){return{pre:function(e){return"<div wmDate "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Ot=Object.freeze({__proto__:null,default:function(){}});t.register("wm-time",(function(){return{pre:function(e){return"<div wmTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var St=Object.freeze({__proto__:null,default:function(){}});t.register("wm-fileupload",(function(){return{pre:function(e){if(e.get("select.event")){var n=t.getDataSource(e.get("select.event"));e.set("datasource.bind",n)}return"<div wmFileUpload "+t.getAttrMarkup(e)+' role="input">'},post:function(){return"</div>"}}}));var Et=Object.freeze({__proto__:null,default:function(){}});t.register("wm-rating",(function(){return{pre:function(e){return"<div wmRating "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Tt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-slider",(function(){return{pre:function(e){return"<div wmSlider "+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Rt=Object.freeze({__proto__:null,default:function(){}});function Ct(e,t,n,o){var r=e.attrs.find((function(e){return e.name===t}));r&&n.attrs.push(new i.Attribute(o,r.value,r.sourceSpan,r.keySpan,r.valueSpan,void 0,void 0))}t.register("wm-media-list",(function(){return{template:function(e){var t,n=e.attrs.find((function(e){return"dataset"===e.name})),o=function(e){void 0===e&&(e=[]),e.forEach((function(e){e.name&&"wm-list"!==e.name&&(e.attrs.forEach((function(e){e.value.startsWith("bind:"+t+".data[$i]")?e.value=e.value.replace(t+".data[$i]","item"):e.value.startsWith("bind:"+t)&&(e.value=e.value.replace(t,"item"))})),o(e.children))}))};n&&n.value.startsWith("bind:")&&(t=n.value.replace("bind:","")),t&&o(e.children);var r=e.children.find((function(e){return e instanceof i.Element&&"wm-media-template"===e.name}));null!=r&&(Ct(r,"width",e,"thumbnailwidth"),Ct(r,"height",e,"thumbnailheight"))},pre:function(e){return"<div wmMediaList "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var At=Object.freeze({__proto__:null,default:function(){}});t.register("wm-media-template",(function(){return{pre:function(){return'<ng-template #mediaListTemplate let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var It=Object.freeze({__proto__:null,default:function(){}});t.register("wm-list",(function(){return{requires:["wm-form","wm-liveform"],template:function(e){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(i){var r=t.getBoundToExpr(i.value);r&&n.updateTemplateAttrs(e,r,o.value,"itemRef.")}},pre:function(e,n,i,o){var r=i||o;return n.set("form_reference",r&&r.get("form_reference")),"<div wmList wmLiveActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("parent_form_reference",t.get("form_reference")),n}}})),t.register("wm-listtemplate",(function(){return{pre:function(){return'<ng-template #listTemplate let-item="item" let-$index="$index" let-itemRef="itemRef" let-$first="$first" let-$last="$last" let-currentItemWidgets="currentItemWidgets" >'},post:function(){return"</ng-template>"}}})),t.register("wm-list-action-template",(function(){return{template:function(e){e.attrs.find((function(e){return"position"===e.name})).value;e.children.filter((function(e){return e instanceof i.Element&&"wm-button"===e.name})).forEach((function(t){var n,o,r,a;n="position",o=t,r="swipe-position",(a=e.attrs.find((function(e){return e.name===n})))&&o.attrs.push(new i.Attribute(r,a.value,a.sourceSpan,a.keySpan,a.valueSpan,void 0,void 0))}))},pre:function(e,n){return"left"===e.get("position")?'<ng-template #listLeftActionTemplate>\n <li class="app-list-item-action-panel app-list-item-left-action-panel actionMenu" '+t.getAttrMarkup(e)+">":"right"===e.get("position")?'<ng-template #listRightActionTemplate>\n <li class="app-list-item-action-panel app-list-item-right-action-panel actionMenu" '+t.getAttrMarkup(e)+">":void 0},post:function(){return"</li></ng-template>"}}}));var Dt=Object.freeze({__proto__:null,default:function(){}}),Nt=new n.IDGenerator("liveform_dialog_id_");t.register("wm-livetable",(function(){return{pre:function(e,n){var i=Nt.nextUid();return n.set("counter",i),"<div wmLiveTable "+t.getAttrMarkup(e)+' dialogid="'+i+'">'},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("liveform_dialog_id",t.get("counter")),n}}}));var xt=Object.freeze({__proto__:null,default:function(){}}),Mt=new n.IDGenerator("wm_message");t.register("wm-message",(function(){return{pre:function(e){return'<p wmMessage tabindex="0" #'+Mt.nextUid()+'="wmMessage" '+t.getAttrMarkup(e)+">"},post:function(){return"</p>"}}}));var kt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-breadcrumb",(function(){return{pre:function(e){return"<ol wmBreadcrumb "+t.getAttrMarkup(e)+">"},post:function(){return"</ol>"}}}));var Lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-menu",(function(){return{pre:function(e){return"<div wmMenu dropdown "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav-item",(function(){return{pre:function(e){return'<li wmNavItem role="listitem" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var jt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav",(function(){return{pre:function(e){return'<ul wmNav data-element-type="wmNav" data-role="page-header" role="list" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var Bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-navbar",(function(){return{pre:function(e){return'<nav wmNavbar data-element-type="wmNavbar" role="navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var Gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-popover",(function(){return{requires:["wm-table"],pre:function(e,n,i){var o;if("inline"!==e.get("contentsource")){var r=e.get("content"),a=e.get("content.bind"),s="";r?s='content="'+r+'"':a&&(s='content.bind="'+a+'"'),o="<div wmContainer #partial partialContainer "+s+">",n.set("hasPopoverContent",!0)}var l="<wm-popover wmPopover "+t.getAttrMarkup(e)+">";return l+="<ng-template "+(i?'let-row="row"':"")+'><button class="popover-start"></button>',o&&(l+=""+(o||"")),l},post:function(e,t){var n="";return t.get("hasPopoverContent")&&(n+="</div>"),n+'<button class="popover-end"></button></ng-template></'+"wm-popover>"}}}));var Vt=Object.freeze({__proto__:null,default:function(){}}),$t=function(e,t){return e&&e.children.find((function(e){return e instanceof i.Element&&e.name===t}))},Ut=$t,Wt=function(e){return new i.Element(e,[],[],Qt,Qt,Qt)},qt=Wt,zt=function(e,t,n){var o=new i.Attribute(t,n,Qt,Qt,Qt,void 0,void 0);e.attrs.push(o)},Ht=zt,Yt=function(e,t){var n;if(t)return _.forEach(t.children,(function(t){return t instanceof i.Element&&(t.name===e?n=t:t.children&&(n=Yt(e,t))),!n})),n},Kt=Yt,Qt={},Xt=new n.IDGenerator("wm_page");t.register("wm-page",(function(){return{template:function(e){var t=$t($t(e,"wm-content"),"wm-page-content");if(t||(t=Yt("wm-page-content",Yt("wm-content",e))),t){var o=Wt("ng-container");if(zt(o,"*ngIf","compilePageContent"),o.children=o.children.concat(t.children),o.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),t.children=[o],n.isMobileApp()){var r=Wt("div");zt(r,"wmPageContentLoader",""),zt(r,"*ngIf","!showPageContent"),t.children.push(r)}}},pre:function(e){var n=Xt.nextUid();return"<div wmPage #"+n+'="wmPage" data-role="pageContainer" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Jt=Object.freeze({__proto__:null,default:function(){},"\u02750":Ut,"\u02751":qt,"\u02752":Ht,"\u02753":Kt}),Zt=new n.IDGenerator("wm_layout");t.register("wm-layout",(function(){return{pre:function(e){var n=Zt.nextUid();return"<div wmLayout #"+n+'="wmLayout" data-role="pageContainer" [attr.aria-label]="'+n+".hint || 'Main page content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var en=Object.freeze({__proto__:null,default:function(){}}),tn="router-outlet";t.register("wm-router-outlet",(function(){return{pre:function(e){return'<div wmRouterOutlet name="wmRouterOutlet" '+t.getAttrMarkup(e)+"><"+tn+' (activate)="onActivate($event)">'},post:function(){return"</router-outlet></div>"}}}));var nn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagination",(function(){return{pre:function(e){return'<nav wmPagination data-identifier="pagination" aria-label="Page navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var on=Object.freeze({__proto__:null,default:function(){}});t.register("wm-content",(function(){return{pre:function(e){return'<main wmContent data-role="page-content" role="main" '+t.getAttrMarkup(e)+">"},post:function(){return"</main>"}}}));var rn=Object.freeze({__proto__:null,default:function(){}}),an=new n.IDGenerator("wm_footer");t.register("wm-footer",(function(){return{pre:function(e){var n=an.nextUid();return"<footer wmFooter #"+n+'="wmFooter" partialContainer data-role="page-footer" role="contentinfo" [attr.aria-label]="'+n+".hint || 'Page footer'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</footer>"}}}));var sn=Object.freeze({__proto__:null,default:function(){}}),ln=new n.IDGenerator("wm_header");t.register("wm-header",(function(){return{pre:function(e){var n=ln.nextUid();return"<header wmHeader #"+n+'="wmHeader" partialContainer data-role="page-header" role="banner" [attr.aria-label]="'+n+".hint || 'Page header'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var cn=Object.freeze({__proto__:null,default:function(){}}),pn=new n.IDGenerator("wm_left_panel");t.register("wm-left-panel",(function(){return{pre:function(e){var n=pn.nextUid();return"<aside wmLeftPanel #"+n+'="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="'+n+".hint || 'Left navigation panel'\" wmSmoothscroll=\""+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var un=Object.freeze({__proto__:null,default:function(){}});t.register("wm-mobile-navbar",(function(){return{pre:function(e){return"<header wmMobileNavbar "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var dn=Object.freeze({__proto__:null,default:function(){}}),hn=new n.IDGenerator("wm_right_panel");t.register("wm-right-panel",(function(){return{pre:function(e){var n=hn.nextUid();return"<aside wmRightPanel #"+n+'="wmRightPanel" partialContainer data-role="page-right-panel" role="complementary" [attr.aria-label]="'+n+".hint || 'Right navigation panel'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var mn=Object.freeze({__proto__:null,default:function(){}});Object.create;function fn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var gn=function(e){return new i.Element(e,[],[],wn,wn,wn)},vn=gn,yn=function(e,t,n){var o=new i.Attribute(t,n,wn,wn,wn,void 0,void 0);e.attrs.push(o)},bn=yn,wn={};t.register("wm-page-content",(function(){return{template:function(e){var t,n;try{for(var o=fn(e.attrs),r=o.next();!r.done;r=o.next()){var a=r.value;if("spa"===a.name&&"true"===a.value){var s=gn("ng-container");yn(s,"*ngIf","compilePageContent"),s.children=s.children.concat(e.children),s.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),e.children=[s];break}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},pre:function(e){return"<div wmPageContent "+(e.get("spa")?"wmSpaPage":"")+' wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Pn=Object.freeze({__proto__:null,default:function(){},"\u02750":vn,"\u02751":bn});t.register("wm-mobile-tabbar",(function(){return{pre:function(e){return"<div wmMobileTabbar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _n=Object.freeze({__proto__:null,default:function(){}}),On=new n.IDGenerator("wm_top_nav");t.register("wm-top-nav",(function(){return{pre:function(e){var n=On.nextUid();return"<section wmTopNav #"+n+'="wmTopNav" partialContainer data-role="page-topnav" role="navigation" [attr.aria-label]="'+n+".hint || 'Second level navigation'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var Sn=Object.freeze({__proto__:null,default:function(){}}),En={},Tn=function(e){return new i.Element(e,[],[],En,En,En)},Rn=Tn,Cn=function(e,t,n){var o=new i.Attribute(t,n,En,En,En,void 0,void 0);e.attrs.push(o)},An=Cn;t.register("wm-partial",(function(){return{template:function(e){var t=Tn("ng-container");Cn(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return'<section wmPartial data-role="partial" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var In=Object.freeze({__proto__:null,default:function(){},"\u02750":Rn,"\u02751":An});t.register("wm-param",(function(){return{pre:function(e){return"<div wmParam hidden "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-prefab",(function(){return{pre:function(e){return'<section wmPrefab redrawable data-role="perfab" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var Nn=Object.freeze({__proto__:null,default:function(){}}),xn={},Mn=function(e){return new i.Element(e,[],[],xn,xn,xn)},kn=Mn,Ln=function(e,t,n){var o=new i.Attribute(t,n,xn,xn,xn,void 0,void 0);e.attrs.push(o)},Fn=Ln;t.register("wm-prefab-container",(function(){return{template:function(e){var t=Mn("ng-container");Ln(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return"<div wmPrefabContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var jn=Object.freeze({__proto__:null,default:function(){},"\u02750":kn,"\u02751":Fn});t.register("wm-table-action",(function(){return{pre:function(e){return'<div name="'+(e.get("name")||e.get("key"))+'" wmTableAction '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Bn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-table-column-group",(function(){return{pre:function(e){return"<div wmTableColumnGroup "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Gn=Object.freeze({__proto__:null,default:function(){}}),Vn=new n.IDGenerator("data_table_form_"),$n=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker"]),Un=function(e){void 0===e&&(e=[]);e.forEach((function(e){if($n.has(e.name)){if("wm-checkbox"===e.name&&e.attrs.filter((function(e){return"formControlName"===e.name})).length)return;e.attrs.push(new i.Attribute("[ngModelOptions]","{standalone: true}",1,1,1,void 0,void 0))}Un(e.children)}))},Wn=Un,qn=function(e,i){var o,r,a=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING),s=e.get("binding"),l=e.get("type")||"string",c=e.get("filterdataset.bind");if("autocomplete"===e.get("filterwidget")){if(c)o='dataset.bind="'+c+'" datasource.bind="'+t.getDataSource(c)+'"';r="submit.event=\"changeFn('"+s+"')\""}var p='#filterWidget formControlName="'+s+'_filter" '+o+" "+r+" change.event=\"changeFn('"+s+"')\"\n disabled.bind=\"isDisabled('"+s+"')\"";return'<ng-template #filterTmpl let-changeFn="changeFn" let-isDisabled="isDisabled">\n <div class="input-group '+a+'" data-col-identifier="'+s+'">\n '+(""+n.getFormWidgetTemplate(a,p,e,{inputType:"filterinputtype"}))+'\n <span class="input-group-addon filter-clear-icon" *ngIf="'+i+".showClearIcon('"+s+'\')">\n <button class="btn-transparent btn app-button" aria-label="Clear button" type="button" (click)="'+i+".clearRowFilter('"+s+'\')">\n <i class="app-icon wi wi-clear" aria-hidden="true"></i>\n </button>\n </span>\n <span class="input-group-addon" dropdown container="body" (onShown)="'+i+".adjustContainer('"+s+'\');">\n <button class="btn-transparent btn app-button" type="button" dropdownToggle><i class="app-icon wi wi-filter-list"></i></button>\n <ul class="matchmode-dropdown dropdown-menu" *dropdownMenu>\n <li *ngFor="let matchMode of '+i+".matchModeTypesMap['"+l+'\']"\n [ngClass]="{active: matchMode === ('+i+".rowFilter['"+s+"'].matchMode || "+i+".matchModeTypesMap['"+l+'\'][0])}">\n <a href="javascript:void(0);" (click)="'+i+".onFilterConditionSelect('"+s+'\', matchMode)" [innerText]="'+i+'.matchModeMsgs[matchMode]"></a>\n </li>\n </ul>\n </span>\n </div></ng-template>'},zn=qn,Hn=function(e){var t="";return e.forEach((function(e,n){n.endsWith(".event")&&(t+=n+'="'+e+'" ')})),t},Yn=Hn,Kn=function(e){var n=new Map;return["disabled","disabled.bind"].forEach((function(t){e.get(t)&&(n.set(t,e.get(t)),e.delete(t))})),t.getAttrMarkup(n)},Qn=Kn,Xn=function(e,t,i,o){var r,a={},s=e.get("binding"),l=e.get("edit-widget-type")||((r={type:e.get("type"),"related-entity-name":e.get("related-entity-name"),"primary-key":e.get("primary-key")})["related-entity-name"]&&r["primary-key"]?n.FormWidgetType.SELECT:Ce[r.type]&&Ce[r.type][0]||n.FormWidgetType.TEXT),c="",p="",u="";l===n.FormWidgetType.UPLOAD?(a.uploadProps={formName:Vn.nextUid(),name:s},a.counter=o):(c=t?"#inlineWidgetNew":"#inlineWidget",p=t?'formControlName="'+s+'_new"':'formControlName="'+s+'"',u="wmFormWidget"),a.inputType="editinputtype";var d=t?"#inlineWidgetTmplNew":"#inlineWidgetTmpl",h=c+" "+u+' key="'+s+'" data-field-name="'+s+'" '+p+" "+(l===n.FormWidgetType.UPLOAD?"":Hn(e))+" "+Kn(e),m=t?"getPendingSpinnerStatusNew":"getPendingSpinnerStatus";return"<ng-template "+d+' let-row="row" let-getControl="getControl" let-getValidationMessage="getValidationMessage" let-'+m+'="'+m+'">\n <div data-col-identifier="'+s+'" >\n '+n.getFormWidgetTemplate(l,h,e,a)+"\n "+Zn(i)+'\n <div class="overlay" *ngIf="'+m+'()"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>\n <span class="sr-only" *ngIf="getValidationMessage()">{{getValidationMessage()}}</span>\n </div>\n </ng-template>'},Jn=Xn,Zn=function(e){var t="";switch(e){case"bottom":t='<span class="help-block text-danger" *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">{{getValidationMessage()}}</span>';break;case"hover":default:t='<span placement="top" container="body" tooltip="{{getValidationMessage()}}" class="text-danger wi wi-error"\n *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">\n </span>'}return t},ei=Zn,ti=function(e){var t="row.getProperty('"+e.get("binding")+"')",i=e.get("custompipeformat")||e.get("formatpattern"),o="";switch(!n.isDateTimeType(e.get("type"))||i&&"None"!==i||(e.set("formatpattern","toDate"),e.delete("datepattern"),i="toDate"),i){case"toDate":o="{{"+t+" | toDate: colDef.datepattern}}";break;case"toCurrency":e.get("currencypattern")&&(o="{{"+t+" | toCurrency: '"+e.get("currencypattern"),e.get("fractionsize")?o+="': "+e.get("fractionsize")+"}}":o+="'}}");break;case"numberToString":e.get("fractionsize")&&(o="{{"+t+" | numberToString: '"+e.get("fractionsize")+"'}}");break;case"stringToNumber":o="{{"+t+" | stringToNumber}}";break;case"timeFromNow":o="{{"+t+" | timeFromNow}}";break;case"prefix":e.get("prefix")&&(o="{{"+t+" | prefix: '"+e.get("prefix")+"'}}");break;case"suffix":e.get("suffix")&&(o="{{"+t+" | suffix: '"+e.get("suffix")+"'}}");break;default:n.checkIsCustomPipeExpression(i)&&(o="{{"+t+" | "+i+" : row}}")}return o},ni=ti;t.register("wm-table-column",(function(){return{requires:["wm-table"],template:function(e,t){if(e.children.length){if(1===e.children.length&&e.children[0]instanceof i.Text&&0===e.children[0].value.trim().length)return;t.set("customExpression",!0),Un(e.children)}},pre:function(e,i,o){var r="",a="",s="",l="";if(o){var c=o.get("table_reference");r="multicolumn"===o.get("filtermode")&&"false"!==e.get("searchable")?qn(e,c):"";var p=o.get("editmode"),u=p!==Re&&p!==Te&&"true"!==e.get("readonly");a=u?Xn(e,!1,o.get("errorstyle"),c):"",s=u&&p===Ee&&"false"!==o.get("shownewrow")?Xn(e,!0,e.get("errorstyle")):"",l=' [formGroup]="'+c+'.ngform" '}var d=e.get("formatpattern"),h='<ng-template #customExprTmpl let-row="row" let-colDef="colDef" let-editRow="editRow" let-deleteRow="deleteRow" let-addNewRow="addNewRow">',m="",f="";return i.get("customExpression")?(e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'">'):(d&&"None"!==d||n.isDateTimeType(e.get("type")))&&(f=ti(e))&&(i.set("customExpression",!0),e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'" title="'+f+'">'+f),"<div wmTableColumn "+t.getAttrMarkup(e)+" "+l+">\n "+r+"\n "+a+"\n "+s+"\n "+m},post:function(e,t){var n="";return t.get("customExpression")&&(n="</div></ng-template>"),n+"</div>"},imports:function(e){var t=e.get("edit-widget-type"),i=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING);return[n.getRequiredFormWidget(t),n.getRequiredFormWidget(i),"wm-table"]}}}));var ii=Object.freeze({__proto__:null,default:function(){},"\u02750":Wn,"\u02751":zn,"\u02752":Yn,"\u02753":Qn,"\u02754":Jn,"\u02755":ei,"\u02756":ni}),oi=function(e){var t="anchor"===e.get("widget-type")?"a":"button",i="anchor"===e.get("widget-type")?"wmAnchor":"wmButton",o=e.get("display-name")||e.get("title")||"Collapse/Expand";return'<ng-template #rowExpansionActionTmpl let-row="row">\n <'+t+" "+i+"\n "+n.getRowActionAttrs(e)+'\n class="'+e.get("class")+' row-expansion-button"\n iconclass="'+e.get("collapseicon")+'"\n type="button" aria-label="'+o+'"></'+t+">\n </ng-template>"},ri=oi;t.register("wm-table-row",(function(){return{pre:function(e){return"<div wmTableRow "+t.getAttrMarkup(e)+">\n "+oi(e)+'\n <ng-template #rowExpansionTmpl let-row="row" let-rowDef="rowDef" let-containerLoad="containerLoad">\n <div wmContainer partialContainer content.bind="rowDef.content" load.event="containerLoad(widget)"\n [ngStyle]="{\'height\': rowDef.height, \'overflow-y\': \'auto\'}">\n <div *ngFor="let param of rowDef.partialParams | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>'},post:function(){return"</div></ng-template></div>"}}}));var ai=Object.freeze({__proto__:null,default:function(){},"\u02750":ri}),si=function(){return'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>'},li=si,ci=function(e){var t=e.get("action"),i=t?' click.event.delayed="'+t+'" ':"",o=t&&t.includes("editRow(")?'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>':"",r=t?t.includes("editRow(")?"edit edit-row-button":t.includes("deleteRow(")?"delete delete-row-button":"":"",a=e.get("tabindex")?'tabindex="'+e.get("tabindex")+'"':"",s="anchor"===e.get("widget-type")?"a":"button";return'<ng-template #rowActionTmpl let-row="row">\n <'+s+" "+("anchor"===e.get("widget-type")?"wmAnchor":"wmButton")+' data-action-key="'+e.get("key")+'"\n '+n.getRowActionAttrs(e)+'\n class="row-action row-action-button '+e.get("class")+" "+r+'"\n iconclass="'+e.get("iconclass")+'"\n '+i+"\n "+a+'\n type="button"></'+s+">\n "+o+"\n </ng-template>"},pi=ci;t.register("wm-table-row-action",(function(){return{pre:function(e){return"<div wmTableRowAction "+t.getAttrMarkup(e)+">\n "+ci(e)},post:function(){return"</div>"}}}));var ui=Object.freeze({__proto__:null,default:function(){},"\u02750":li,"\u02751":pi}),di=new n.IDGenerator("table_"),hi=0;function mi(e,t){var n=0;e.forEach((function(e){var o=e.name,r=void 0!==t?t:n;"wm-table-column"!==o&&"wm-table-column-group"!==o||(e.attrs.push(new i.Attribute("index",""+hi,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("headerIndex",""+r,1,1,1,void 0,void 0)),"wm-table-column-group"===o&&mi(e.children,n),hi++,n++)}))}t.register("wm-table",(function(){return{template:function(e,i){if(e.children.length){var o=e.children.some((function(e){return"wm-table-column"===e.name||"wm-table-column-group"===e.name}));mi(e.children),i.set("isdynamictable",o?"false":"true");var r=e.children.some((function(e){return"wm-table-row"===e.name}));i.set("isrowexpansionenabled",r?"true":"false")}else i.set("isdynamictable","true");var a=e.attrs.find((function(e){return"dataset"===e.name})),s=e.attrs.find((function(e){return"name"===e.name}));if(a){var l=t.getBoundToExpr(a.value);l&&n.updateTemplateAttrs(e,l,s.value,"","row")}},pre:function(e,n){var i=di.nextUid();return n.set("counter",i),e.set("isdynamictable",n.get("isdynamictable")),e.set("isrowexpansionenabled",n.get("isrowexpansionenabled")),e.set("table_reference",i),'<div wmTable="'+i+'" wmTableFilterSort wmTableCUD #'+i+' data-identifier="table" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("table_reference",t.get("counter")),n.set("filtermode",e.get("filtermode")),n.set("errorstyle",e.get("errorstyle")),n.set("editmode",e.get("editmode")),n.set("shownewrow",e.get("shownewrow")),n}}}));var fi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-video",(function(){return{pre:function(e){return"<div wmVideo "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var gi=Object.freeze({__proto__:null,default:function(){}}),vi="parentLinearLayout.spacing";t.register("wm-linearlayout",(function(){return{requires:["wm-linearlayout"],pre:function(e,n,i){var o=e.get("spacing");return e.set("spacing",o&&"0"!==o||!i?o:i.get(vi)),"<div wmLinearLayout "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set(vi,e.get("spacing")),n}}}));var yi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-linearlayoutitem",(function(){return{pre:function(e){return"<div wmLinearLayoutItem "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var bi=Object.freeze({__proto__:null,default:function(){}});e.accordionBuild=z,e.accordionPaneBuild=Y,e.alertDlgBuild=ye,e.anchorBuild=h,e.audioBuild=m,e.barcodeScannerBuild=fe,e.breadcrumbBuild=Lt,e.buttonBuild=ut,e.buttonGroupBuild=ct,e.calendarBuild=rt,e.cameraBuild=ve,e.cardActionsBuild=G,e.cardBuild=j,e.cardContentBuild=B,e.cardFooterBuild=V,e.carouselBuild=s,e.carouselTemplateBuild=c,e.chartBuild=$,e.checkboxBuild=dt,e.checkboxSetBuild=ht,e.chipsBuild=at,e.colorPickerBuild=st,e.compositeBuild=mt,e.confirmDlgBuild=be,e.containerBuild=K,e.contentBuild=rn,e.currencyBuild=lt,e.dateBuild=Ot,e.dateTimeBuild=_t,e.dlgBuild=Pe,e.dlgFooterBuild=we,e.fileUploadBuild=Et,e.footerBuild=sn,e.formActionBuild=Ke,e.formBuild=ot,e.formFieldBuild=qe,e.headerBuild=cn,e.htmlBuild=g,e.iconBuild=v,e.iframeBuild=y,e.iframeDlgBuild=_e,e.initComponentsBuildTask=function(){},e.labelBuild=w,e.layoutBuild=en,e.leftPanelBuild=un,e.lgBuild=J,e.lgcolBuild=Q,e.lgrowBuild=X,e.linearLayoutBuild=yi,e.linearLayoutItemBuild=bi,e.listBuild=Dt,e.liveTableBuild=xt,e.loginBuild=p,e.loginDlgBuild=Oe,e.marqueeBuild=u,e.mediaListBuild=At,e.mediaListItemBuild=It,e.menuBuild=Ft,e.messageBuild=kt,e.mobileNavbarBuild=dn,e.navBuild=Bt,e.navItemBuild=jt,e.navbarBuild=Gt,e.numberBuild=ft,e.pageBuild=Jt,e.pageContentBuild=Pn,e.paginationBuild=on,e.panelBuild=ee,e.partialBuild=In,e.partialDlgBuild=Se,e.partialParamBuild=Dn,e.pictureBuild=O,e.popoverBuild=Vt,e.prefabBuild=Nn,e.prefabContainerBuild=jn,e.progressBarBuild=N,e.progressCircleBuild=x,e.radiosetBuild=gt,e.ratingBuild=Tt,e.repeatTemplateBuild=oe,e.rightPanelBuild=mn,e.routerOutletBuild=nn,e.rteBuild=k,e.searchBuild=L,e.segContentBuild=ne,e.segControlBuild=te,e.selectBuild=vt,e.sliderBuild=Rt,e.spinnerBuild=E,e.switchBuild=bt,e.tabBarBuild=_n,e.tabPaneBuild=ce,e.tableActionBuild=Bn,e.tableBuild=fi,e.tableColumnBuild=ii,e.tableColumnGroupBuild=Gn,e.tableRowActionBuild=ui,e.tableRowBuild=ai,e.tabsBuild=le,e.textAreaBuild=Pt,e.textBuild=wt,e.tileBuild=pe,e.timeBuild=St,e.topNavBuild=Sn,e.treeBuild=F,e.videoBuild=gi,e.wizardBuild=ue,e.wizardStepBuild=he,Object.keys(t).forEach((function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("angular-imask"),require("@wm/components/base"),require("@wm/core"),require("rxjs")):"function"==typeof define&&define.amd?define("@wm/components/input",["exports","@angular/core","@angular/common","@angular/forms","angular-imask","@wm/components/base","@wm/core","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input={}),e.ng.core,e.ng.common,e.ng.forms,e["angular-imask"],e.wm.components.base,e.wm.core,e.rxjs)}(this,(function(e,t,n,i,o,r,a,s){"use strict";
43
+ ***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function h(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function m(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}Object.create;function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function v(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var y=function(){},b=function(){},w=new t.InjectionToken("Context Provider Reference"),P=new Set([i.FormWidgetType.SELECT,i.FormWidgetType.CHECKBOXSET,i.FormWidgetType.RADIOSET,i.FormWidgetType.SWITCH,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.CHIPS,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.RATING]),O=function(e){var t,n,i,o,r,a,s,l,c,p="";for(e=e.replace(/\$\[data\[\$i\]/g,"$[__1"),i=0;i<e.length;i++)if(t=e[i],n=e[i+1],"$"===t&&"["===n){for(a=1,c=!1,s=!1,o=i+2;o<e.length;o++)if(" "!==(r=e[o])&&(c||(s='"'===e[o]||"'"===e[o],c=!0),"["===r?a++:"]"===r&&a--,!a)){l=e.substring(i+2,o),p+=s?"__1["+l+"]":l;break}i=o}else p+=t;return p},S=function(e,t){var n;return t?(t.replace(/\[(\w+)\]/g,".$1").split(".").forEach((function(t){n=n&&n[t]||(_.isNull(e)?e:e[t])})),n):e},E=function(e,t,n){var o,r=t.field,a=t.expression,s=t.bindExpression;return s?(o=s.replace("bind:",""),i.checkIsCustomPipeExpression(o)&&(o+=": __1"),o=O(o)):o=a||r,s||a?i.$parseExpr(o)(n,Object.assign({},e,{__1:e})):_.get(e,r)},T=function(e){return P.has(e)},R=function(e,t,n){return i.isValidWebURL(e)||(e||(e=n||"resources/images/imagelists/default-image.png"),e=t?i.encodeUrl(e):e,i.stringStartsWith(e,"services/prefabs")),e},C=function(e){return""===e||"none"===e?e:"url("+R(e)+")"};function A(e,n,i){return{provide:n,useExisting:t.forwardRef((function(){return e})),multi:i}}function I(e){return A(e,y)}var D,N=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join("_")},x={number:["number","integer","big_integer","short","float","big_decimal","double","long","byte"],string:["string","text"],character:["character"],date:["date","time","timestamp","datetime"]},M={number:["exact","notequals","lessthan","lessthanequal","greaterthan","greaterthanequal","null","isnotnull"],string:["anywhereignorecase","anywhere","startignorecase","start","endignorecase","end","exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],character:["exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],date:["exact","lessthan","lessthanequal","greaterthan","greaterthanequal","null","notequals","isnotnull"]},k={boolean:["exact","null","isnotnull"],clob:[],blob:[]},L=function(e){var t=[];return _.isArray(e)?(e.forEach((function(e){t=t.concat(L(e))})),t):_.isObject(e)?(_.forEach(e,(function(e,n){e&&(t=t.concat(n.split(" ")))})),t):void 0},F=function(e,t){var n,i,o=e.toAdd||e,r=e.toRemove||t;return _.isObject(e)?(n=_.isArray(o)?o:L(o||[]),i=r?_.isArray(r)?r:L(r):[]):(n=o?[o]:[],i=r?[r]:[]),{toAdd:n,toRemove:i}},j=function(e,t,n,o){var r,a,s,l,c,p;o||(o={}),_.forEach(e,(function(e,u){_.includes(u,".")&&(l=_.split(u,"."),a=l[0],s=l[1],p=!0),o.noModifyTitle?r=u:_.isString(u)?(r=i.prettifyLabel(u),r=i.deHyphenate(r),r=n?i.initCaps(n)+" "+r:r):r=u,u=n?n+"."+u:u,c=p?(c=_.split(r," ")).length>1?c[c.length-2]+" "+c[c.length-1]:c[0]:r;var d=o.setBindingField?{displayName:c,field:u,relatedTable:a,relatedField:s||r}:{displayName:c,relatedTable:a,relatedField:s||r};if(!_.isObject(e)||_.isArray(e)&&!e[0]){if(o.upperBound&&o.columnCount===o.upperBound)return;t.terminals.push(d),o.columnCount+=1}else o.columnCount!==o.upperBound&&t.objects.push(d),_.isArray(e)&&e[0]?j(e[0],t,u+"[0]",o):j(e,t,u,o)}))},B=function(e){var t;return _.isArray(e)?_.isObject(e[0])?(t=i.getClonedObject(e[0]),_.forEach(e,(function(e,n){if(n+1>=10)return!1;_.assignWith(t,e,(function(e,t){return null==e?t:e}))}))):t=e[0]:t=e,t};e.APPLY_STYLES_TYPE=void 0,(D=e.APPLY_STYLES_TYPE||(e.APPLY_STYLES_TYPE={}))[D.CONTAINER=0]="CONTAINER",D[D.SCROLLABLE_CONTAINER=1]="SCROLLABLE_CONTAINER",D[D.INNER_SHELL=2]="INNER_SHELL",D[D.SHELL=3]="SHELL";var G={backgroundattachment:"backgroundAttachment",backgroundcolor:"backgroundColor",backgroundgradient:"backgroundGradient",backgroundimage:"backgroundImage",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",backgroundsize:"backgroundSize",bordercolor:"borderColor",borderradius:"borderRadius",borderstyle:"borderStyle",borderwidth:"borderWidth",borderbottomwidth:"borderBottomWidth",borderleftwidth:"borderLeftWidth",borderrightwidth:"borderRightWidth",bordertopwidth:"borderTopWidth",color:"color",cursor:"cursor",display:"display",fontsize:"fontSize",fontfamily:"fontFamily",fontstyle:"fontStyle",fontunit:"fontunit",fontvariant:"fontVariant",fontweight:"fontWeight",height:"height",horizontalalign:"textAlign",lineheight:"lineHeight",margin:"margin",marginbottom:"marginBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",opacity:"opacity",overflow:"overflow",padding:"padding",paddingbottom:"paddingBottom",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",picturesource:"backgroundImage",textalign:"textAlign",textdecoration:"textDecoration",verticalalign:"verticalAlign",visibility:"visibility",whitespace:"whiteSpace",width:"width",wordbreak:"wordbreak",zindex:"zIndex"},V=function(e){return!!G[e]},U={height:!0,overflow:!0,padding:!0,paddingbottom:!0,paddingleft:!0,paddingright:!0,paddingtop:!0},W={textalign:!0},q={textalign:!0,width:!0};function z(t,n,o,r){var a=Object.create(null);r&&r.forEach((function(e){return a[e]=!0})),n.registerStyleChangeListener((function(r,s){if(!(a[r]||o===e.APPLY_STYLES_TYPE.SHELL&&U[r])){if(o===e.APPLY_STYLES_TYPE.INNER_SHELL){if(!U[r])return;"height"===r&&i.setCSS(t,"overflow",s?"auto":"")}if(o!==e.APPLY_STYLES_TYPE.CONTAINER||!W[r]){if(o===e.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER){if(q[r])return;"height"===r&&i.setCSS(t,"overflow",s?"auto":"")}"fontsize"===r||"fontunit"===r?i.setCSS(t,"fontSize",""===n.fontsize?"":n.fontsize+(n.fontunit||"px")):"backgroundimage"===r?i.setCSS(t,"backgroundImage",n.picturesource||C(s)):G[r]&&i.setCSS(t,G[r],s)}}}))}var H,Y="wm-form-field-",K=function(){var e=new Map;for(var t in i.FormWidgetType)e.set(Y+i.FormWidgetType[t],new Map);return e}(),Q=function(e){return K.get(e)},X=function(e,t){K.set(e,t),window.WM_LOADED_COMPONENTS=v(v([],g(window.WM_LOADED_COMPONENTS||[])),[e])};e.PROP_TYPE=void 0,(H=e.PROP_TYPE||(e.PROP_TYPE={}))[H.BOOLEAN=1]="BOOLEAN",H[H.NUMBER=2]="NUMBER",H[H.STRING=3]="STRING";var J={type:e.PROP_TYPE.STRING},Z={type:e.PROP_TYPE.NUMBER},ee={type:e.PROP_TYPE.BOOLEAN},te={arrayType:!0},ne=function(){X("wm-container",new Map([["animation",J],["class",J],["conditionalclass",te],["conditionalstyle",te],["content",J],["name",J],["show",Object.assign({value:!0},ee)]]))},ie=new Map,oe=new i.IDGenerator("widget-id"),re=new Map([["tap","click"]]),ae={BLOCK:"block",INLINE_BLOCK:"inline-block",INLINE:"inline"},se=new Set(["readonly","autofocus","disabled","startchecked","multiple","selected","required","controls","autoplay","loop","muted","show"]),le=function(e){return se.has(e)},ce=new Set(["width","height","iconheight","iconwidth","popoverwidth","popoverheight","imagewidth","imageheight"]),pe=function(e){return ce.has(e)},ue=function(t,n,o){return o===e.PROP_TYPE.BOOLEAN?i.toBoolean(n,le(t)&&t):o===e.PROP_TYPE.NUMBER?+n:n},de=function(e,t,n){var o=e.widgetId,r=e[t];i.isChangeFromWatch()||i.$unwatch(N(o,t)),i.resetChangeFromWatch();var a=Q(e.getWidgetSubType()).get(t);if(a){var s=a.type;s&&(n=ue(t,n,s))}if(n!==r||i.isObject(n)||i.isObject(r)){if(pe(t))n=i.toDimension(n);else if(_.startsWith(n,"resources/")){var l=e;void 0===l._parentPrefab_&&(l._parentPrefab_=e.$element.parent().closest('[prefabname][prefabname!="__self__"]').attr("prefabname")||""),l._parentPrefab_?n="./app/prefabs/"+l._parentPrefab_+"/"+n:a&&n!=a.value&&(n="./"+n)}e[t]=n,V(t)?e.notifyStyleChange(t,n,r):("conditionalclass"===t&&(n=F(n,r)),a&&e.notifyPropertyChange(t,n,r)),i.$appDigest()}},he={set:function(e,t,n){return de(e,t,n),!0},get:function(e,t){var n=e[t];return _.isFunction(n)?n.bind(e):n}},me=window.requestAnimationFrame,fe=[],ge=function(e){fe.length||me((function(){fe.forEach((function(e){return e()})),fe.length=0})),fe.push(e)},ve=function(){function e(){}return e.create=function(e,t,n){if(window.Proxy)return new Proxy(e,he);var i=Object.create(e);return ge((function(){for(var t in e)_.isFunction(e[t])&&"constructor"!==t&&"super"!==t&&!_.startsWith(t,"ng")&&(e[t]=e[t].bind(e))})),Object.keys(G).forEach((function(t){Object.defineProperty(i,t,{get:function(){return e[t]},set:function(n){return de(e,t,n)}})})),n&&n.forEach((function(t,n){Object.defineProperty(i,n,{get:function(){return e[n]},set:function(t){return de(e,n,t)}})})),i},e}(),ye=function(e,t,n){t&&t.length&&i.removeClass(n,_.join(t," ")),e&&e.length&&i.addClass(n,_.join(e," "))},be=function(e,t,n){t&&_.isObject(t)&&Object.keys(t||{}).forEach((function(e){i.setCSS(n,e,"")}));e&&_.isObject(e)&&i.setCSSFromObj(n,e)},we=function(){function e(e,n,o){var r=this;this.inj=e,this.isAttached=!1,this.styleChange=new s.ReplaySubject,this.propertyChange=new s.Subject,this.readyState=new s.Subject,this.destroy=new s.Subject,this.eventHandlers=new Map,this.toBeSetupEventsQueue=[],this.__cloneable__=!1,this.$attrs=new Map,this.isMuted=!1;var l=e.get(t.ElementRef);this.nativeElement=l.nativeElement,this.widgetType=n.widgetType,this.widgetSubType=n.widgetSubType||n.widgetType,this.viewParent=e.view.component,this.displayType=n.displayType||ae.BLOCK,this.context=e.view.context,this.widget=this.createProxy(),this.eventManager=e.get(a.EventManager),this.nativeElement.widget=this.widget,this.appLocale=e.get(i.App).appLocale||{},this.initContext(),n.hostClass&&i.addClass(this.nativeElement,n.hostClass),this.widgetId=this.generateWidgetId(),i.setAttr(this.nativeElement,"widget-id",this.widgetId,!0),this.registerStyleChangeListener(this.onStyleChange,this),this.registerPropertyChangeListener(this.onPropertyChange,this),o?(this.delayedInit=!0,o.then((function(){r.initWidget(),r.setInitProps()}))):this.initWidget()}return Object.defineProperty(e.prototype,"$element",{get:function(){return $(this.nativeElement)},enumerable:!1,configurable:!0}),e.prototype.getNativeElement=function(){return this.nativeElement},e.prototype.getWidgetType=function(){return this.widgetType},e.prototype.getWidgetSubType=function(){return this.widgetSubType},e.prototype.getWidget=function(){return this.widget},e.prototype.setProperty=function(e,t){this.widget[e]=t},e.prototype.getViewParent=function(){return this.viewParent},e.prototype.notifyStyleChange=function(e,t,n){this.styleChange.next({key:e,nv:t,ov:n})},e.prototype.notifyPropertyChange=function(e,t,n){this.propertyChange.next({key:e,nv:t,ov:n})},e.prototype.registerStyleChangeListener=function(e,t){t&&(e=e.bind(t)),this.styleChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerReadyStateListener=function(e,t){t&&(e=e.bind(t)),this.readyState.isStopped?e():this.readyState.subscribe((function(){return e()}))},e.prototype.registerPropertyChangeListener=function(e,t){t&&(e=e.bind(t)),this.propertyChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerDestroyListener=function(e,t){t&&(e=e.bind(t)),this.destroy.subscribe((function(){}),(function(){}),(function(){return e()}))},e.prototype.getDisplayType=function(){return this.displayType},e.prototype.createProxy=function(){return ve.create(this,this.widgetSubType,Q(this.widgetSubType))},e.prototype.initContext=function(){var e=this.inj.view.context,t=this.inj.get(w,{});if(this.viewParent!==e?this.context=e:this.context={},t){var n={};_.isArray(t)?_.forEach(t,(function(e){Object.assign(n,e)})):n=t,this.context=Object.assign({},n,this.context)}},e.prototype.setWidgetProperty=function(e,t){this.widget[e]=t},e.prototype.getAttr=function(e){return this.$attrs.get(e)},e.prototype.getAppInstance=function(){return this.inj.get(i.App)},e.prototype.generateWidgetId=function(){return oe.nextUid()},e.prototype.onPropertyChange=function(e,t,n){if("show"===e)this.nativeElement.hidden=!t;else if("hint"===e)i.isMobileApp()||i.setAttr(this.nativeElement,"title",t);else if("class"===e){i.switchClass(this.nativeElement,t,n);var o=t.match(/(\W|^)(h([0-6]))(?=\s|$)/);o&&(i.setAttr(this.nativeElement,"role","heading"),i.setAttr(this.nativeElement,"aria-level",o[3]))}else if("name"===e||"tabindex"===e)i.setAttr(this.nativeElement,e,t),"name"===e&&t&&function(e,t,n,o){i.isDefined(e.Widgets)&&(o&&(e.Widgets[o]=void 0),n&&(e.Widgets[n]=t))}(this.viewParent,this.widget,t,n);else if("conditionalclass"===e)ye(t.toAdd,t.toRemove,this.nativeElement);else if("autoplay"===e){var r="wm-audio"===this.widgetType?"audio":"video";this.nativeElement.querySelector(r).load()}else"conditionalstyle"===e?be(t,n,this.nativeElement):"animation"===e?i.addClass(this.nativeElement,"animated "+t):"disabled"===e&&(!0===t?i.setAttr(this.nativeElement,"disabled","true",!0):i.removeAttr(this.nativeElement,"disabled",!0))},e.prototype.onStyleChange=function(e,t,n){},e.prototype.registerWidget=function(e){var t,n,o,r,a;this.registerDestroyListener((t=this.widget,n=this.viewParent,o=this.widgetId,r=e,a=!1,ie.set(o,t),r&&i.isDefined(n.Widgets)&&(a=!0,n.Widgets[r]=t),function(){ie.delete(o),a&&(n.Widgets[r]=void 0)}))},e.prototype.getMappedEventName=function(e){return re.get(e)||e},e.prototype.handleEvent=function(e,t,n,i,o){this.eventManager.addEventListener(e,t,(function(e){if(i.$event=e,"delayed"!==o)return n();setTimeout((function(){return n()}),150)}))},e.prototype.processEventAttr=function(e,t,n){var o=this,r=i.$parseEvent(t),a=this.context;a.widget=this.widget;var s=r.bind(void 0,this.viewParent,a),l=function(){var t;i.$invokeWatchers(!0);try{if(a.$event=a.$event||new window.CustomEvent(e),!((t=s())instanceof Promise))return t;t.then((function(e){return e}),(function(e){return e}))}catch(e){console.error(e)}};this.eventHandlers.set(this.getMappedEventName(e),{callback:l,locals:a}),this[_.camelCase("on-"+e)]=l,this.toBeSetupEventsQueue.push((function(){o.handleEvent(o.nativeElement,o.getMappedEventName(e),l,a,n)}))},e.prototype.processBindAttr=function(e,t){var n=this;this.initState.delete(e),this.registerDestroyListener(i.$watch(t,this.viewParent,this.context,(function(t){return n.widget[e]=t}),N(this.widgetId,e),"datasource"===e,this.widgetProps.get(e),(function(){return n.isMuted})))},e.prototype.removePropertyBinding=function(e){i.$unwatch(N(this.widgetId,e))},e.prototype.invokeEventCallback=function(e,t){var n=this.eventHandlers.get(e);if(n){var i=n.callback,o=n.locals||{};if(i)return i(Object.assign(o,t))}},e.prototype.processAttr=function(e,t){var n=e.split("."),o=n[0],r=n[1],a=n[2],s=n.length;"bind"===r?("show"===o&&(this.nativeElement.hidden=!0),this.processBindAttr(o,t)):"event"===r?this.processEventAttr(o,t,a):1===s&&("class"===e?i.removeClass(this.nativeElement,t):"tabindex"!==e&&"name"!==e||i.removeAttr(this.nativeElement,e),this.initState.set(o,t))},e.prototype.processAttrs=function(){var e,t,n=this.inj.elDef;try{for(var i=f(n.element.attrs),o=i.next();!o.done;o=i.next()){var r=g(o.value,3),a=r[1],s=r[2];this.$attrs.set(a,s),this.processAttr(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.initWidget=function(){var e=this;this.initState=new Map;var t=Q(this.widgetSubType);t.forEach((function(t,n){i.isDefined(t.value)&&e.initState.set(n,t.value)})),this.widgetProps=t,this.processAttrs(),this.registerWidget(this.initState.get("name"))},e.prototype.setInitProps=function(){var e=this;this.initState.get("name")&&(this.widget.name=this.initState.get("name")),this.initState.forEach((function(t,n){(e.widgetProps.get(n)||V(n))&&"name"!==n&&(e.widget[n]=t)})),this.initState.clear(),this.initState=void 0,this.readyState.next(),this.readyState.complete()},e.prototype.hasEventCallback=function(e){return this.eventHandlers.has(e)},e.prototype.focus=function(){var e=this.$element[0].querySelector("[focus-target]");e||(e=this.$element[0]),e.focus()},e.prototype.execute=function(e,t){},e.prototype.mute=function(){this.isMuted=!0},e.prototype.unmute=function(){this.isMuted=!1},e.prototype.ngOnAttach=function(){this.isAttached=!0},e.prototype.ngOnDetach=function(){this.isAttached=!1},e.prototype.ngOnInit=function(){this.delayedInit||this.setInitProps()},e.prototype.ngAfterViewInit=function(){var e,t;if(this.toBeSetupEventsQueue.length)try{for(var n=f(this.toBeSetupEventsQueue),i=n.next();!i.done;i=n.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.toBeSetupEventsQueue.length=0,this.isAttached=!0},e.prototype.ngAfterContentInit=function(){},e.prototype.ngOnDestroy=function(){this.isDestroyed=!0,this.widget=Object.create(null),this.styleChange.complete(),this.propertyChange.complete(),this.destroy.complete(),this.isAttached=!1},e}();we.decorators=[{type:t.Injectable}],we.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(we);Pe.decorators=[{type:t.Injectable}];var _e=function(e){this.redraw=function(){var t=e.$element.closest("[wmtabpane]"),n=e.$element.closest("[wmaccordionpane]").find(".panel-heading");if(!(t.length&&!t.hasClass("active")||n.length&&!n.hasClass("active")))return e.redraw&&e.redraw()}};_e.decorators=[{type:t.Directive,args:[{selector:"[redrawable]"}]}],_e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.updateRedrawableComponents=function(e){var t=this;_.pickBy(e,(function(e){e&&e.nativeElement&&e.nativeElement.hasAttribute("redrawable")&&!_.includes(t.reDrawableComponents._results,e)&&t.reDrawableComponents._results.push(e),e&&e.Widgets&&t.updateRedrawableComponents(e.Widgets)}))},t.prototype.redrawChildren=function(){var e=this;this.content&&this.Widgets&&this.updateRedrawableComponents(this.Widgets),setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}))}),100)},t.prototype.onPropertyChange=function(t,n,i){e.prototype.onPropertyChange.call(this,t,n,i),"show"===t&&n&&this.redrawChildren()},t}(Pe);Oe.decorators=[{type:t.Directive}],Oe.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[_e,{descendants:!0}]}]};var Se="app-container",Ee={widgetType:"wm-container",hostClass:Se},Te=function(t){function n(n){var o=t.call(this,n,Ee)||this;return i.addClass(o.nativeElement,Se),z(o.nativeElement,o,e.APPLY_STYLES_TYPE.CONTAINER),o}return d(n,t),n}(Oe);Te.initializeProps=ne(),Te.decorators=[{type:t.Directive,args:[{selector:"[wmContainer]",providers:[I(Te)]}]}],Te.ctorParameters=function(){return[{type:t.Injector}]};var Re=function(){function e(){}return e.prototype.transform=function(e,t,n){return i.transformFileURI(R(e,t,n))},e}();Re.decorators=[{type:t.Pipe,args:[{name:"image"}]}];var Ce=function(){X("wm-item-template",new Map([["content",J]]))},Ae={widgetType:"wm-item-template"},Ie=function(e){function t(t,n,i){var o=e.call(this,t,Ae)||this;return o.app=i,o.nativeElement=n.nativeElement,o.context=t.view.context,o}return d(t,e),Object.defineProperty(t.prototype,"$index",{get:function(){return this.context.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wmItemTemplate",{set:function(e){this.widget.content=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.partialParams.item=this.userComponentParams.dataObject},t}(Pe);Ie.initializeProps=Ce(),Ie.decorators=[{type:t.Directive,args:[{selector:"[wmItemTemplate]",exportAs:"itemTemplateRef",providers:[I(Ie)]}]}],Ie.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},Ie.propDecorators={userComponentParams:[{type:t.Input}],wmItemTemplate:[{type:t.Input}]};var De=function(){X("wm-repeat-template",new Map([["show",ee]]))},Ne={widgetType:"wm-repeat-template",hostClass:"app-repeat-item"},xe=function(e){function t(t){var n=e.call(this,t,Ne)||this;return z(n.nativeElement,n),n}return d(t,e),t}(Pe);xe.initializeProps=De(),xe.decorators=[{type:t.Directive,args:[{selector:"[wmRepeatTemplate]"}]}],xe.ctorParameters=function(){return[{type:t.Injector}]};var Me=function(){function e(e,t,n){this.templateRef=t,this.viewContainer=n,this.viewParent=e.view.component,this.context=e.view.context}return Object.defineProperty(e.prototype,"lazyLoad",{set:function(e){var t=this;this.unSubscribeFn=i.$watch(e,this.viewParent,this.context,(function(e){!t.embeddedView&&e&&(t.embeddedView=t.viewContainer.createEmbeddedView(t.templateRef,t.context),t.unSubscribeFn())}))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.unSubscribeFn()},e}();Me.decorators=[{type:t.Directive,args:[{selector:"[lazyLoad]"}]}],Me.ctorParameters=function(){return[{type:t.Injector},{type:t.TemplateRef},{type:t.ViewContainerRef}]},Me.propDecorators={lazyLoad:[{type:t.Input}]};var ke=function(){X("wm-message",new Map([["animation",J],["caption",Object.assign({value:"Message"},J)],["class",J],["hideclose",Object.assign({value:!1},ee)],["name",J],["show",Object.assign({value:!0},ee)],["type",Object.assign({value:"success"},J)]]))},Le={widgetType:"wm-message",hostClass:"alert app-message"},Fe=function(e){function t(t){var n=e.call(this,t,Le)||this;return n.messageClass="",n.messageIconClass="",n.type="",z(n.nativeElement,n),n}return d(t,e),t.prototype.showMessage=function(e,t){e&&(this.caption=e),t&&this.setWidgetProperty("type",t),this.setWidgetProperty("show",!0)},t.prototype.hideMessage=function(){this.setWidgetProperty("show",!1)},t.prototype.dismiss=function(e){this.hideMessage(),this.invokeEventCallback("close",{$event:e})},t.prototype.onMessageTypeChange=function(e){var t,n;switch(e){case"success":t="alert-success",n="wm-sl-l sl-check";break;case"error":t="alert-danger",n="wi wi-cancel";break;case"warn":case"warning":t="alert-warning",n="wm-sl-l sl-alarm-bell";break;case"info":t="alert-info",n="wi wi-info";break;case"loading":t="alert-info alert-loading",n="fa fa-spinner fa-spin"}i.switchClass(this.nativeElement,t,this.messageClass),this.messageClass=t,this.messageIconClass=n},t.prototype.onPropertyChange=function(t,n,i){"type"===t?this.onMessageTypeChange(n):e.prototype.onPropertyChange.call(this,t,n,i)},t}(Pe);Fe.initializeProps=ke(),Fe.decorators=[{type:t.Component,args:[{selector:"[wmMessage]",template:'<i aria-hidden="true" [title]="type + \'Alert\'" class="icon {{type}} {{messageIconClass}}"></i>\n<span [innerHtml]="caption"></span>\n<button title="Close" type="button" class="btn-transparent close" [hidden]="hideclose" (click)="dismiss($event)" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n</button>\n',providers:[I(Fe)],exportAs:"wmMessage"}]}],Fe.ctorParameters=function(){return[{type:t.Injector}]};var je=function(){X("wm-partial",new Map([["name",J]]))},Be={widgetType:"wm-partial",hostClass:"app-partial clearfix"},Ge=function(e){function t(t,n){var i=e.call(this,t,Be)||this;return i.viewport=n,i.registerDestroyListener(i.viewport.subscribe("resize",(function(e){return i.callback("resize",e)}))),i.registerDestroyListener(i.viewport.subscribe("orientationchange",(function(e){return i.callback("orientationchange",e)}))),i}return d(t,e),t.prototype.callback=function(e,t){t=_.assign({widget:this},t),this.invokeEventCallback(e,t)},t.prototype.ngOnAttach=function(){this.callback("attach")},t.prototype.ngOnDetach=function(){this.callback("detach")},t.prototype.ngOnDestroy=function(){this.callback("destroy")},t}(Pe);Ge.initializeProps=je(),Ge.decorators=[{type:t.Directive,args:[{selector:"[wmPartial]",providers:[I(Ge)]}]}],Ge.ctorParameters=function(){return[{type:t.Injector},{type:i.Viewport}]};var Ve=function(){function e(e){this.widgetRef=e,this.widgetRef.partialParams={},this.widgetRef.pageParams=this.widgetRef.partialParams,this.widgetRef.params$=new s.Subject}return e.prototype.registerParams=function(e,t,n,o){var r=this;this.widgetRef.partialParams[e]=t,!t&&n?this.widgetRef.registerDestroyListener(i.$watch(n,this.widgetRef.getViewParent(),_.get(this.widgetRef,"context"),(function(t){r.widgetRef.partialParams[e]=t,r.widgetRef.params$.next()}))):this.widgetRef.params$.next()},e}();Ve.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],Ve.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var $e=function(){function e(e,t,n){this.bindValue=e,this.type=t,this.partialParamsProvider=n}return e.prototype.ngOnInit=function(){this.partialParamsProvider.registerParams(this.name,this.value,this.bindValue,this.type)},e}();$e.decorators=[{type:t.Directive,args:[{selector:"[wmParam]"}]}],$e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Attribute,args:["value.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]},{type:Ve}]},$e.propDecorators={name:[{type:t.Input}],value:[{type:t.Input}]};var Ue=function(){function e(e,t,n,o,r,a,s,c){var p=this;this.componentInstance=e,this.vcRef=t,this.elRef=n,this.inj=o,this.app=r,this.resolver=s,this.partialRefProvider=c,this.contentInitialized=!1,this.renderPartial=_.debounce(this._renderPartial,200),e.registerPropertyChangeListener((function(t,n,o){"content"===t&&(e.$lazyLoad?e.$lazyLoad=function(){p.renderPartial(n),e.$lazyLoad=i.noop}:p.renderPartial(n))}));var u=e.params$.pipe(l.filter((function(){return p.contentInitialized})),l.debounceTime(200)).subscribe((function(){return p.renderPartial(e.content)}));e.registerDestroyListener((function(){return u.unsubscribe()}))}return Object.defineProperty(e.prototype,"name",{get:function(){return this.componentInstance.name},enumerable:!1,configurable:!0}),e.prototype._renderPartial=function(e){return h(this,void 0,void 0,(function(){var t,n,o,r,a=this;return m(this,(function(s){switch(s.label){case 0:return this.vcRef.clear(),i.$invokeWatchers(!0),(t=$(this.elRef.nativeElement).closest(".app-prefab")).length?n=t.attr("prefabname"):this.componentInstance.viewParent&&(n=this.componentInstance.viewParent.prefabName),[4,this.partialRefProvider.getComponentFactoryRef(e,i.ComponentType.PARTIAL,{prefab:n})];case 1:return(o=s.sent())&&((r=this.vcRef.createComponent(o,0,this.inj))&&r._component&&n&&(r._component.prefabName=n),this.$target||(this.$target=this.elRef.nativeElement.querySelector("[partial-container-target]")||this.elRef.nativeElement),this.$target.innerHTML="",this.$target.appendChild(r.location.nativeElement),this.contentInitialized=!0,setTimeout((function(){return a.onLoadSuccess()}),200)),[2]}}))}))},e.prototype.onLoadSuccess=function(){this.componentInstance.invokeEventCallback("load"),this.app.notify("partialLoaded")},e}();Ue.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],Ue.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:t.Injector},{type:i.App},{type:String,decorators:[{type:t.Attribute,args:["content"]}]},{type:t.ComponentFactoryResolver},{type:i.PartialRefProvider}]};var We=function(){function e(e,t,n,i,o){this.elRef=e,this.widget=t,this.viewContainerRef=n,this.templateRef=o,this.context=i.view.context,window.addEventListener("resize",this.onResize.bind(this))}return Object.defineProperty(e.prototype,"showInDevice",{set:function(e){this.devices=e.split(","),this.onResize()},enumerable:!1,configurable:!0}),e.prototype.onResize=function(e){this.devices.indexOf("lg")>-1&&window.matchMedia("(min-width: 1200px)").matches&&!i.isLargeTabletLandscape()||this.devices.indexOf("md")>-1&&(i.isLargeTabletLandscape()||window.matchMedia("(min-width: 992px) and (max-width: 1199px)").matches&&!i.isLargeTabletPortrait())||this.devices.indexOf("sm")>-1&&(window.matchMedia("(min-width: 768px) and (max-width: 991px)").matches||i.isLargeTabletPortrait())||this.devices.indexOf("xs")>-1&&window.matchMedia("(max-width: 767px)").matches||this.devices.indexOf("all")>-1?this.embeddedView||(this.embeddedView=this.viewContainerRef.createEmbeddedView(this.templateRef,this.context)):(this.viewContainerRef.clear(),this.embeddedView="")},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.onResize)},e}();We.decorators=[{type:t.Directive,args:[{selector:"[showInDevice]"}]}],We.ctorParameters=function(){return[{type:t.ElementRef},{type:we,decorators:[{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.Injector},{type:t.TemplateRef}]},We.propDecorators={showInDevice:[{type:t.Input}]};var qe=function(){function e(e,t,n){this._isEnabled=!1,this._lastScrollY=-1,this._waitRefreshTill=-1,this.pendingIscrolls=[],this._$el=$(t.nativeElement),this.app=n}return e.prototype.ngOnInit=function(){var e=this;this.cancelSubscription=this.app.subscribe("no-iscroll",(function(t){e.pendingIscrolls.push(t)}))},e.prototype.ngDoCheck=function(){this._isEnabled?this._smoothScrollInstance?this.refreshIScroll():this._smoothScrollInstance=this.applySmoothScroll():this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy()},e.prototype.ngOnDestroy=function(){this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy(),this.cancelSubscription&&this.cancelSubscription()},Object.defineProperty(e.prototype,"wmSmoothscroll",{set:function(e){this._isEnabled=!0===e||"true"===e,this._isEnabled?this._smoothScrollInstance||(this._smoothScrollInstance=this.applySmoothScroll()):this.ngOnDestroy()},enumerable:!1,configurable:!0}),e.prototype.applySmoothScroll=function(e,t){var n=this;if(!i.isMobileApp()||i.isKitkatDevice())return null;var o={scrollbars:!0,preventDefault:!1,momentum:!0,bounce:!1,mouseWheel:!0,disablePointer:!0,disableTouch:!1,disableMouse:!1},r=this._$el[0];if(!r.children.length)return null;this._$el.addClass("smoothscroll-wrapper"),r.onscroll=function(e){e.target.iscroll&&e.target.scrollTop&&(e.target.iscroll.scrollTo(e.target.iscroll.x,e.target.iscroll.y-e.target.scrollTop),e.target.scrollTop=0)},t&&"INPUT"===t.tagName&&t.focus(),e&&(o.fadeScrollbars=!0);var a=new IScroll(r,o);if(e){_.forEach(e,(function(e,t){_.forEach(e,(function(e){a.on(t,e)}))}));var s=this;a.on("scrollStart",(function(){this._scrolling=!0,i.isMobileApp()&&s.app.notify("iscroll-start",{})})),a.on("scrollEnd",(function(){this._scrolling=!1})),a.refresh()}return this.app.notify("iscroll-start",{}),a.indicatorRefresh=function(){var e,t=n._$el[0].iscroll.indicators;if(t.length)for(e=0;e<t.length;e++)t[e].refresh()},this._$el[0].iscroll=a,_.forEach(this.pendingIscrolls,(function(e,t){if(e.isSameNode(n._$el[0]))return n.app.notify("iscroll-update",{el:e}),void n.pendingIscrolls.splice(t,1)})),this.app.notify("iscroll-update",{}),{iScroll:a,destroy:function(){a.destroy(),$(a.scroller).css({"transition-timing-function":"","transition-duration":"",transform:""}),a=null,delete r.iscroll}}},e.prototype.refreshIScroll=function(){var e=this._smoothScrollInstance.iScroll;if(!(e._scrolling||this._waitRefreshTill>Date.now())){if(e.wrapper&&!_.includes(e.wrapper.children[0].classList,"smoothscroll-container")&&e.wrapper.scrollHeight>e.wrapper.clientHeight){var t=e._events,n=document.activeElement;$(e.wrapper.children).wrapAll('<div class="smoothscroll-container"></div>'),this._smoothScrollInstance.destroy(),this._smoothScrollInstance=this.applySmoothScroll(t,n)}this._lastScrollY!==this._$el[0].iscroll.maxScrollY?(ze(this._smoothScrollInstance.iScroll),this._lastScrollY=this._$el[0].iscroll.maxScrollY):this._smoothScrollInstance.iScroll.refresh(),this._waitRefreshTill=Date.now()+500}},e}();qe.decorators=[{type:t.Directive,args:[{selector:"[wmSmoothscroll]"}]}],qe.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},qe.propDecorators={wmSmoothscroll:[{type:t.Input}]};var ze=function(e){var t=!e&&$(".smoothscroll-container");e&&e.wrapper&&e.wrapper.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&$(document.activeElement).offset().top+document.activeElement.clientHeight>.9*window.innerHeight&&document.activeElement.scrollIntoView({behavior:"auto",block:"end",inline:"end"}),e?(e.indicatorRefresh&&e.indicatorRefresh(),e.refresh&&e.refresh()):t.length&&t.parent().each((function(e,t){t.iscroll.indicatorRefresh(),t.iscroll.refresh()}))},He=ze;window.addEventListener("resize",i.debounce(ze,200));var Ye=function(){function e(e){this.elRef=e}return Object.defineProperty(e.prototype,"textContent",{set:function(e){var t=e;null==e&&(t=""),this.elRef.nativeElement.textContent=t},enumerable:!1,configurable:!0}),e}();Ye.decorators=[{type:t.Directive,args:[{selector:"[textContent]"}]}],Ye.ctorParameters=function(){return[{type:t.ElementRef}]},Ye.propDecorators={textContent:[{type:t.Input}]};var Ke=function(e){return _.isDate(e)||isNaN(e)||(e=parseInt(e,10)),moment(e).valueOf()||moment((new Date).toDateString()+" "+e).valueOf()},Qe=function(){function e(e){this.decimalPipe=e}return e.prototype.transform=function(e,t,n,i,o,r,a,s){n=o&&!a?"1."+r.length+"-16":n;var l=s?s.number:void 0;return this.decimalPipe.transform(e,n,i||l||t)},e}();Qe.decorators=[{type:t.Pipe,args:[{name:"trailingZeroDecimalPipe"}]}],Qe.ctorParameters=function(){return[{type:n.DecimalPipe}]};var Xe=function(){function e(e,t){this.datePipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n,o){var r;if("null"===e||""===e)return"";if(!i.isDefined(e))return"";if(r=Ke(e)){if("timestamp"===t)return r;if("UTC"===t)return new Date(r).toISOString();var a=this.i18nService?this.i18nService.getTimezone(o):n;return a&&(e===r||i.hasOffsetStr(e))?moment(r).tz(a).format(t.replaceAll("y","Y").replaceAll("d","D").replace("a","A")):this.datePipe.transform(r,t)}return""},e}();Xe.decorators=[{type:t.Pipe,args:[{name:"toDate"}]}],Xe.ctorParameters=function(){return[{type:n.DatePipe},{type:i.AbstractI18nService}]};var Je=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t){if(t&&!String(t).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)&&(t="1."+t+"-"+t),!_.isNaN(+e)){var n=this.i18nService&&this.i18nService.getwidgetLocale()?this.i18nService.getwidgetLocale():void 0,i=n?n.number:null;return this.decimalPipe.transform(e,t,i)}},e}();Je.decorators=[{type:t.Pipe,args:[{name:"toNumber"}]}],Je.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var Ze=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n){var o=(i.CURRENCY_INFO[t]||{}).symbol||t||"",r=new Je(this.decimalPipe,this.i18nService).transform(e,n),a=_.startsWith(r,"-");return a&&(r=r.replace("-","")),r?a?"-"+o+r:o+r:""},e}();Ze.decorators=[{type:t.Pipe,args:[{name:"toCurrency"}]}],Ze.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var et=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:(t||"")+e},e}();et.decorators=[{type:t.Pipe,args:[{name:"prefix"}]}];var tt=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:e+(t||"")},e}();tt.decorators=[{type:t.Pipe,args:[{name:"suffix"}]}];var nt=function(){function e(e){this.custmeUserPipe=e}return e.prototype.transform=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n.push(arguments[i]);var o=this.custmeUserPipe.getCustomPipe(t);if(!o||!_.isFunction(o.formatter))return console.warn("formatter is not defined, please check the custom pipes documentation"),e;try{return o.formatter.apply(o,v([e],g(n)))}catch(n){return console.error("Pipe name: "+t,n),e}},e}();nt.decorators=[{type:t.Pipe,args:[{name:"custom"}]}],nt.ctorParameters=function(){return[{type:i.CustomPipeManager}]};var it=function(){function e(){}return e.prototype.transform=function(e){var t;if(i.isDefined(e))return(t=Ke(e))?moment(t).fromNow():void 0},e}();it.decorators=[{type:t.Pipe,args:[{name:"timeFromNow"}]}];var ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(Je);ot.decorators=[{type:t.Pipe,args:[{name:"numberToString"}]}];var rt=function(){function e(){}return e.prototype.transform=function(e){return Number(e)||void 0},e}();rt.decorators=[{type:t.Pipe,args:[{name:"stringToNumber"}]}];var at=function(){function e(){}return e.prototype.transform=function(e,t,n){return e?_.isObject(t)?_.filter(e,t):_.filter(e,(function(e){return _.includes(e[t],n)})):[]},e}();at.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var st=function(){function e(){}return e.prototype.transform=function(e,t){for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+["bytes","KB","MB","GB","TB","PB"][n]},e}();st.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e){return"fa "+({zip:"fa-file-zip-o",pdf:"fa-file-pdf-o",rar:"fa-file-archive-o",txt:"fa-file-text-o",ppt:"fa-file-powerpoint-o",pot:"fa-file-powerpoint-o",pps:"fa-file-powerpoint-o",pptx:"fa-file-powerpoint-o",potx:"fa-file-powerpoint-o",ppsx:"fa-file-powerpoint-o",mpg:"fa-file-movie-o",mp4:"fa-file-movie-o",mov:"fa-file-movie-o",avi:"fa-file-movie-o",mp3:"fa-file-audio-o",docx:"fa-file-word-o",js:"fa-file-code-o",md:"fa-file-code-o",html:"fa-file-code-o",css:"fa-file-code-o",xlsx:"fa-file-excel-o",png:"fa-file-image-o",jpg:"fa-file-image-o",jpeg:"fa-file-image-o",file:"fa-file-o",default:"fa-file-o"}[e]||"fa-file-o")},e}();lt.decorators=[{type:t.Pipe,args:[{name:"fileIconClass"}]}];var ct=function(){function e(){}return e.prototype.transform=function(e){return{success:"wi wi-done text-success",error:"wi wi-error text-danger"}[e.toLowerCase()]},e}();ct.decorators=[{type:t.Pipe,args:[{name:"stateClass"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e){return{"audio/aac":".aac","application/x-abiword":".abw","application/vnd.android.package-archive":".apk","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/ecmascript":".es","image/gif":".gif","text/html":".html","image/x-icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":[".jpeg",".jpg"],"application/javascript":".js","application/json":".json","audio/midi":".mid","audio/x-midi":".midi","video/mpeg":".mpeg","application/vnd.apple.installer+xml":"mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/x-rar-compressed":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-shockwave-flash":".swf","application/x-tar":".tar","image/tiff":".tiff","application/typescript":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","application/xml":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","audio/3gpp":".3gp","video/3gpp2":".3g2","audio/3gpp2":".3g2","application/x-7z-compressed":".7z"}[e]},e}();pt.decorators=[{type:t.Pipe,args:[{name:"fileExtensionFromMime"}]}];var ut=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.bypassSecurityTrustHtml(e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.bypassSecurityTrustStyle(e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.bypassSecurityTrustScript(e);case"url":case t.SecurityContext.URL:return this.domSanitizer.bypassSecurityTrustUrl(e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.bypassSecurityTrustResourceUrl(e)}},e}();ut.decorators=[{type:t.Pipe,args:[{name:"trustAs"}]}],ut.ctorParameters=function(){return[{type:a.DomSanitizer}]};var dt=[],ht=[],mt=function(){function e(){this.dialogRefsCollection=new Map,this.appConfirmDialog="_app-confirm-dialog"}return e.prototype.register=function(e,t,n){e&&(this.dialogRefsCollection.get(e)?this.dialogRefsCollection.get(e).set(n,t):this.dialogRefsCollection.set(e,new Map([[n,t]])))},e.prototype.getDialogRefsCollection=function(){return this.dialogRefsCollection},e.prototype.deRegister=function(e,t){e&&this.dialogRefsCollection.get(e)&&this.dialogRefsCollection.get(e).delete(t)},e.prototype.getDialogRef=function(e,t){var n,i=this.dialogRefsCollection.get(e);return t?(n=i.get(t))||(t.pageName||t.partialName||t.prefabName?console.error('No dialog with the name "'+e+'" found in the given scope.'):i.forEach((function(t,i){i&&"Common"===i.partialName?n=t:console.error('No dialog with the name "'+e+'" found in the App scope.')}))):1===i.size?n=i.entries().next().value[1]:console.error("There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists."),n},e.prototype.open=function(e,t,n){var i=this.getDialogRef(e,t);i&&i.open(n)},e.prototype.close=function(e,t,n){var i=this.getDialogRef(e,t);i&&(i.closeCallBackFn=n,i.close())},e.prototype.closeAllDialogs=function(){_.forEach(dt.reverse(),(function(e){e.close()}))},e.prototype.showAppConfirmDialog=function(e){this.open(this.getAppConfirmDialog(),void 0,e)},e.prototype.closeAppConfirmDialog=function(){this.close(this.getAppConfirmDialog())},e.prototype.getAppConfirmDialog=function(){return this.appConfirmDialog},e.prototype.setAppConfirmDialog=function(e){this.appConfirmDialog=e},e.prototype.addToOpenedDialogs=function(e){dt.push(e)},e.prototype.getLastOpenedDialog=function(){return dt[dt.length-1]},e.prototype.removeFromOpenedDialogs=function(e){-1!==dt.indexOf(e)&&dt.splice(dt.indexOf(e),1)},e.prototype.getOpenedDialogs=function(){return dt},e.prototype.addToClosedDialogs=function(e){ht.push(e)},e.prototype.removeFromClosedDialogs=function(e){-1!==ht.indexOf(e)&&ht.splice(ht.indexOf(e),1)},e.prototype.getDialogRefFromClosedDialogs=function(){return ht[ht.length-1]},e}();mt.decorators=[{type:t.Injectable}],mt.ctorParameters=function(){return[]};var ft=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.sanitize(t.SecurityContext.HTML,e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.sanitize(t.SecurityContext.STYLE,e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.sanitize(t.SecurityContext.SCRIPT,e);case"url":case t.SecurityContext.URL:return this.domSanitizer.sanitize(t.SecurityContext.URL,e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.sanitize(t.SecurityContext.RESOURCE_URL,e);case"none":case t.SecurityContext.NONE:return this.domSanitizer.sanitize(t.SecurityContext.NONE,e)}},e}();ft.decorators=[{type:t.Pipe,args:[{name:"sanitize"}]}],ft.ctorParameters=function(){return[{type:a.DomSanitizer}]};var gt=[Te,Ie,xe,Me,Fe,Ge,Ve,$e,Ue,_e,We,qe,Ye],vt=[Xe,lt,pt,at,st,Je,Ze,et,tt,it,ot,ct,rt,Qe,ut,Re,nt,ft],yt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Xe,at,Qe,ut,Re,nt,ft,n.Location,{provide:i.AbstractDialogService,useClass:mt}]}},e}();yt.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.SecurityModule],declarations:v(v([],g(gt)),g(vt)),exports:v(v([],g(gt)),g(vt))}]}];var bt,wt=function(){};e.Live_Operations=void 0,(bt=e.Live_Operations||(e.Live_Operations={})).INSERT="insert",bt.UPDATE="update",bt.DELETE="delete",bt.READ="read";var Pt="All Fields",_t={EMPTY_KEY:"EMPTY_NULL_FILTER",EMPTY_VALUE:"No Value",LABEL_KEY:"key",LABEL_VALUE:"value",NULL_EMPTY:["null","empty"],NULL:"null",EMPTY:"empty"};function Ot(e){return _.includes([i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.CHIPS],e)}var St=function(e,t,n){var o=i.debounce((function(){_.isFunction(n)&&n(t)}),300);o();var r=t?_.isObject(t)?t:JSON.parse(t):{},a=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,s=i.processFilterExpBindNode(e,r).subscribe((function(e){t=JSON.stringify(e.filterExpressions),o()}));a((function(){return s.unsubscribe()}))},Et=function(e,t){var n,o={};return t["is-related"]?(o.tableName=t["lookup-type"],n=t["lookup-field"],o.distinctField=n,o.aliasColumn=n.replace(".","$"),o.filterExpr=t.filterexpressions?_.isObject(t.filterexpressions)?t.filterexpressions:JSON.parse(t.filterexpressions):{}):(o.tableName=e.execute(i.DataSource.Operation.GET_ENTITY_NAME),n=t.field||t.key,o.distinctField=n,o.aliasColumn=n),o};function Tt(e,t,n){var o;return new Promise((function(r,a){!T(t[n])||t.isDataSetBound&&"filterwidget"!==n||(o=Et(e,t),e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:o.distinctField,entityName:o.tableName,pagesize:t.limit,filterExpr:t.filterexpressions?JSON.parse(t.filterexpressions):{}}).then((function(e){r({field:t,data:e.data,aliasColumn:o.aliasColumn})}),a))}))}function Rt(e,t){if(Ot(e[t.widget]))return e.datafield=t.aliasColumn||_t.LABEL_KEY,e.searchkey=t.distinctField||_t.LABEL_KEY,void(e.displaylabel=e.displayfield=t.aliasColumn||_t.LABEL_VALUE);e.datafield=_t.LABEL_KEY,e.displayfield=_t.LABEL_VALUE}function Ct(e,t,n){var o=[i.FormWidgetType.SELECT,i.FormWidgetType.RADIOSET],r={},a=[];n.isEnableEmptyFilter&&_.includes(o,e[n.widget])&&!e["is-range"]&&!e.multiple&&(r[_t.LABEL_KEY]=_t.EMPTY_KEY,r[_t.LABEL_VALUE]=n.EMPTY_VALUE||_t.EMPTY_VALUE,a.push(r)),_.each(t,(function(e){var t=e[n.aliasColumn],i={};null!==t&&""!==t&&(i[_t.LABEL_KEY]=t,i[_t.LABEL_VALUE]=t,a.push(i))})),Rt(e,n),e.dataset=a}function At(e,t,n){if(e&&t&&!t.isDataSetBound)if(Ot(t[n.widget])){var i=Et(e,t);t.dataoptions=i,Rt(t,Object.assign(n||{},i)),t.datasource=e}else St(t.viewParent,t.filterexpressions,(function(i){t.filterexpressions=i,Tt(e,t,n.widget).then((function(e){Ct(e.field,e.data,{aliasColumn:e.aliasColumn,widget:n.widget,isEnableEmptyFilter:xt(n.enableemptyfilter),EMPTY_VALUE:n.EMPTY_VALUE})}))}))}function It(e){return i.isDefined(e)&&""!==e&&null!==e}function Dt(e,t){var n;return It(e)&&It(t)?n=[e,t]:It(e)?n=e:It(t)&&(n=t),n}function Nt(e,t){var n;return It(e)&&It(t)?n=i.MatchMode.BETWEEN:It(e)?n=i.MatchMode.GREATER:It(t)&&(n=i.MatchMode.LESSER),n}function xt(e){return e&&_.intersection(e.split(","),_t.NULL_EMPTY).length>0}function Mt(e){var t,n=_.split(e,",");return 2===_.intersection(n,_t.NULL_EMPTY).length?t=i.MatchMode.NULLOREMPTY:_.includes(n,_t.NULL)?t=i.MatchMode.NULL:_.includes(n,_t.EMPTY)&&(t=i.MatchMode.EMPTY),t}var kt=function(e){return _.isUndefined(e)||_.isNull(e)?[]:(_.isString(e)&&(e=e.split(",").map(Function.prototype.call,String.prototype.trim)),_.isArray(e)||(e=[e]),e)};var Lt,Ft=moment.localeData(),jt=i.getClonedObject(Ft._calendar),Bt=Ft._calendarDay||{lastDay:"[Yesterday]",lastWeek:"[Last] dddd",nextDay:"[Tomorrow]",nextWeek:"dddd",sameDay:"[Today]",sameElse:"L"},Gt="alphabet",Vt="Others",$t={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",YEAR:"year"},Ut="yyyy-MM-dd",Wt="w 'Week', yyyy",qt="MMM, yyyy",zt="YYYY",Ht="hh:mm a",Yt=function(e,t,n){if(!t)return _.cloneDeep(e);var i=t.split(","),o=[],r=[];return i.forEach((function(e){var t=e.split(":");o.push(n?n+"."+t[0]:t[0]),r.push(t[1])})),_.orderBy(e,o,r)},Kt=function(e){return _.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),e},Qt=function(e){return"wm-search"===e},Xt=function(e,t,n,o){if(e&&Qt(e.widgetType))if(e.groupby)if(_.includes(e.groupby,"(")){var r=i.$parseEvent(e.groupby);n.groupby=r(t,{row:n.dataObject||n})}else n.groupby=nn(e.groupby,e.match,o,e.dateformat,e.datePipe,e.appDefaults,n);else n.groupby=""},Jt=function(e,t,n){var i=[];return _.forEach(_.keys(e),(function(o,r){var a=Yt(e[o],n,"dataObject");i.push({key:o,data:_.sortBy(a,(function(e){return e._groupIndex=r+1,_.get(e,t)||_.get(e.dataObject,t)}))})})),i},Zt=function(e,t,n,i,o,r,a,s){n===$t.DAY&&(Ft._calendar=Bt),e=_.orderBy(e,(function(e){var n=_.get(a?e[a]:e,t);if(n)return _.toLower(n)}));var l=_.groupBy(e,nn.bind(void 0,t,n,a,o,r,s));return Ft._calendar=jt,l},en=function(e,t,n,o){return"timestamp"===t?e:i.getFormattedDate(o,e,t||n)},tn=function(e,t,n,i,o){var r,a=moment(e),s=n,l=moment(),c=function(){return"["+en(this.valueOf(),s,Ut,i)+"]"};switch(t){case $t.HOUR:s=s||o.timeFormat,a.isValid()||(a=moment((new Date).toDateString()+" "+e)).isValid()&&(Ft._calendar.sameDay=function(){return"["+en(this.valueOf(),s,Ht,i)+"]"}),a=a.startOf("hour"),Ft._calendar.sameElse=c,r=a.calendar(l);break;case $t.WEEK:r=en(a.valueOf(),s,Wt,i);break;case $t.MONTH:r=en(a.valueOf(),s,qt,i);break;case $t.YEAR:r=a.format(zt);break;case $t.DAY:s=s||o.dateFormat,a=a.startOf("day"),Ft._calendar.sameElse=c,r=a.calendar(l)}return"Invalid date"===r?Vt:r},nn=function(e,t,n,i,o,r,a){var s=_.get(n?a[n]:a,e);return _.isUndefined(s)||_.isNull(s)||""===s.toString().trim()?Vt:(t===Gt&&(s=s.substr(0,1)),_.includes(_.values($t),t)&&(s=tn(s,t,i,o,r)),s)},on=function(){},rn="default",an="label",sn=function(e,t,n,i){_.forEach(e,(function(e){_.get(e,"isGroup")&&(e.field===n?e.columns[i]=t:sn(e.columns,t,n,i))}))},ln=function(e){return"true"===e||"false"!==e&&(/^\d+$/.test(e)?+e:e)},cn={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},pn=function(e){if(e)return/^(\/|#\/|#)(?!\W).*/.test(e)?"#/"+(e=_.first(e.match(/[\w]+.*/g))||""):_.startsWith(e,"www.")?"//"+e:e},un=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.nodes=[],i.nodes$=new s.Subject,i._resetNodes=_.debounce(i.resetNodes,50),i.securityService=i.inj.get(o.SecurityService),i.binditemlabel=i.nativeElement.getAttribute("itemlabel.bind"),i.binditemicon=i.nativeElement.getAttribute("itemicon.bind"),i.binditemaction=i.nativeElement.getAttribute("itemaction.bind"),i.binditembadge=i.nativeElement.getAttribute("itembadge.bind"),i.binditemchildren=i.nativeElement.getAttribute("itemchildren.bind"),i.binditemid=i.nativeElement.getAttribute("itemid.bind"),i.binditemlink=i.nativeElement.getAttribute("itemlink.bind"),i.binditemtarget=i.nativeElement.getAttribute("itemtarget.bind"),i.binduserrole=i.nativeElement.getAttribute("userrole.bind"),i.bindisactive=i.nativeElement.getAttribute("isactive.bind"),i}return d(t,e),t.prototype.getNode=function(e,t){var n=this.viewParent.pageScope||this.viewParent,o=E(t,{field:this.itemchildren,bindExpression:this.binditemchildren},n)||_.get(t,e.childrenField),r={action:E(t,{field:this.itemaction,bindExpression:this.binditemaction},n)||_.get(t,e.actionField),badge:E(t,{field:this.itembadge,bindExpression:this.binditembadge},n)||_.get(t,e.badgeField),children:Array.isArray(o)?this.getNodes(o):[],class:_.get(t,e.classField),disabled:t.disabled,icon:E(t,{field:this.itemicon,bindExpression:this.binditemicon},n)||_.get(t,e.iconField),id:E(t,{field:this.itemid,bindExpression:this.binditemid},n)||_.get(t,e.idField),label:E(t,{field:this.itemlabel,bindExpression:this.binditemlabel},n)||_.get(t,e.labelField),link:pn(E(t,{field:this.itemlink,bindExpression:this.binditemlink},n)||_.get(t,e.linkField)),target:pn(E(t,{field:this.itemtarget,bindExpression:this.binditemtarget},n)||_.get(t,e.targetField)),role:E(t,{field:this.userrole,bindExpression:this.binduserrole},n),isactive:E(t,{field:this.isactive,bindExpression:this.bindisactive},n),value:this.datafield?"All Fields"===this.datafield?t:i.findValueOf(t,this.datafield):t};return _.omitBy(r,_.isUndefined)},t.prototype.resetItemFieldMap=function(){this._itemFieldMap=null},t.prototype.getItemFieldsMap=function(){return this._itemFieldMap||(this._itemFieldMap={idField:this.itemid||"itemid",iconField:this.itemicon||"icon",labelField:this.itemlabel||"label",linkField:this.itemlink||"link",targetField:this.itemtarget||"target",badgeField:this.itembadge||"badge",childrenField:this.itemchildren||"children",classField:this.itemclass||"class",actionField:this.itemaction||"action",isactiveField:this.isactive||"isactive"}),this._itemFieldMap},t.prototype.prepareNodeDataSet=function(e){return(e=kt(e)).map((function(e){return i.isObject(e)?e:{label:e,value:e}}))},t.prototype.getNodes=function(e){var t=this;void 0===e&&(e=this.dataset||{});var n=Yt(this.prepareNodeDataSet(e),this.orderby)||[];if(n.length){var o=this.userrole,r=this.getItemFieldsMap();n=n.reduce((function(e,n){return i.validateAccessRoles(n[o],t.securityService.loggedInUser)&&e.push(t.getNode(r,n)),e}),[])}return n},t.prototype.resetNodes=function(){this.resetItemFieldMap(),this.nodes=this.getNodes(),i.$appDigest(),this.nodes$.next()},t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":case"itemicon":case"itemlabel":case"itemlink":case"itemtarget":case"itemclass":case"itemchildren":case"isactive":case"orderby":this._resetNodes()}e.prototype.onPropertyChange.call(this,t,n,i)},t}(Pe),dn={pattern:"regexp",max:"maxvalue",min:"minvalue",required:"required",maxlength:"maxchars",mindate:"mindate",maxdate:"maxdate",excludedates:"excludedates",excludedays:"excludedays",invalidNumber:"invalidNumber"},hn=function(){function e(e,t,n,i,o,r){this.instance=e,this.formwidget=t,this.widgettype=n,this.widgetControl=i,this.widgetContext=o,this.defaultValidatorMessages=[],r&&(this.tableFieldType=r)}return e.prototype.getDefaultValidators=function(){var e=[];return this.instance.required&&!1!==this.instance.show&&(this.widgettype===i.FormWidgetType.CHECKBOX||this.widgettype===i.FormWidgetType.TOGGLE?e.push(c.Validators.requiredTrue):e.push(c.Validators.required)),this.instance.maxchars&&e.push(c.Validators.maxLength(this.instance.maxchars)),this.instance.minvalue&&e.push(c.Validators.min(this.instance.minvalue)),this.instance.maxvalue&&this.widgettype!==i.FormWidgetType.RATING&&e.push(c.Validators.max(this.instance.maxvalue)),this.instance.regexp&&e.push(c.Validators.pattern(this.instance.regexp)),this.formwidget&&_.isFunction(this.formwidget.validate)&&e.push(this.formwidget.validate.bind(this.formwidget)),e},e.prototype.setUpValidators=function(e){if(!this.hasValidators&&(this.instance._validators=this.getDefaultValidators(),e&&this.instance._validators.push(e),this.widgetContext.ngform)){this.widgetControl.setValidators(this.instance._validators);var t={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(t.emitEvent=!1),this.widgetControl.updateValueAndValidity(t)}},e.prototype.getPromiseList=function(e){var t=this,n=[];return _.forEach(e,(function(e,i){var o=e;e instanceof Function&&e.bind&&(o=e(t.widgetControl,t.widgetContext)),o instanceof Promise&&n.push(o)})),n},e.prototype.setAsyncValidators=function(e){var t=this;this._asyncValidatorFn=function(){return function(){return Promise.all(t.getPromiseList(e)).then((function(){return t.instance.validationmessage="",null}),(function(e){if(e.hasOwnProperty("errorMessage"))t.instance.validationmessage=_.get(e,"errorMessage");else{var n=_.keys(e);t.instance.validationmessage=e[n[0]].toString()}return e})).then((function(e){var n=function(){setTimeout((function(){"PENDING"===t.widgetControl.status?n():t.instance.onStatusChange(t.widgetControl.status,t.tableFieldType)}),100)};return n(),e}))}},this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetContext.ngform.touched&&this.widgetControl.updateValueAndValidity()},e.prototype.isDefaultValidator=function(e){return _.get(i.VALIDATOR,_.toUpper(e))},e.prototype.setDefaultValidator=function(e,t){t&&t instanceof Function?this.watchDefaultValidatorExpr(t.bind(void 0,this.widgetControl,this.widgetContext),e):(this.instance.widget[e]=t,this.instance[e]=t)},e.prototype.setValidators=function(e){var t=this,n=_.cloneDeep(e);this.hasValidators=!0,this._syncValidators=[],_.forEach(n,(function(e,i){if(e&&e instanceof Function)n[i]=e.bind(void 0,t.widgetControl,t.widgetContext),t._syncValidators.push(n[i]);else{var o=_.get(e,"type");if(t.defaultValidatorMessages[o]=_.get(e,"errorMessage"),t.isDefaultValidator(o)){var r=_.get(e,"validator");t.setDefaultValidator(o,r),n[i]=""}}})),this._syncValidators=_.filter(n,(function(e){if(e)return e})),this.applyDefaultValidators()},e.prototype.observeOn=function(e,t){var n=this;_.forEach(e,(function(e){var i=_.find(n.widgetContext[t],{key:e});i&&(i.notifyForFields||(i.notifyForFields=[]),i.notifyForFields.push(n.instance))}))},e.prototype.validate=function(){this.applyDefaultValidators(),this._asyncValidatorFn&&(this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetControl.updateValueAndValidity()),this.widgetContext.ngform.touched&&this.widgetControl.markAsTouched()},e.prototype.watchDefaultValidatorExpr=function(e,t){var n=this,o=this.instance.widgetId+"_"+t+"_formField";i.$unwatch(o),this.instance.registerDestroyListener(i.$watch("boundFn(fn)",_.extend(this.instance,this.instance.viewParent),{fn:e},(function(e,i){n.instance.widget[t]=e,n.applyDefaultValidators()}),o))},e.prototype.applyDefaultValidators=function(){var e=this.getDefaultValidators();this.widgetControl.setValidators(_.concat(this._syncValidators||[],e)),this.widgetControl.updateValueAndValidity(),this.setCustomValidationMessage()},e.prototype.setCustomValidationMessage=function(){var e=this.widgetControl&&this.widgetControl.errors;if(e)if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=_.get(e,"errorMessage");else{var t=_.keys(e)[0],n=_.get(dn,t)||this.formwidget.validateType;if(n){var i=_.get(this.defaultValidatorMessages,n)||this.instance.validationmessage;this.instance.validationmessage=i&&i instanceof Function?i(this.widgetControl,this.widgetContext):i}else this.instance.validationmessage=""}},e}(),mn=function(e){function t(t,n,o){var r=e.call(this)||this;r.$el=t,r.app=n,r.onPullToRefresh=o,r.count=0;return r.$el.prepend('<div class="refresh-container"></div>'),r.infoContainer=r.$el.find(".refresh-container"),i.isIos()&&r.infoContainer.addClass("ios-refresh-container"),r.init(r.$el),r}return d(t,e),t.prototype.threshold=function(){return 10},t.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.VERTICAL},t.prototype.subscribe=function(){var e=this;this.cancelSubscription=this.app.subscribe("toggle-variable-state",(function(t){t.active&&e.animationInProgress?(e.count++,e.wait()):e.count>0&&e.count--,!e.count&&e.animationInProgress&&e.stopAnimation()}))},t.prototype.bounds=function(e,t){var n=this.$el[0].iscroll;return t<0||n&&!isNaN(n.y)&&0!==n.y?{lower:void 0,upper:void 0}:(this.spinner||(this.spinner=i.isIos()?new gn(this.infoContainer):new fn(this.infoContainer),this.subscribe()),{lower:0,center:0,upper:i.isIos()?0:150,strict:!i.isIos()})},t.prototype.context=function(){var e=this;return this.infoContainer.show(),i.isIos()&&this.infoContainer.addClass("entry"),{spin:function(t){e.spinner.setRotation(2*t)}}},t.prototype.animation=function(){return i.isIos()?{css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}"}}:{target:this.infoContainer,css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}",opacity:"${{min(($D + $d) / 100, 1)}}"}}},t.prototype.onAnimation=function(){var e=this;this.animationInProgress=!0,this.spinner.start(),this.onPullToRefresh&&this.onPullToRefresh(),setTimeout((function(){e.runAnimation||e.stopAnimation()}))},t.prototype.stopAnimation=function(){var e=this;setTimeout((function(){e.runAnimation=!1,e.animationInProgress=!1,e.spinner.stop(),e.infoContainer.hide(),i.setCSS(e.infoContainer[0],"transform","none"),i.isIos()||i.setCSS(e.infoContainer[0],"opacity",0),e.infoContainer.removeClass("entry")}),800)},t.prototype.wait=function(){this.runAnimation=!0},t}(p.SwipeAnimation),fn=function(){function e(e,t){this.$el=e,this.options=t||{}}return e.prototype.polarToCartesian=function(e,t,n,i){var o=(i-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},e.prototype.describeArc=function(e,t,n,i,o){var r=this.polarToCartesian(e,t,n,o),a=this.polarToCartesian(e,t,n,i),s=o-i<=180?"0":"1";return["M",r.x,r.y,"A",n,n,0,s,0,a.x,a.y,"L",a.x,a.y].join(" ")},e.prototype.init=function(){if(!this.initialized){var e=$('<svg><path id="arc1"/></svg>'),t=$('<div class="android-spinner"></div>');t.append(e),this.$el.append(t),this.cx=t.outerWidth()/2,this.cy=t.outerHeight()/2,this.r=.6*this.cx,this.path=t.find("path"),this.initialized=!0,this.container=t}},e.prototype.setRotation=function(e){this.init(),this.path.attr("d",this.describeArc(this.cx,this.cy,this.r,0,e))},e.prototype.start=function(){var e=this;this.init();var t=this,n=this.options.time||1800,i=0;this.container.addClass("spin"),this.intervalId=setInterval((function(){var n;n=(i+=10)>720?i=0:i>360?720-i:i,t.path.attr("d",e.describeArc(t.cx,t.cy,t.r,0,n))}),10*n/360)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0),this.container.removeClass("spin")},e}(),gn=function(){function e(e){this.$el=e}return e.prototype.init=function(){if(!this.svg){var e=$('<div class="ios-spinner"><svg></svg></div>'),t=e.find("svg");this.$el.append(e);for(var n=e.width(),i=0;i<12;i++)t[0].innerHTML+='<line y1="'+.15*n+'" y2="'+.3*n+'"\n transform="translate('+.5*n+", "+.5*n+") rotate("+30*i+')">\n </line>';e.append(t),this.svg=t}},e.prototype.setRotation=function(e){this.init(),this.svg.css("transform","rotateZ( "+30*Math.round(e/30)+"deg)")},e.prototype.start=function(){var e=this;this.init();var t=0;this.intervalId=setInterval((function(){t+=10,e.setRotation(t)}),20)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0)},e}(),vn=this;!function(e){e.LEFT_PANEL="page-left-panel",e.RIGHT_PANEL="page-right-panel",e.SWIPE_ELEM="page-left-panel-icon",e.CONTENT="app-content-column",e.HEADER="page-header",e.SEARCH="app-search"}(Lt||(Lt={}));var yn=function(e){return"[data-role='"+e+"']"},bn=(yn("pageContainer"),function(e,t){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.removeEventListener("click",t),e.addEventListener("click",t))}),wn=function(e,t){if(i.isMobile()){if(e)try{e.widget.collapse()}catch(e){}t&&i.setCSS(t,"display","none")}},Pn=function(e,t,n,i){void 0===i&&(i=!1),i||bn(t,wn.bind(vn,e,n))},_n=function(e,t){bn(yn(Lt.SWIPE_ELEM),(function(){e&&(e.widget.toggle(),e.classList.contains("visible")&&t&&i.setCSS(t,"display","none"))}))},On=function(e){bn(e,wn)},Sn=function(e,t){"none"===$(e).css("display")?(wn(t),i.setCSS(e,"display","inline-table")):wn(t,e)},En=function(e,t){$(e).each((function(e,n){var i=$('<a class="app-header-action"><i class="wi wi-search"></i></a>');$(n).before(i),bn(i,(function(){return Sn(n,t)}))}))};e.ALLFIELDS=Pt,e.AUTOCLOSE_TYPE={OUTSIDECLICK:"outsideClick",ALWAYS:"always",DISABLED:"disabled"},e.BaseComponent=we,e.BaseContainerComponent=Oe,e.BaseFieldValidations=hn,e.ContainerDirective=Te,e.Context=w,e.CustomPipe=nt,e.DEBOUNCE_TIMES={PAGINATION_DEBOUNCE_TIME:250},e.DISPLAY_TYPE=ae,e.DataSetItem=on,e.DatasetAwareNavComponent=un,e.DialogRef=b,e.DialogServiceImpl=mt,e.EDIT_MODE={QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog"},e.EVENTS_MAP=re,e.FileExtensionFromMimePipe=pt,e.FileIconClassPipe=lt,e.FileSizePipe=st,e.FilterPipe=at,e.INPUTMODE={FINANCIAL:"financial",NATURAL:"natural"},e.ImagePipe=Re,e.ItemTemplateDirective=Ie,e.LIVE_CONSTANTS=_t,e.LazyLoadDirective=Me,e.MessageComponent=Fe,e.NAVIGATION_TYPE={ADVANCED:"Advanced",BASIC:"Basic",CLASSIC:"Classic",INLINE:"Inline",NONE:"None",ONDEMAND:"On-Demand",PAGER:"Pager",SCROLL:"Scroll"},e.NumberToStringPipe=ot,e.PROP_ANY=te,e.PROP_BOOLEAN=ee,e.PROP_NUMBER=Z,e.PROP_STRING=J,e.PartialContainerDirective=Ue,e.PartialDirective=Ge,e.PartialParamDirective=$e,e.PartialParamHandlerDirective=Ve,e.PrefixPipe=et,e.PullToRefresh=mn,e.RedrawableDirective=_e,e.RepeatTemplateDirective=xe,e.SanitizePipe=ft,e.ShowInDeviceDirective=We,e.SmoothScrollDirective=qe,e.StateClassPipe=ct,e.StringToNumberPipe=rt,e.StylableComponent=Pe,e.SuffixPipe=tt,e.TextContentDirective=Ye,e.TimeFromNowPipe=it,e.ToCurrencyPipe=Ze,e.ToDatePipe=Xe,e.ToNumberPipe=Je,e.TrailingZeroDecimalPipe=Qe,e.TrustAsPipe=ut,e.WidgetRef=y,e.WmComponentsModule=yt,e.applyFilterOnField=function(e,t,n,o,r){void 0===r&&(r={});var a=t.field||t.key,s=_.filter(n,{"filter-on":a});o=t["is-range"]?Dt(t.minValue,t.maxValue):i.isDefined(o)?o:t.value,!e||r.isFirst&&(_.isUndefined(o)||""===o)||_.forEach(s,(function(n){var a,s,l,c=n.field||n.key,p=t["lookup-field"]||t._primaryKey,u=n["edit-widget-type"]||n.widgettype,d={},h=n["filter-on"];T(u)&&!n.isDataSetBound&&h!==c&&(t&&t["is-related"]&&(h+="."+p),i.isDefined(o)?(l=t["is-range"]?Nt(t.minValue,t.maxValue):xt(r.enableemptyfilter)&&o===_t.EMPTY_KEY?Mt(r.enableemptyfilter):i.MatchMode.EQUALS,a=_.isObject(o)&&!_.isArray(o)?o[p]:o,d[h]={value:a,matchMode:l}):d={},s=c,Ot(u)&&n.dataoptions?n.dataoptions.filterFields=d:e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:s,filterFields:d,pagesize:n.limit}).then((function(e){Ct(n,e.data,{aliasColumn:s,widget:r.widget||"widgettype",isEnableEmptyFilter:xt(r.enableemptyfilter),EMPTY_VALUE:r.EMPTY_VALUE})}),wt))}))},e.configureDnD=function(e,t,n,i,o){var r=Object.assign({containment:e,delay:100,opacity:.8,helper:"clone",zIndex:1050,tolerance:"pointer",start:n,update:i,sort:o},t);e.sortable(r)},e.convertDataToObject=Kt,e.createArrayFrom=kt,e.extractDataAsArray=function(e){return _.isUndefined(e)||_.isNull(e)||""===_.trim(e)?[]:(_.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),_.isArray(e)||(e=[e]),e)},e.extractDataSourceName=function(e){if(e){var t,n=e.split(".");return n.length>1&&"Variables"===n[0]&&(t=n[1]),t}},e.fetchDistinctValues=function(e,t,n){_.isEmpty(t)||t.forEach((function(t){At(e,t,n)}))},e.fetchRelatedFieldData=function(e,t,n){var o,r,a=n.relatedField,s=n.datafield;e&&(o=e.execute(i.DataSource.Operation.GET_RELATED_PRIMARY_KEYS,a),t.datafield=s,t._primaryKey=_.isEmpty(o)?void 0:o[0],t.compareby=o&&o.join(","),r=s===Pt?void 0:s,t.displayfield=r=t.displayfield||r||t._primaryKey,Ot(t[n.widget])?(t.dataoptions={relatedField:a,filterExpr:t.filterexpressions?t.filterexpressions:{}},t.datasource=e,t.searchkey=t.searchkey||r,t.displaylabel=t.displayfield=t.displaylabel||r,t.showPendingSpinner&&(t.showPendingSpinner=!1)):St(t.viewParent,t.filterexpressions,(function(n){t.filterexpressions=n,e.execute(i.DataSource.Operation.GET_RELATED_TABLE_DATA,{relatedField:a,pagesize:t.limit,orderBy:t.orderby?_.replace(t.orderby,/:/g," "):"",filterFields:{},filterExpr:t.filterexpressions?t.filterexpressions:{}}).then((function(e){t.dataset=e.data,t.displayfield=t.displayfield||_.head(_.keys(_.get(e,"[0]"))),t.showPendingSpinner&&(t.showPendingSpinner=!1)}),wt)})))},e.filterDate=en,e.getBackGroundImageUrl=C,e.getConditionalClasses=F,e.getContainerTargetClass=function(e){return".wm-app"},e.getDataTableFilterWidget=function(e){var t=cn[e]&&cn[e][0];return e===i.DataType.BOOLEAN&&(t=i.FormWidgetType.SELECT),_.includes([i.FormWidgetType.TEXT,i.FormWidgetType.NUMBER,i.FormWidgetType.SELECT,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.DATE,i.FormWidgetType.TIME,i.FormWidgetType.DATETIME],t)?t:i.FormWidgetType.TEXT},e.getDefaultValue=function(e,t,n){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?ln(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?ln(e):e},e.getDefaultViewModeWidget=function(e){return _.includes(["checkbox","toggle","rating"],e)?rn:an},e.getDistinctFieldProperties=Et,e.getDistinctValues=Tt,e.getDistinctValuesForField=At,e.getEditModeWidget=function(e){return e["related-entity-name"]&&e["primary-key"]?i.FormWidgetType.SELECT:cn[e.type]&&cn[e.type][0]||i.FormWidgetType.TEXT},e.getEmptyMatchMode=Mt,e.getEnableEmptyFilter=xt,e.getEvaluatedData=E,e.getFieldLayoutConfig=function(e,t,n){var o="",r="";return"top"===(t=t||"top")||"floating"===t?n&&"android"===n||!i.isMobileApp()||i.isAndroid()?o=r="col-xs-12":i.isMobileApp()&&(o="col-xs-4",r="col-xs-8"):e&&_.forEach(_.split(e," "),(function(e){var t,n,i=_.split(e,"-"),a=i[0];t=parseInt(i[1],10),o+=" col-"+a+"-"+t,r+=" col-"+a+"-"+(n=(n=12-t)<=0?12:n)})),{captionCls:o,widgetCls:r}},e.getFieldTypeWidgetTypesMap=function(){return cn},e.getImageUrl=R,e.getKeyboardFocusableElements=function(e){return[e.querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex="-1"])')].filter((function(e){return!e[0].hasAttribute("disabled")&&!e[0].hasAttribute("hidden")}))[0]},e.getMatchModeMsgs=function(e){return{start:e.LABEL_STARTS_WITH,startignorecase:e.LABEL_STARTS_WITH_IGNORECASE,end:e.LABEL_ENDS_WITH,endignorecase:e.LABEL_ENDS_WITH_IGNORECASE,anywhere:e.LABEL_CONTAINS,anywhereignorecase:e.LABEL_CONTAINS_IGNORECASE,exact:e.LABEL_IS_EQUAL_TO,exactignorecase:e.LABEL_IS_EQUAL_TO_IGNORECASE,notequals:e.LABEL_IS_NOT_EQUAL_TO,notequalsignorecase:e.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,lessthan:e.LABEL_LESS_THAN,lessthanequal:e.LABEL_LESS_THAN_OR_EQUALS_TO,greaterthan:e.LABEL_GREATER_THAN,greaterthanequal:e.LABEL_GREATER_THAN_OR_EQUALS_TO,null:e.LABEL_IS_NULL,isnotnull:e.LABEL_IS_NOT_NULL,empty:e.LABEL_IS_EMPTY,isnotempty:e.LABEL_IS_NOT_EMPTY,nullorempty:e.LABEL_IS_NULL_OR_EMPTY,in:e.LABEL_IN,notin:e.LABEL_NOT_IN,between:e.LABEL_BETWEEN}},e.getMatchModeTypesMap=function(e){return e&&(M.number.push("in","notin","between"),M.date.push("between"),M.string.push("in","notin"),M.character.push("in","notin")),_.forEach(x,(function(e,t){_.forEach(e,(function(e){k[e]=M[t]}))})),k.default=_.union(M.number,M.string,M.character,M.date,M.date),k},e.getObjValueByKey=S,e.getOrderByExpr=function(e){e=e||[];var t=[];return _.forEach(e,(function(e){e.direction&&t.push(e.property+" "+e.direction.toLowerCase())})),_.join(t,",")},e.getOrderedDataset=Yt,e.getRangeFieldValue=Dt,e.getRangeMatchMode=Nt,e.getRowOperationsColumn=function(){return{field:"rowOperations",type:"custom",displayName:"Actions",width:"120px",readonly:!0,sortable:!1,searchable:!1,resizable:!1,selectable:!1,show:!0,operations:[],opConfig:{},pcDisplay:!0,mobileDisplay:!0,tabletDisplay:!0,include:!0,isRowOperation:!0}},e.getUniqObjsByDataField=function(e,t,n,i){var o,r=t===Pt;return o=r?_.uniqWith(e,_.isEqual):_.uniqBy(e,"key"),!n||i?o:_.filter(o,(function(e){return(r||_.trim(e.key))&&_.trim(e.label)}))},e.getWatchIdentifier=N,e.getWidgetPropsByType=Q,e.groupData=function(e,t,n,o,r,a,s,l,c){var p={};if(_.includes(n,"(")){var u=i.$parseEvent(n);p=_.groupBy(t,(function(t){return u(e.viewParent,{row:t.dataObject||t})}))}else p=Zt(t,n,o,r,a,s,l,c);return Jt(p,n,r)},e.handleHeaderClick=function(e){var t=$(e.target).closest(".item-group"),n=t.find("li.list-group-header .app-icon");n.hasClass("wi-chevron-down")?n.removeClass("wi-chevron-down").addClass("wi-chevron-up"):n.removeClass("wi-chevron-up").addClass("wi-chevron-down"),t.find(".group-list-item").toggle()},e.interpolateBindExpressions=St,e.isActiveNavItem=function(e,t){return!(!e||!t)&&(t=-1===t.indexOf("?")?t:t.substring(0,t.indexOf("?")),e=-1===e.indexOf("?")?e:e.substring(0,e.indexOf("?")),new RegExp("^(#/|#)"+t+"$").test(e))},e.isBooleanAttr=le,e.isDataSetWidget=T,e.isDimensionProp=pe,e.isStyle=V,e.parseValueByType=function(e,t,n,o){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:o?e:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?ln(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?ln(e):e},e.performDataOperation=function(t,n,o){return new Promise((function(r,a){if(t.execute(i.DataSource.Operation.SUPPORTS_CRUD)){var s=void 0;switch(o.operationType){case e.Live_Operations.UPDATE:s=i.DataSource.Operation.UPDATE_RECORD;break;case e.Live_Operations.INSERT:s=i.DataSource.Operation.INSERT_RECORD;break;case e.Live_Operations.DELETE:s=i.DataSource.Operation.DELETE_RECORD}t.execute(s,n).then((function(e){return function(e,t,n){e.error?n(e):t(e)}(e,r,a)}),a)}else if(t.execute(i.DataSource.Operation.IS_API_AWARE))if("wm.CrudVariable"===t.category){var l="insert"===o.operationType?"create":"delete"===o.operationType?"delete":"update";t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0,operation:l,inputFields:n}).then(r,a)}else t.execute(i.DataSource.Operation.SET_INPUT,n),t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0}).then(r,a);else r(n)}))},e.prepareFieldDefs=function(e,t){var n,i={objects:[],terminals:[]};if(e||(e=[]),t||(t={}),t.setBindingField=!0,t.columnCount=0,n=B(e),j(n,i,"",t),!t||t&&!t.filter)return i.terminals;switch(t.filter){case"all":return i;case"objects":return i.objects;case"terminals":return i.terminals}return i},e.propNameCSSKeyMap=G,e.provideAs=A,e.provideAsDialogRef=function(e){return A(e,b)},e.provideAsWidgetRef=I,e.refreshDataSource=function(e,t){return new Promise((function(n,o){e?e.execute(i.DataSource.Operation.LIST_RECORDS,{filterFields:t.filterFields||{},orderBy:t.orderBy,page:t.page||1,logicalOp:t.condition||""}).then(n,o):o()}))},e.register=X,e.registerFormWidget=function(e,t){var n=Y+e,i=K.get(n);i&&t.forEach((function(e,t){return i.set(t,e)}))},e.setFocusTrap=function(e,t,n){return r.createFocusTrap(e,{onActivate:function(){return e.classList.add("is-active")},onDeactivate:function(){return e.classList.remove("is-active")},allowOutsideClick:t,setReturnFocus:n})},e.setHeaderConfig=sn,e.setHeaderConfigForTable=function(e,t,n,i){n?sn(e,t,n,i):e[i]=t},e.setItemByCompare=function(e,t,n){_.forEach(e,(function(e){if(i.isEqualWithFields(e.value,t,n))return e.selected=!0,!1}))},e.styler=z,e.toggleAllHeaders=function(e){var t=$(e.nativeElement).find(".item-group");t.find(".group-list-item").toggle();var n=t.find("li.list-group-header .app-icon");n&&_.forEach(n,(function(e){(e=$(e)).hasClass("wi-chevron-down")?e.removeClass("wi-chevron-down").addClass("wi-chevron-up"):e.removeClass("wi-chevron-up").addClass("wi-chevron-down")}))},e.transformData=function(e,t){var n,i,o,r,a,s,l;return e=e||[],_.isArray(e)?_.isString(e[0])&&(i=[],_.forEach(e,(function(e){(n={})[t.split(".").join("-")]=e,i.push(n)})),e=i):(_.isString(e)&&(o=t.substring(t.indexOf(".")+1,t.length).split("."),r=[],a=o.length,l=s={},o.forEach((function(t,n){r.forEach((function(e){l=s[e]})),l[t]=n===a-1?e:{},r.push(t)})),e=s),e=[e]),e},e.transformDataWithKeys=function(e){var t=[];if(_.isObject(e[0])||_.isObject(e)&&!(e instanceof Array)){var n=Object.keys(e[0]||e);_.forEach(n,(function(e,n){t.push({key:e,label:e,value:e,index:n+1})}))}return t},e.transformFormData=function(e,t,n,o,r,a){var s=[];if(t){if(t=Kt(t),_.isUndefined(r)&&(r=1),_.isString(t))(t=t.split(",").map((function(e){return e.trim()}))).forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:r+n};Xt(a,e,o,"value"),s.push(o)}));else if(_.isArray(t)&&!_.isObject(t[0]))t.forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:r+n};Xt(a,e,o,"value"),s.push(o)}));else if(t instanceof Array||!_.isObject(t))n||(n=Pt),t.forEach((function(t,l){var c=n===Pt?r+l:S(t,n);if(!_.isUndefined(c)&&!_.isNull(c)){var p=E(t,{field:o.displayField,expression:o.displayExpr,bindExpression:o.bindDisplayExpr},e),u={key:c,label:i.isDefined(p)&&null!==p?p.toString():"",value:n===Pt?t:c,dataObject:t,index:r+l};(o.displayImgSrc||o.bindDisplayImgSrc)&&(u.imgSrc=E(t,{expression:o.displayImgSrc,bindExpression:o.bindDisplayImgSrc},e)),Xt(a,e,u,"dataObject"),s.push(u)}}));else{_.forEach(t,(function(n,o){var l={key:_.trim(o),value:o,label:i.isDefined(n)&&null!==n?n.toString():"",index:r,dataObject:t};Xt(a,e,l,"value"),s.push(l)}))}return s}},e.unsupportedStatePersistenceTypes=["On-Demand","Scroll"],e.updateDeviceView=function(e,t){void 0===t&&(t=!1);var n=e.querySelector(yn(Lt.LEFT_PANEL)),i=e.querySelector(yn(Lt.RIGHT_PANEL)),o=e.querySelector(yn(Lt.HEADER)),r=o&&o.querySelector("."+Lt.SEARCH),a=e.querySelector("."+Lt.CONTENT);Pn(n,a,r,t),n?_n(n,r):$(o).find(yn(Lt.SWIPE_ELEM)).remove(),i&&On(i),r&&En(r,n)},e["\u02750"]=He,e["\u0275a"]=ne,e["\u0275b"]=Ce,e["\u0275c"]=De,e["\u0275d"]=ke,e["\u0275e"]=je,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/transpiler"),require("@wm/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@wm/buildTask",["exports","@wm/transpiler","@wm/core","@angular/compiler"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.buildTask={}),e.wm.transpiler,e.wm.core,e.ng.compiler)}(this,(function(e,t,n,i){"use strict";var o=new n.IDGenerator("wm_carousel_ref_"),r=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},a=r;t.register("wm-carousel",(function(){return{pre:function(e,n){var i=o.nextUid();return n.set("carousel_ref",i),'<div class="app-carousel carousel"><carousel wmCarousel #'+i+'="wmCarousel" '+t.getAttrMarkup(e)+' interval="0" [ngClass]="'+i+'.navigationClass">'},post:function(){return"</carousel></div>"},template:function(e){if(r(e)){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(!i)return;var a=t.getBoundToExpr(i.value);if(!a)return;n.updateTemplateAttrs(e,a,o.value)}},provide:function(e,t){var n=new Map;return n.set("carousel_ref",t.get("carousel_ref")),n}}}));var s=Object.freeze({__proto__:null,default:function(){},"\u02750":a}),l=1;t.register("wm-carousel-content",(function(){return{pre:function(e){return"<slide wmCarouselTemplate "+t.getAttrMarkup(e)+">"},post:function(){return"</slide>"}}})),t.register("wm-carousel-template",(function(){return{requires:["wm-carousel"],pre:function(e,n,i){var o=i.get("carousel_ref");return'<div *ngIf="!'+o+'.fieldDefs">{{'+o+".nodatamessage}}</div>\n <"+"slide wmCarouselTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+o+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="carouselTempRef'+l+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </'+"slide>\n <ng-template #carouselTempRef"+l+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var c=Object.freeze({__proto__:null,default:function(){}});t.register("wm-login",(function(){return{pre:function(e){return"<div wmLogin "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction">'},post:function(){return"</div>"},provide:function(){var e=new Map;return e.set("isLogin",!0),e}}}));var p=Object.freeze({__proto__:null,default:function(){}});t.register("wm-marquee",(function(){return{pre:function(e){return'<marquee onmouseover="this.stop();" onmouseout="this.start();" wmMarquee role="marquee" aria-live="off" '+t.getAttrMarkup(e)+">"},post:function(){return"</marquee>"}}}));var u=Object.freeze({__proto__:null,default:function(){}}),d=new n.IDGenerator("wm_anchor");t.register("wm-anchor",(function(){return{pre:function(e){var n=d.nextUid();return"<a wmAnchor #"+n+'="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</a>"}}}));var h=Object.freeze({__proto__:null,default:function(){}});t.register("wm-audio",(function(){return{pre:function(e){return"<div wmAudio "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var m=Object.freeze({__proto__:null,default:function(){}}),f=new n.IDGenerator("wm_html");t.register("wm-html",(function(){return{pre:function(e){var n=f.nextUid();return"<div wmHtml #"+n+'="wmHtml" [attr.aria-label]="'+n+".hint || 'HTML content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var g=Object.freeze({__proto__:null,default:function(){}});t.register("wm-icon",(function(){return{pre:function(e){return'<span wmIcon aria-hidden="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</span>"}}}));var v=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframe",(function(){return{pre:function(e){return"<div wmIframe "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var y=Object.freeze({__proto__:null,default:function(){}}),b=new n.IDGenerator("wm_label");t.register("wm-label",(function(){return{pre:function(e){var n=b.nextUid();return"<label wmLabel #"+n+'="wmLabel" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</label>"}}}));var w=Object.freeze({__proto__:null,default:function(){}}),P=new n.IDGenerator("wm_picture");t.register("wm-picture",(function(){return{pre:function(e){var n=P.nextUid();return"<img wmPicture #"+n+'="wmPicture" alt="image" wmImageCache="'+(e.get("offline")||"true")+'" [attr.aria-label]="'+n+".hint || 'Image'\" "+t.getAttrMarkup(e)+">"}}}));var O=Object.freeze({__proto__:null,default:function(){}}),S=new n.IDGenerator("wm_spinner");t.register("wm-spinner",(function(){return{pre:function(e){var n=S.nextUid();return"<div wmSpinner #"+n+'="wmSpinner" role="alert" [attr.aria-label]="'+n+'.hint || \'Loading...\'" aria-live="assertive" aria-busy="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var E=Object.freeze({__proto__:null,default:function(){}}),T=function(e,t){return e.attrs.find((function(e){return e.name===t}))},R=T,C=function(e,t){var n=T(e,t);if(n)return n.value},A=C,I=function(e){return new RegExp("bind:("+e+"|"+e+"\\[\\$i])\\.","g")},D=I;t.register("wm-progress-bar",(function(){return{template:function(e){var n=C(e,"dataset"),i=t.getBoundToExpr(n);if(i){var o=C(e,"type"),r=C(e,"datavalue"),a=I(i);o&&o.includes(i)&&(o=o.replace(a,""),T(e,"type").value=o),r&&r.includes(i)&&(r=r.replace(a,""),T(e,"datavalue").value=r)}},pre:function(e){return"<div wmProgressBar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var N=Object.freeze({__proto__:null,default:function(){},"\u02750":R,"\u02751":A,"\u02752":D});t.register("wm-progress-circle",(function(){return{pre:function(e){return"<div wmProgressCircle "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var x=Object.freeze({__proto__:null,default:function(){}}),M=new n.IDGenerator("wm_richtexteditor");t.register("wm-richtexteditor",(function(){return{pre:function(e){var n=M.nextUid();return"<div wmRichTextEditor #"+n+'="wmRichTextEditor" role="textbox" [attr.aria-label]="'+n+".hint || 'Richtext editor'\" "+t.getFormMarkupAttr(e)+">"},post:function(){return"</div>"}}}));var k=Object.freeze({__proto__:null,default:function(){}});t.register("wm-search",(function(){return{pre:function(e){return"<div wmSearch "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var L=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tree",(function(){return{pre:function(e){return"<div wmTree "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var F=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card",(function(){return{pre:function(e){return"<div wmCard "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var j=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-content",(function(){return{pre:function(e){return"<div wmCardContent partialContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var B=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-actions",(function(){return{pre:function(e){return"<div wmCardActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var G=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-footer",(function(){return{pre:function(e){return"<div wmCardFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var V=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chart",(function(){return{pre:function(e){return'<div wmChart redrawable aria-label="'+e.get("type")+' Chart" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var $=Object.freeze({__proto__:null,default:function(){}}),U=new n.IDGenerator("wm_accordion_ref_"),W=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},q=W;t.register("wm-accordion",(function(){return{pre:function(e,n){var i=U.nextUid();return n.set("accordion_ref",i),"<div wmAccordion #"+i+'="wmAccordion" role="tablist" aria-multiselectable="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(W(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),r=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var a=t.getBoundToExpr(o.value);if(!a)return;n.updateTemplateAttrs(e,a,r.value)}},provide:function(e,t){var n=new Map;return n.set("accordion_ref",t.get("accordion_ref")),n}}}));var z=Object.freeze({__proto__:null,default:function(){},"\u02750":q}),H=new n.IDGenerator("wm_accordionpane");t.register("wm-accordionpane",(function(){return{pre:function(e){var n=H.nextUid();return"<div #"+n+'="wmAccordionPane" [attr.aria-expanded]="'+n+'.isActive" wmAccordionPane partialContainer wm-navigable-element="true" role="tab" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Y=Object.freeze({__proto__:null,default:function(){}});t.register("wm-container",(function(){return{pre:function(e){return'<div wmContainer partialContainer wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var K=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridcolumn",(function(){return{pre:function(e){return"<div wmLayoutGridColumn "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Q=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridrow",(function(){return{pre:function(e){return"<div wmLayoutGridRow "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var X=Object.freeze({__proto__:null,default:function(){}});t.register("wm-layoutgrid",(function(){return{pre:function(e){return"<div wmLayoutGrid "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var J=Object.freeze({__proto__:null,default:function(){}}),Z=new n.IDGenerator("wm_panel");t.register("wm-panel",(function(){return{pre:function(e){return"<div wmPanel #"+Z.nextUid()+'="wmPanel" partialContainer wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}})),t.register("wm-panel-footer",(function(){return{pre:function(e){return"<div wmPanelFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ee=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segmented-control",(function(){return{pre:function(e){return"<div wmSegmentedControl "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var te=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segment-content",(function(){return{pre:function(e){return"<li wmSegmentContent partialContainer wmSmoothscroll="+(e.get("smoothscroll")||"false")+' wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var ne=Object.freeze({__proto__:null,default:function(){}}),ie=1;t.register("wm-repeat-template",(function(){return{requires:["wm-accordion","wm-tabs"],pre:function(e,n,i,o){var r=i&&i.get("accordion_ref")||o&&o.get("tabs_ref");if(r)return'<div *ngIf="'+r+".fieldDefs && !"+r+'.fieldDefs.length">{{'+r+".nodatamessage}}</div>\n <div wmRepeatTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+r+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="widgetRef'+ie+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </div>\n <ng-template #widgetRef'+ie+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var oe=Object.freeze({__proto__:null,default:function(){}}),re=new n.IDGenerator("wm_tabs_ref_"),ae=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},se=ae;t.register("wm-tabs",(function(){return{pre:function(e,n){var i=re.nextUid();return n.set("tabs_ref",i),"<div wmTabs #"+i+'="wmTabs" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(ae(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),r=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var a=t.getBoundToExpr(o.value);if(!a)return;n.updateTemplateAttrs(e,a,r.value)}},provide:function(e,t){var n=new Map;return n.set("tabs_ref",t.get("tabs_ref")),n}}}));var le=Object.freeze({__proto__:null,default:function(){},"\u02750":se});t.register("wm-tabpane",(function(){return{pre:function(e){return"<div wmTabPane partialContainer "+t.getAttrMarkup(e)+' wm-navigable-element="true" role="tabpanel">'},post:function(){return"</div>"}}}));var ce=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tile",(function(){return{pre:function(e){return'<div wmTile aria-describedby="Tile" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-wizard",(function(){return{pre:function(e){return'<div wmWizard role="tablist" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ue=Object.freeze({__proto__:null,default:function(){}}),de=new n.IDGenerator("wizard_step_id_");t.register("wm-wizardstep",(function(){return{pre:function(e){var n=de.nextUid();return"<form wmWizardStep #"+n+'="wmWizardStep" '+t.getAttrMarkup(e)+'>\n <ng-template [ngIf]="'+n+'.isInitialized">'},post:function(){return"</ng-template></form>"}}}));var he=Object.freeze({__proto__:null,default:function(){}}),me=new n.IDGenerator("wm_barcodescanner");t.register("wm-barcodescanner",(function(){return{pre:function(e){var n=me.nextUid();return"<button wmBarcodescanner #"+n+'="wmBarcodescanner" [attr.aria-label]="'+n+".hint || 'Barcode scanner'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var fe=Object.freeze({__proto__:null,default:function(){}}),ge=new n.IDGenerator("wm_camera");t.register("wm-camera",(function(){return{pre:function(e){var n=ge.nextUid();return"<button type='button' wmCamera #"+n+'="wmCamera" [attr.aria-label]="'+n+".hint || 'Camera'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ve=Object.freeze({__proto__:null,default:function(){}});t.register("wm-alertdialog",(function(){return{pre:function(e){return'<div wmAlertDialog role="alertdialog" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ye=Object.freeze({__proto__:null,default:function(){}});t.register("wm-confirmdialog",(function(){return{pre:function(e){return'<div wmConfirmDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var be=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialogactions",(function(){return{pre:function(e){return'<ng-template #dialogFooter><div wmDialogFooter data-identfier="actions" '+t.getAttrMarkup(e)+">"},post:function(){return"</div></ng-template>"}}}));var we=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialog",(function(){return{pre:function(e){return"<div wmDialog "+t.getAttrMarkup(e)+' aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}})),t.register("wm-view",(function(){return{pre:function(e){return""},post:function(){return""}}}));var Pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframedialog",(function(){return{pre:function(e){return'<div wmIframeDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _e=Object.freeze({__proto__:null,default:function(){}});t.register("wm-logindialog",(function(){return{pre:function(e){return"<div wmDialog wmLoginDialog "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}}));var Oe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagedialog",(function(){return{pre:function(e,n){var i=e.get("content");e.delete("content");var o=e.get("content.bind");e.delete("content.bind");var r=e.get("load.event");e.delete("load.event");var a="",s="";r&&(a='load.event="'+r+'"'),o?s='content.bind="'+o+'"':i&&(s='content="'+i+'"');var l="";return s&&(n.set("hasPartialContent",!0),l+="<ng-template><div wmContainer #partial partialContainer "+s+' width="100%" height="100%" '+a+">"),"<div wmPartialDialog "+t.getAttrMarkup(e)+">"+l},post:function(e,t){var n="";return t.get("hasPartialContent")&&(n="</div></ng-template>"),n+"</div>"}}}));var Se=Object.freeze({__proto__:null,default:function(){}}),Ee="quickedit",Te="form",Re="dialog",Ce={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},Ae=new Set([n.FormWidgetType.SELECT,n.FormWidgetType.CHECKBOXSET,n.FormWidgetType.RADIOSET,n.FormWidgetType.SWITCH,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.CHIPS,n.FormWidgetType.TYPEAHEAD,n.FormWidgetType.RATING]),Ie=function(e){var t=Ce[e]&&Ce[e][0];return e===n.DataType.BOOLEAN&&(t=n.FormWidgetType.SELECT),[n.FormWidgetType.TEXT,n.FormWidgetType.NUMBER,n.FormWidgetType.SELECT,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.DATE,n.FormWidgetType.TIME,n.FormWidgetType.DATETIME].includes(t)?t:n.FormWidgetType.TEXT},De=new n.IDGenerator("formfield_"),Ne=function(e){var n=new Map;return e.has("focus.event")||e.set("focus.event",""),e.has("blur.event")||e.set("blur.event",""),e.forEach((function(t,i){i.endsWith(".event")&&("focus.event"===i?t="_onFocusField($event);"+t:"blur.event"===i&&(t="_onBlurField($event);"+t),n.set(i,t),e.delete(i))})),t.getFormMarkupAttr(n)},xe=Ne,Me=new Map([[n.FormWidgetType.SELECT,["Select Min value","Select Max value","Select value"]],[n.FormWidgetType.DATETIME,["Select Min date time","Select Max date time","Select date time"]],[n.FormWidgetType.TIME,["Select Min time","Select Max time","Select time"]],[n.FormWidgetType.DATE,["Select Min date","Select Max date","Select date"]],[n.FormWidgetType.TEXTAREA,["","","Enter value"]],[n.FormWidgetType.RICHTEXT,["","","Enter value"]],[n.FormWidgetType.COLORPICKER,["Select Color","Select Color","Select Color"]],[n.FormWidgetType.CHIPS,["","","Type here..."]],[n.FormWidgetType.PASSWORD,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.NUMBER,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.TEXT,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.CURRENCY,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.AUTOCOMPLETE,["","","Search"]]]),ke=function(e,t,n){var i=1===n?"maxplaceholder":"placeholder",o=e.get(i);o||""===o||(o=Me.get(t)&&Me.get(t)[n])&&e.set(i,o)},Le=ke,Fe=function(e,t){var i=e.get("name"),o=(e.get("key")||i||"").trim(),r=t.isMaxWidget?'formControlName="'+o+'_max"':t.isInList?'[formControlName]="'+t.counter+'._fieldName"':'formControlName="'+o+'"',a=t.isMaxWidget?"#formWidgetMax":"#formWidget",s=i?t.isMaxWidget?'name="'+i+'_formWidgetMax"':'name="'+i+'_formWidget"':"",l='[ngClass]="'+e.get("ngclass")+'"',c='[class.hidden]="!'+t.pCounter+".isUpdateMode && "+t.counter+".viewmodewidget !== 'default'\" "+r+" "+t.eventsTmpl+" "+l+" "+a+" "+s;return n.getFormWidgetTemplate(t.widgetType,c,e,{counter:t.counter,pCounter:t.pCounter})},je=Fe,Be=function(e,t,i,o,r,a){if(!("true"===e.get("is-range")))return Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r,isInList:a});var s=n.isMobileApp()?"col-xs-6":"col-sm-6";return'<div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r})+'</div>\n <div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:r,isMaxWidget:!0})+"</div>"},Ge=Be,Ve=function(e,t,i){if("true"===e.get("is-related"))return i+".getDisplayExpr()";if(t===n.FormWidgetType.PASSWORD)return"'********'";var o,r=i+".value";return t===n.FormWidgetType.DATETIME||t===n.FormWidgetType.TIMESTAMP?r+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MM-dd hh:mm:ss a'":t===n.FormWidgetType.TIME?r+=" | toDate:"+i+".formWidget.timepattern || 'hh:mm a'":t===n.FormWidgetType.DATE?r+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MMM-dd'":t===n.FormWidgetType.RATING||t===n.FormWidgetType.UPLOAD?"":(o=t,Ae.has(o)&&"All Fields"===e.get("datafield")?i+".getDisplayExpr()":i+".getCaption()")},$e=Ve,Ue=function(e){return{requires:["wm-form","wm-liveform","wm-livefilter","wm-list"],pre:function(i,o,r,a,s,l){var c=De.nextUid(),p=r||a||s,u=p&&p.get("form_reference")||"form",d=i.get("widget")||n.FormWidgetType.TEXT,h=e?"form-field":"filter-field",m="wmform-field-error-"+n.generateGUId(),f=e?'<p *ngIf="'+c+"._control?.invalid && "+c+"._control?.touched && "+u+'.isUpdateMode"\n class="help-block text-danger" aria-hidden="false" role="alert"\n aria-live="assertive" [attr.aria-label]="'+c+'.validationmessage" id="'+m+'"><span aria-hidden="true" [textContent]="'+c+'.validationmessage"></span></p>':"",g=d===n.FormWidgetType.UPLOAD?"":Ne(i),v=n.isMobileApp()?"col-xs-12":"col-sm-12",y=u===(l&&l.get("parent_form_reference"));return i.set("__errormsg",m),i.set("__widgetType",d),i.delete("widget"),o.set("counter",c),"true"===i.get("is-range")?(ke(i,d,0),ke(i,d,1)):ke(i,d,2),'<div data-role="'+h+'" [formGroup]="'+u+'.ngform" wmFormField captionPosition #'+c+'="wmFormField" widgettype="'+d+'" '+t.getFormMarkupAttr(i)+'>\n <div class="live-field form-group app-composite-widget clearfix caption-{{'+u+'.captionposition}}" widget="'+d+'">\n <label [hidden]="!'+c+'.displayname" class="app-label control-label formfield-label {{'+u+'._captionClass}}"\n [ngStyle]="{width: '+u+".captionsize}\" [ngClass]=\"{'text-danger': "+c+"._control?.invalid && "+c+"._control?.touched && "+u+".isUpdateMode,\n required: "+u+".isUpdateMode && "+c+'.required}" [textContent]="'+c+'.displayname"> </label>\n <div [ngClass]="'+c+".displayname ? "+u+"._widgetClass : '"+v+'\'">\n <label class="form-control-static app-label"\n [hidden]="'+u+".isUpdateMode || "+c+".viewmodewidget === 'default' || "+c+".widgettype === 'upload'\" [innerHTML]=\""+Ve(i,d,c)+'"></label>\n '+Be(i,d,g,c,u,y)+'\n <span aria-hidden="true" *ngIf="'+c+'.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <p *ngIf="!('+c+"._control?.invalid && "+c+"._control?.touched) && "+u+'.isUpdateMode"\n class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="'+c+'.hint"></p>\n '+f+"\n </div>\n </div>"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n},imports:function(e){var t=n.getRequiredFormWidget(e.get("__widgetType")||e.get("type"));return e.delete("__widgetType"),[t,"wm-form"]}}},We=Ue;t.register("wm-form-field",Ue.bind(this,!0)),t.register("wm-filter-field",Ue.bind(this,!1));var qe=Object.freeze({__proto__:null,default:function(){},"\u02750":xe,"\u02751":Le,"\u02752":je,"\u02753":Ge,"\u02754":$e,"\u02755":We}),ze=function(e){return{pre:function(n){return'<div wmFormAction name="'+(n.get("name")||n.get("key"))+'" '+t.getAttrMarkup(n)+" "+e+">"},post:function(){return"</div>"}}},He=ze;t.register("wm-form-action",ze.bind(this,"")),t.register("wm-filter-action",ze.bind(this,' update-mode="true" '));var Ye,Ke=Object.freeze({__proto__:null,default:function(){},"\u02750":He}),Qe=new n.IDGenerator("form_"),Xe=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-richtexteditor","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-upload","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker","wm-table"]),Je=function(e){void 0===e&&(e=[]),e.forEach((function(e){if("wm-form-field"===e.name&&Ye++,Xe.has(e.name)){var t=e.attrs.find((function(e){return"key"===e.name||"name"===e.name}));if(!(t=t&&t.value)){var n=e.attrs.find((function(e){return"datavalue"===e.name}));if(n&&n.value){(n=n.value.match(/\((.*)\)/))&&n.length>1&&(t=n[1].replace(/["']/g,""))}}e.attrs.push(new i.Attribute("formControlName",t,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("wmFormWidget","",1,1,1,void 0,void 0))}Je(e.children)}))},Ze=Je,et=function(e){if(e.get("formdata.bind")){var n=t.getDataSource(e.get("formdata.bind"));n&&e.set("formdatasource.bind",n)}},tt=et,nt=function(e){return void 0===e&&(e=""),{requires:["wm-livetable","wm-login"],template:function(e){Ye=0,Je(e.children)},pre:function(n,i,o,r){var a,s,l=r&&r.get("isLogin")?"app-login":"",c=Qe.nextUid(),p=n.get("dependson")?'dependson="'+n.get("dependson")+'"':"",u="page"===n.get("formlayout")?"app-device-liveform panel liveform-inline":"";n.delete("dependson");var d='<form wmForm data-role="'+l+'" '+e+" #"+c+' ngNativeValidate [formGroup]="'+c+'.ngform" [noValidate]="'+c+".validationtype !== 'html'\"\n class=\""+u+'" [class]="'+c+'.captionAlignClass" [autocomplete]="'+c+".autocomplete ? 'on' : 'off'\" captionposition="+n.get("captionposition");if(n.set("numberOfFields",""+Ye),i.set("counter",c),et(n),"dialog"===n.get("formlayout")){s=o?o.get("liveform_dialog_id"):"liveform_dialog_id_"+c,n.set("dialogId",s);var h=new Map;return["title","title.bind","iconclass","iconclass.bind","width"].forEach((function(e){n.get(e)&&h.set(e,n.get(e))})),n.set("width","100%"),a=t.getAttrMarkup(n),'<div data-identifier="liveform" init-widget class="app-liveform liveform-dialog" '+p+' dialogid="'+s+'">\n <div wmDialog class="app-liveform-dialog" name="'+s+'" role="form" '+t.getAttrMarkup(h)+' modal="true">\n <ng-template #dialogBody>\n '+d+" "+a+">"}var m="",f="";if("page"===n.get("formlayout")){var g="device_liveform_header_"+c,v=new Map;v.set("title",n.get("title")),v.set("backbtnclick.event",n.get("backbtnclick.event")),f='<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" class="navbar-btn btn-primary btn-transparent" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="'+c+'.invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="btn.disabled"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !'+c+".isUpdateMode : "+c+'.isUpdateMode"></button>\n </ng-template>',m='<header wmMobileNavbar name="'+g+'" '+t.getAttrMarkup(v)+'>\n <ng-container *ngFor="let btn of '+c+'.buttonArray" [ngTemplateOutlet]="buttonRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </header>\n <div class="form-elements panel-body" >'}return d+" "+(a=t.getAttrMarkup(n))+" "+p+">\n "+f+" "+m},post:function(e){return"dialog"===e.get("formlayout")?"</form></ng-template></div></div>":"page"===e.get("formlayout")?"</div></form>":"</form>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n}}},it=nt;t.register("wm-form",nt),t.register("wm-liveform",(function(){return nt("wmLiveForm")})),t.register("wm-livefilter",(function(){return nt("wmLiveFilter")}));var ot=Object.freeze({__proto__:null,default:function(){},"\u02750":Ze,"\u02751":tt,"\u02752":it});t.register("wm-calendar",(function(){return{pre:function(e){return'<div wmCalendar redrawable style="width:100%" aria-label="'+(e.get("view")?e.get("view")+" view":"month view")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chips",(function(){return{pre:function(e){return'<ul wmChips role="listbox" '+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var at=Object.freeze({__proto__:null,default:function(){}});t.register("wm-colorpicker",(function(){return{pre:function(e){return"<div wmColorPicker "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var st=Object.freeze({__proto__:null,default:function(){}});t.register("wm-currency",(function(){return{pre:function(e){return"<div wmCurrency "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-buttongroup",(function(){return{pre:function(e){return'<div wmButtonGroup role="group" aria-labelledby="button group" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ct=Object.freeze({__proto__:null,default:function(){}}),pt=new n.IDGenerator("wm_button");t.register("wm-button",(function(){return{pre:function(e){var n=pt.nextUid();return"<button wmButton #"+n+'="wmButton" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ut=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkbox",(function(){return{pre:function(e){return"<div wmCheckbox "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var dt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkboxset",(function(){return{pre:function(e){return'<ul role="group" wmCheckboxset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var ht=Object.freeze({__proto__:null,default:function(){}});t.register("wm-composite",(function(){return{pre:function(e){return"<div wmComposite captionPosition "+t.setChildAttrs(e)+" "+t.getAttrMarkup(e)+">"},post:function(){return"</div"+t.clearChildAttrs()+">"}}}));var mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-number",(function(){return{pre:function(e){return"<div wmNumber "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-radioset",(function(){return{pre:function(e){return'<ul role="radiogroup" wmRadioset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-select",(function(){return{pre:function(e){return"<wm-select "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-select>"}}}));var vt=Object.freeze({__proto__:null,default:function(){}}),yt=new n.IDGenerator("wm_switch");t.register("wm-switch",(function(){return{pre:function(e){var i=yt.nextUid();return"<div wmSwitch #"+i+'="wmSwitch" [attr.aria-label]="'+i+".hint || 'Switch button'\" "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-text",(function(){return{pre:function(e){return"<wm-input "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-input>"}}}));var wt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-textarea",(function(){return{pre:function(e){return"<wm-textarea "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-textarea>"}}}));var Pt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-datetime",(function(){return{pre:function(e){return"<div wmDateTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var _t=Object.freeze({__proto__:null,default:function(){}});t.register("wm-date",(function(){return{pre:function(e){return"<div wmDate "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Ot=Object.freeze({__proto__:null,default:function(){}});t.register("wm-time",(function(){return{pre:function(e){return"<div wmTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var St=Object.freeze({__proto__:null,default:function(){}});t.register("wm-fileupload",(function(){return{pre:function(e){if(e.get("select.event")){var n=t.getDataSource(e.get("select.event"));e.set("datasource.bind",n)}return"<div wmFileUpload "+t.getAttrMarkup(e)+' role="input">'},post:function(){return"</div>"}}}));var Et=Object.freeze({__proto__:null,default:function(){}});t.register("wm-rating",(function(){return{pre:function(e){return"<div wmRating "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Tt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-slider",(function(){return{pre:function(e){return"<div wmSlider "+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Rt=Object.freeze({__proto__:null,default:function(){}});function Ct(e,t,n,o){var r=e.attrs.find((function(e){return e.name===t}));r&&n.attrs.push(new i.Attribute(o,r.value,r.sourceSpan,r.keySpan,r.valueSpan,void 0,void 0))}t.register("wm-media-list",(function(){return{template:function(e){var t,n=e.attrs.find((function(e){return"dataset"===e.name})),o=function(e){void 0===e&&(e=[]),e.forEach((function(e){e.name&&"wm-list"!==e.name&&(e.attrs.forEach((function(e){e.value.startsWith("bind:"+t+".data[$i]")?e.value=e.value.replace(t+".data[$i]","item"):e.value.startsWith("bind:"+t)&&(e.value=e.value.replace(t,"item"))})),o(e.children))}))};n&&n.value.startsWith("bind:")&&(t=n.value.replace("bind:","")),t&&o(e.children);var r=e.children.find((function(e){return e instanceof i.Element&&"wm-media-template"===e.name}));null!=r&&(Ct(r,"width",e,"thumbnailwidth"),Ct(r,"height",e,"thumbnailheight"))},pre:function(e){return"<div wmMediaList "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var At=Object.freeze({__proto__:null,default:function(){}});t.register("wm-media-template",(function(){return{pre:function(){return'<ng-template #mediaListTemplate let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var It=Object.freeze({__proto__:null,default:function(){}});t.register("wm-list",(function(){return{requires:["wm-form","wm-liveform"],template:function(e){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(i){var r=t.getBoundToExpr(i.value);r&&n.updateTemplateAttrs(e,r,o.value,"itemRef.")}},pre:function(e,n,i,o){var r=i||o;return n.set("form_reference",r&&r.get("form_reference")),"<div wmList wmLiveActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("parent_form_reference",t.get("form_reference")),n}}})),t.register("wm-listtemplate",(function(){return{pre:function(){return'<ng-template #listTemplate let-item="item" let-$index="$index" let-itemRef="itemRef" let-$first="$first" let-$last="$last" let-currentItemWidgets="currentItemWidgets" >'},post:function(){return"</ng-template>"}}})),t.register("wm-list-action-template",(function(){return{template:function(e){e.attrs.find((function(e){return"position"===e.name})).value;e.children.filter((function(e){return e instanceof i.Element&&"wm-button"===e.name})).forEach((function(t){var n,o,r,a;n="position",o=t,r="swipe-position",(a=e.attrs.find((function(e){return e.name===n})))&&o.attrs.push(new i.Attribute(r,a.value,a.sourceSpan,a.keySpan,a.valueSpan,void 0,void 0))}))},pre:function(e,n){return"left"===e.get("position")?'<ng-template #listLeftActionTemplate>\n <li class="app-list-item-action-panel app-list-item-left-action-panel actionMenu" '+t.getAttrMarkup(e)+">":"right"===e.get("position")?'<ng-template #listRightActionTemplate>\n <li class="app-list-item-action-panel app-list-item-right-action-panel actionMenu" '+t.getAttrMarkup(e)+">":void 0},post:function(){return"</li></ng-template>"}}}));var Dt=Object.freeze({__proto__:null,default:function(){}}),Nt=new n.IDGenerator("liveform_dialog_id_");t.register("wm-livetable",(function(){return{pre:function(e,n){var i=Nt.nextUid();return n.set("counter",i),"<div wmLiveTable "+t.getAttrMarkup(e)+' dialogid="'+i+'">'},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("liveform_dialog_id",t.get("counter")),n}}}));var xt=Object.freeze({__proto__:null,default:function(){}}),Mt=new n.IDGenerator("wm_message");t.register("wm-message",(function(){return{pre:function(e){return'<p wmMessage tabindex="0" #'+Mt.nextUid()+'="wmMessage" '+t.getAttrMarkup(e)+">"},post:function(){return"</p>"}}}));var kt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-breadcrumb",(function(){return{pre:function(e){return"<ol wmBreadcrumb "+t.getAttrMarkup(e)+">"},post:function(){return"</ol>"}}}));var Lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-menu",(function(){return{pre:function(e){return"<div wmMenu dropdown "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav-item",(function(){return{pre:function(e){return'<li wmNavItem role="listitem" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var jt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav",(function(){return{pre:function(e){return'<ul wmNav data-element-type="wmNav" data-role="page-header" role="list" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var Bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-navbar",(function(){return{pre:function(e){return'<nav wmNavbar data-element-type="wmNavbar" role="navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var Gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-popover",(function(){return{requires:["wm-table"],pre:function(e,n,i){var o;if("inline"!==e.get("contentsource")){var r=e.get("content"),a=e.get("content.bind"),s="";r?s='content="'+r+'"':a&&(s='content.bind="'+a+'"'),o="<div wmContainer #partial partialContainer "+s+">",n.set("hasPopoverContent",!0)}var l="<wm-popover wmPopover "+t.getAttrMarkup(e)+">";return l+="<ng-template "+(i?'let-row="row"':"")+'><button class="popover-start"></button>',o&&(l+=""+(o||"")),l},post:function(e,t){var n="";return t.get("hasPopoverContent")&&(n+="</div>"),n+'<button class="popover-end"></button></ng-template></'+"wm-popover>"}}}));var Vt=Object.freeze({__proto__:null,default:function(){}}),$t=function(e,t){return e&&e.children.find((function(e){return e instanceof i.Element&&e.name===t}))},Ut=$t,Wt=function(e){return new i.Element(e,[],[],Qt,Qt,Qt)},qt=Wt,zt=function(e,t,n){var o=new i.Attribute(t,n,Qt,Qt,Qt,void 0,void 0);e.attrs.push(o)},Ht=zt,Yt=function(e,t){var n;if(t)return _.forEach(t.children,(function(t){return t instanceof i.Element&&(t.name===e?n=t:t.children&&(n=Yt(e,t))),!n})),n},Kt=Yt,Qt={},Xt=new n.IDGenerator("wm_page");t.register("wm-page",(function(){return{template:function(e){var t=$t($t(e,"wm-content"),"wm-page-content");if(t||(t=Yt("wm-page-content",Yt("wm-content",e))),t){var o=Wt("ng-container");if(zt(o,"*ngIf","compilePageContent"),o.children=o.children.concat(t.children),o.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),t.children=[o],n.isMobileApp()){var r=Wt("div");zt(r,"wmPageContentLoader",""),zt(r,"*ngIf","!showPageContent"),t.children.push(r)}}},pre:function(e){var n=Xt.nextUid();return"<div wmPage #"+n+'="wmPage" data-role="pageContainer" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Jt=Object.freeze({__proto__:null,default:function(){},"\u02750":Ut,"\u02751":qt,"\u02752":Ht,"\u02753":Kt}),Zt=new n.IDGenerator("wm_layout");t.register("wm-layout",(function(){return{pre:function(e){var n=Zt.nextUid();return"<div wmLayout #"+n+'="wmLayout" data-role="pageContainer" [attr.aria-label]="'+n+".hint || 'Main page content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var en=Object.freeze({__proto__:null,default:function(){}}),tn="router-outlet";t.register("wm-router-outlet",(function(){return{pre:function(e){return'<div wmRouterOutlet name="wmRouterOutlet" '+t.getAttrMarkup(e)+"><"+tn+' (activate)="onActivate($event)">'},post:function(){return"</router-outlet></div>"}}}));var nn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagination",(function(){return{pre:function(e){return'<nav wmPagination data-identifier="pagination" aria-label="Page navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var on=Object.freeze({__proto__:null,default:function(){}});t.register("wm-content",(function(){return{pre:function(e){return'<main wmContent data-role="page-content" role="main" '+t.getAttrMarkup(e)+">"},post:function(){return"</main>"}}}));var rn=Object.freeze({__proto__:null,default:function(){}}),an=new n.IDGenerator("wm_footer");t.register("wm-footer",(function(){return{pre:function(e){var n=an.nextUid();return"<footer wmFooter #"+n+'="wmFooter" partialContainer data-role="page-footer" role="contentinfo" [attr.aria-label]="'+n+".hint || 'Page footer'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</footer>"}}}));var sn=Object.freeze({__proto__:null,default:function(){}}),ln=new n.IDGenerator("wm_header");t.register("wm-header",(function(){return{pre:function(e){var n=ln.nextUid();return"<header wmHeader #"+n+'="wmHeader" partialContainer data-role="page-header" role="banner" [attr.aria-label]="'+n+".hint || 'Page header'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var cn=Object.freeze({__proto__:null,default:function(){}}),pn=new n.IDGenerator("wm_left_panel");t.register("wm-left-panel",(function(){return{pre:function(e){var n=pn.nextUid();return"<aside wmLeftPanel #"+n+'="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="'+n+".hint || 'Left navigation panel'\" wmSmoothscroll=\""+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var un=Object.freeze({__proto__:null,default:function(){}});t.register("wm-mobile-navbar",(function(){return{pre:function(e){return"<header wmMobileNavbar "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var dn=Object.freeze({__proto__:null,default:function(){}}),hn=new n.IDGenerator("wm_right_panel");t.register("wm-right-panel",(function(){return{pre:function(e){var n=hn.nextUid();return"<aside wmRightPanel #"+n+'="wmRightPanel" partialContainer data-role="page-right-panel" role="complementary" [attr.aria-label]="'+n+".hint || 'Right navigation panel'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var mn=Object.freeze({__proto__:null,default:function(){}});Object.create;function fn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var gn=function(e){return new i.Element(e,[],[],wn,wn,wn)},vn=gn,yn=function(e,t,n){var o=new i.Attribute(t,n,wn,wn,wn,void 0,void 0);e.attrs.push(o)},bn=yn,wn={};t.register("wm-page-content",(function(){return{template:function(e){var t,n;try{for(var o=fn(e.attrs),r=o.next();!r.done;r=o.next()){var a=r.value;if("spa"===a.name&&"true"===a.value){var s=gn("ng-container");yn(s,"*ngIf","compilePageContent"),s.children=s.children.concat(e.children),s.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),e.children=[s];break}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},pre:function(e){return"<div wmPageContent "+(e.get("spa")?"wmSpaPage":"")+' wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Pn=Object.freeze({__proto__:null,default:function(){},"\u02750":vn,"\u02751":bn});t.register("wm-mobile-tabbar",(function(){return{pre:function(e){return"<div wmMobileTabbar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _n=Object.freeze({__proto__:null,default:function(){}}),On=new n.IDGenerator("wm_top_nav");t.register("wm-top-nav",(function(){return{pre:function(e){var n=On.nextUid();return"<section wmTopNav #"+n+'="wmTopNav" partialContainer data-role="page-topnav" role="navigation" [attr.aria-label]="'+n+".hint || 'Second level navigation'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var Sn=Object.freeze({__proto__:null,default:function(){}}),En={},Tn=function(e){return new i.Element(e,[],[],En,En,En)},Rn=Tn,Cn=function(e,t,n){var o=new i.Attribute(t,n,En,En,En,void 0,void 0);e.attrs.push(o)},An=Cn;t.register("wm-partial",(function(){return{template:function(e){var t=Tn("ng-container");Cn(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return'<section wmPartial data-role="partial" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var In=Object.freeze({__proto__:null,default:function(){},"\u02750":Rn,"\u02751":An});t.register("wm-param",(function(){return{pre:function(e){return"<div wmParam hidden "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-prefab",(function(){return{pre:function(e){return'<section wmPrefab redrawable data-role="perfab" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var Nn=Object.freeze({__proto__:null,default:function(){}}),xn={},Mn=function(e){return new i.Element(e,[],[],xn,xn,xn)},kn=Mn,Ln=function(e,t,n){var o=new i.Attribute(t,n,xn,xn,xn,void 0,void 0);e.attrs.push(o)},Fn=Ln;t.register("wm-prefab-container",(function(){return{template:function(e){var t=Mn("ng-container");Ln(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return"<div wmPrefabContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var jn=Object.freeze({__proto__:null,default:function(){},"\u02750":kn,"\u02751":Fn});t.register("wm-table-action",(function(){return{pre:function(e){return'<div name="'+(e.get("name")||e.get("key"))+'" wmTableAction '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Bn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-table-column-group",(function(){return{pre:function(e){return"<div wmTableColumnGroup "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Gn=Object.freeze({__proto__:null,default:function(){}}),Vn=new n.IDGenerator("data_table_form_"),$n=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker"]),Un=function(e){void 0===e&&(e=[]);e.forEach((function(e){if($n.has(e.name)){if("wm-checkbox"===e.name&&e.attrs.filter((function(e){return"formControlName"===e.name})).length)return;e.attrs.push(new i.Attribute("[ngModelOptions]","{standalone: true}",1,1,1,void 0,void 0))}Un(e.children)}))},Wn=Un,qn=function(e,i){var o,r,a=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING),s=e.get("binding"),l=e.get("type")||"string",c=e.get("filterdataset.bind");if("autocomplete"===e.get("filterwidget")){if(c)o='dataset.bind="'+c+'" datasource.bind="'+t.getDataSource(c)+'"';r="submit.event=\"changeFn('"+s+"')\""}var p='#filterWidget formControlName="'+s+'_filter" '+o+" "+r+" change.event=\"changeFn('"+s+"')\"\n disabled.bind=\"isDisabled('"+s+"')\"";return'<ng-template #filterTmpl let-changeFn="changeFn" let-isDisabled="isDisabled">\n <div class="input-group '+a+'" data-col-identifier="'+s+'">\n '+(""+n.getFormWidgetTemplate(a,p,e,{inputType:"filterinputtype"}))+'\n <span class="input-group-addon filter-clear-icon" *ngIf="'+i+".showClearIcon('"+s+'\')">\n <button class="btn-transparent btn app-button" aria-label="Clear button" type="button" (click)="'+i+".clearRowFilter('"+s+'\')">\n <i class="app-icon wi wi-clear" aria-hidden="true"></i>\n </button>\n </span>\n <span class="input-group-addon" dropdown container="body" (onShown)="'+i+".adjustContainer('"+s+'\');">\n <button class="btn-transparent btn app-button" type="button" dropdownToggle><i class="app-icon wi wi-filter-list"></i></button>\n <ul class="matchmode-dropdown dropdown-menu" *dropdownMenu>\n <li *ngFor="let matchMode of '+i+".matchModeTypesMap['"+l+'\']"\n [ngClass]="{active: matchMode === ('+i+".rowFilter['"+s+"'].matchMode || "+i+".matchModeTypesMap['"+l+'\'][0])}">\n <a href="javascript:void(0);" (click)="'+i+".onFilterConditionSelect('"+s+'\', matchMode)" [innerText]="'+i+'.matchModeMsgs[matchMode]"></a>\n </li>\n </ul>\n </span>\n </div></ng-template>'},zn=qn,Hn=function(e){var t="";return e.forEach((function(e,n){n.endsWith(".event")&&(t+=n+'="'+e+'" ')})),t},Yn=Hn,Kn=function(e){var n=new Map;return["disabled","disabled.bind"].forEach((function(t){e.get(t)&&(n.set(t,e.get(t)),e.delete(t))})),t.getAttrMarkup(n)},Qn=Kn,Xn=function(e,t,i,o){var r,a={},s=e.get("binding"),l=e.get("edit-widget-type")||((r={type:e.get("type"),"related-entity-name":e.get("related-entity-name"),"primary-key":e.get("primary-key")})["related-entity-name"]&&r["primary-key"]?n.FormWidgetType.SELECT:Ce[r.type]&&Ce[r.type][0]||n.FormWidgetType.TEXT),c="",p="",u="";l===n.FormWidgetType.UPLOAD?(a.uploadProps={formName:Vn.nextUid(),name:s},a.counter=o):(c=t?"#inlineWidgetNew":"#inlineWidget",p=t?'formControlName="'+s+'_new"':'formControlName="'+s+'"',u="wmFormWidget"),a.inputType="editinputtype";var d=t?"#inlineWidgetTmplNew":"#inlineWidgetTmpl",h=c+" "+u+' key="'+s+'" data-field-name="'+s+'" '+p+" "+(l===n.FormWidgetType.UPLOAD?"":Hn(e))+" "+Kn(e),m=t?"getPendingSpinnerStatusNew":"getPendingSpinnerStatus";return"<ng-template "+d+' let-row="row" let-getControl="getControl" let-getValidationMessage="getValidationMessage" let-'+m+'="'+m+'">\n <div data-col-identifier="'+s+'" >\n '+n.getFormWidgetTemplate(l,h,e,a)+"\n "+Zn(i)+'\n <div class="overlay" *ngIf="'+m+'()"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>\n <span class="sr-only" *ngIf="getValidationMessage()">{{getValidationMessage()}}</span>\n </div>\n </ng-template>'},Jn=Xn,Zn=function(e){var t="";switch(e){case"bottom":t='<span class="help-block text-danger" *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">{{getValidationMessage()}}</span>';break;case"hover":default:t='<span placement="top" container="body" tooltip="{{getValidationMessage()}}" class="text-danger wi wi-error"\n *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">\n </span>'}return t},ei=Zn,ti=function(e){var t="row.getProperty('"+e.get("binding")+"')",i=e.get("custompipeformat")||e.get("formatpattern"),o="";switch(!n.isDateTimeType(e.get("type"))||i&&"None"!==i||(e.set("formatpattern","toDate"),e.delete("datepattern"),i="toDate"),i){case"toDate":o="{{"+t+" | toDate: colDef.datepattern}}";break;case"toCurrency":e.get("currencypattern")&&(o="{{"+t+" | toCurrency: '"+e.get("currencypattern"),e.get("fractionsize")?o+="': "+e.get("fractionsize")+"}}":o+="'}}");break;case"numberToString":e.get("fractionsize")&&(o="{{"+t+" | numberToString: '"+e.get("fractionsize")+"'}}");break;case"stringToNumber":o="{{"+t+" | stringToNumber}}";break;case"timeFromNow":o="{{"+t+" | timeFromNow}}";break;case"prefix":e.get("prefix")&&(o="{{"+t+" | prefix: '"+e.get("prefix")+"'}}");break;case"suffix":e.get("suffix")&&(o="{{"+t+" | suffix: '"+e.get("suffix")+"'}}");break;default:n.checkIsCustomPipeExpression(i)&&(o="{{"+t+" | "+i+" : row}}")}return o},ni=ti;t.register("wm-table-column",(function(){return{requires:["wm-table"],template:function(e,t){if(e.children.length){if(1===e.children.length&&e.children[0]instanceof i.Text&&0===e.children[0].value.trim().length)return;t.set("customExpression",!0),Un(e.children)}},pre:function(e,i,o){var r="",a="",s="",l="";if(o){var c=o.get("table_reference");r="multicolumn"===o.get("filtermode")&&"false"!==e.get("searchable")?qn(e,c):"";var p=o.get("editmode"),u=p!==Re&&p!==Te&&"true"!==e.get("readonly");a=u?Xn(e,!1,o.get("errorstyle"),c):"",s=u&&p===Ee&&"false"!==o.get("shownewrow")?Xn(e,!0,e.get("errorstyle")):"",l=' [formGroup]="'+c+'.ngform" '}var d=e.get("formatpattern"),h='<ng-template #customExprTmpl let-row="row" let-colDef="colDef" let-editRow="editRow" let-deleteRow="deleteRow" let-addNewRow="addNewRow">',m="",f="";return i.get("customExpression")?(e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'">'):(d&&"None"!==d||n.isDateTimeType(e.get("type")))&&(f=ti(e))&&(i.set("customExpression",!0),e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'" title="'+f+'">'+f),"<div wmTableColumn "+t.getAttrMarkup(e)+" "+l+">\n "+r+"\n "+a+"\n "+s+"\n "+m},post:function(e,t){var n="";return t.get("customExpression")&&(n="</div></ng-template>"),n+"</div>"},imports:function(e){var t=e.get("edit-widget-type"),i=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING);return[n.getRequiredFormWidget(t),n.getRequiredFormWidget(i),"wm-table"]}}}));var ii=Object.freeze({__proto__:null,default:function(){},"\u02750":Wn,"\u02751":zn,"\u02752":Yn,"\u02753":Qn,"\u02754":Jn,"\u02755":ei,"\u02756":ni}),oi=function(e){var t="anchor"===e.get("widget-type")?"a":"button",i="anchor"===e.get("widget-type")?"wmAnchor":"wmButton",o=e.get("display-name")||e.get("title")||"Collapse/Expand";return'<ng-template #rowExpansionActionTmpl let-row="row">\n <'+t+" "+i+"\n "+n.getRowActionAttrs(e)+'\n class="'+e.get("class")+' row-expansion-button"\n iconclass="'+e.get("collapseicon")+'"\n type="button" aria-label="'+o+'"></'+t+">\n </ng-template>"},ri=oi;t.register("wm-table-row",(function(){return{pre:function(e){return"<div wmTableRow "+t.getAttrMarkup(e)+">\n "+oi(e)+'\n <ng-template #rowExpansionTmpl let-row="row" let-rowDef="rowDef" let-containerLoad="containerLoad">\n <div wmContainer partialContainer content.bind="rowDef.content" load.event="containerLoad(widget)"\n [ngStyle]="{\'height\': rowDef.height, \'overflow-y\': \'auto\'}">\n <div *ngFor="let param of rowDef.partialParams | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>'},post:function(){return"</div></ng-template></div>"}}}));var ai=Object.freeze({__proto__:null,default:function(){},"\u02750":ri}),si=function(){return'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>'},li=si,ci=function(e){var t=e.get("action"),i=t?' click.event.delayed="'+t+'" ':"",o=t&&t.includes("editRow(")?'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>':"",r=t?t.includes("editRow(")?"edit edit-row-button":t.includes("deleteRow(")?"delete delete-row-button":"":"",a=e.get("tabindex")?'tabindex="'+e.get("tabindex")+'"':"",s="anchor"===e.get("widget-type")?"a":"button";return'<ng-template #rowActionTmpl let-row="row">\n <'+s+" "+("anchor"===e.get("widget-type")?"wmAnchor":"wmButton")+' data-action-key="'+e.get("key")+'"\n '+n.getRowActionAttrs(e)+'\n class="row-action row-action-button '+e.get("class")+" "+r+'"\n iconclass="'+e.get("iconclass")+'"\n '+i+"\n "+a+'\n type="button"></'+s+">\n "+o+"\n </ng-template>"},pi=ci;t.register("wm-table-row-action",(function(){return{pre:function(e){return"<div wmTableRowAction "+t.getAttrMarkup(e)+">\n "+ci(e)},post:function(){return"</div>"}}}));var ui=Object.freeze({__proto__:null,default:function(){},"\u02750":li,"\u02751":pi}),di=new n.IDGenerator("table_"),hi=0;function mi(e,t){var n=0;e.forEach((function(e){var o=e.name,r=void 0!==t?t:n;"wm-table-column"!==o&&"wm-table-column-group"!==o||(e.attrs.push(new i.Attribute("index",""+hi,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("headerIndex",""+r,1,1,1,void 0,void 0)),"wm-table-column-group"===o&&mi(e.children,n),hi++,n++)}))}t.register("wm-table",(function(){return{template:function(e,i){if(e.children.length){var o=e.children.some((function(e){return"wm-table-column"===e.name||"wm-table-column-group"===e.name}));mi(e.children),i.set("isdynamictable",o?"false":"true");var r=e.children.some((function(e){return"wm-table-row"===e.name}));i.set("isrowexpansionenabled",r?"true":"false")}else i.set("isdynamictable","true");var a=e.attrs.find((function(e){return"dataset"===e.name})),s=e.attrs.find((function(e){return"name"===e.name}));if(a){var l=t.getBoundToExpr(a.value);l&&n.updateTemplateAttrs(e,l,s.value,"","row")}},pre:function(e,n){var i=di.nextUid();return n.set("counter",i),e.set("isdynamictable",n.get("isdynamictable")),e.set("isrowexpansionenabled",n.get("isrowexpansionenabled")),e.set("table_reference",i),'<div wmTable="'+i+'" wmTableFilterSort wmTableCUD #'+i+' data-identifier="table" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("table_reference",t.get("counter")),n.set("filtermode",e.get("filtermode")),n.set("errorstyle",e.get("errorstyle")),n.set("editmode",e.get("editmode")),n.set("shownewrow",e.get("shownewrow")),n}}}));var fi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-video",(function(){return{pre:function(e){return"<div wmVideo "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var gi=Object.freeze({__proto__:null,default:function(){}}),vi="parentLinearLayout.spacing";t.register("wm-linearlayout",(function(){return{requires:["wm-linearlayout"],pre:function(e,n,i){var o=e.get("spacing");return e.set("spacing",o&&"0"!==o||!i?o:i.get(vi)),"<div wmLinearLayout "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set(vi,e.get("spacing")),n}}}));var yi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-linearlayoutitem",(function(){return{pre:function(e){return"<div wmLinearLayoutItem "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var bi=Object.freeze({__proto__:null,default:function(){}});e.accordionBuild=z,e.accordionPaneBuild=Y,e.alertDlgBuild=ye,e.anchorBuild=h,e.audioBuild=m,e.barcodeScannerBuild=fe,e.breadcrumbBuild=Lt,e.buttonBuild=ut,e.buttonGroupBuild=ct,e.calendarBuild=rt,e.cameraBuild=ve,e.cardActionsBuild=G,e.cardBuild=j,e.cardContentBuild=B,e.cardFooterBuild=V,e.carouselBuild=s,e.carouselTemplateBuild=c,e.chartBuild=$,e.checkboxBuild=dt,e.checkboxSetBuild=ht,e.chipsBuild=at,e.colorPickerBuild=st,e.compositeBuild=mt,e.confirmDlgBuild=be,e.containerBuild=K,e.contentBuild=rn,e.currencyBuild=lt,e.dateBuild=Ot,e.dateTimeBuild=_t,e.dlgBuild=Pe,e.dlgFooterBuild=we,e.fileUploadBuild=Et,e.footerBuild=sn,e.formActionBuild=Ke,e.formBuild=ot,e.formFieldBuild=qe,e.headerBuild=cn,e.htmlBuild=g,e.iconBuild=v,e.iframeBuild=y,e.iframeDlgBuild=_e,e.initComponentsBuildTask=function(){},e.labelBuild=w,e.layoutBuild=en,e.leftPanelBuild=un,e.lgBuild=J,e.lgcolBuild=Q,e.lgrowBuild=X,e.linearLayoutBuild=yi,e.linearLayoutItemBuild=bi,e.listBuild=Dt,e.liveTableBuild=xt,e.loginBuild=p,e.loginDlgBuild=Oe,e.marqueeBuild=u,e.mediaListBuild=At,e.mediaListItemBuild=It,e.menuBuild=Ft,e.messageBuild=kt,e.mobileNavbarBuild=dn,e.navBuild=Bt,e.navItemBuild=jt,e.navbarBuild=Gt,e.numberBuild=ft,e.pageBuild=Jt,e.pageContentBuild=Pn,e.paginationBuild=on,e.panelBuild=ee,e.partialBuild=In,e.partialDlgBuild=Se,e.partialParamBuild=Dn,e.pictureBuild=O,e.popoverBuild=Vt,e.prefabBuild=Nn,e.prefabContainerBuild=jn,e.progressBarBuild=N,e.progressCircleBuild=x,e.radiosetBuild=gt,e.ratingBuild=Tt,e.repeatTemplateBuild=oe,e.rightPanelBuild=mn,e.routerOutletBuild=nn,e.rteBuild=k,e.searchBuild=L,e.segContentBuild=ne,e.segControlBuild=te,e.selectBuild=vt,e.sliderBuild=Rt,e.spinnerBuild=E,e.switchBuild=bt,e.tabBarBuild=_n,e.tabPaneBuild=ce,e.tableActionBuild=Bn,e.tableBuild=fi,e.tableColumnBuild=ii,e.tableColumnGroupBuild=Gn,e.tableRowActionBuild=ui,e.tableRowBuild=ai,e.tabsBuild=le,e.textAreaBuild=Pt,e.textBuild=wt,e.tileBuild=pe,e.timeBuild=St,e.topNavBuild=Sn,e.treeBuild=F,e.videoBuild=gi,e.wizardBuild=ue,e.wizardStepBuild=he,Object.keys(t).forEach((function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("angular-imask"),require("@wm/components/base"),require("@wm/core"),require("rxjs")):"function"==typeof define&&define.amd?define("@wm/components/input",["exports","@angular/core","@angular/common","@angular/forms","angular-imask","@wm/components/base","@wm/core","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input={}),e.ng.core,e.ng.common,e.ng.forms,e["angular-imask"],e.wm.components.base,e.wm.core,e.rxjs)}(this,(function(e,t,n,i,o,r,a,s){"use strict";
44
44
  /*! *****************************************************************************
45
45
  Copyright (c) Microsoft Corporation.
46
46
 
@@ -250,7 +250,7 @@
250
250
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
251
251
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
252
252
  PERFORMANCE OF THIS SOFTWARE.
253
- ***************************************************************************** */var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function l(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var c=function(){i.register("wm-chart",new Map([["aggregation",Object.assign({value:"none"},i.PROP_STRING)],["aggregationcolumn",i.PROP_STRING],["areaviewtype",Object.assign({value:"stack"},i.PROP_STRING)],["barspacing",Object.assign({value:"medium"},i.PROP_STRING)],["bubblesize",i.PROP_STRING],["centerlabel",i.PROP_STRING],["class",i.PROP_STRING],["customcolors",i.PROP_ANY],["dataset",i.PROP_ANY],["datasource",i.PROP_STRING],["donutratio",Object.assign({value:"medium"},i.PROP_STRING)],["formattype",{value:"",PROP_STRING:i.PROP_STRING}],["groupby",i.PROP_STRING],["height",{value:"210px",PROP_STRING:i.PROP_STRING}],["highlightpoints",i.PROP_BOOLEAN],["iconclass",i.PROP_STRING],["interpolation",Object.assign({value:"linear"},i.PROP_STRING)],["labelthreshold",Object.assign({value:.01},i.PROP_NUMBER)],["labeltype",Object.assign({value:"percent"},i.PROP_STRING)],["legendtype",Object.assign({value:"furious"},i.PROP_STRING)],["linethickness",i.PROP_STRING],["loadingdatamsg",Object.assign({value:"Loading..."},i.PROP_STRING)],["name",i.PROP_STRING],["nodatamessage",Object.assign({value:"No Data Available."},i.PROP_STRING)],["offset",i.PROP_STRING],["offsetbottom",Object.assign({value:55},i.PROP_NUMBER)],["offsetleft",Object.assign({value:75},i.PROP_NUMBER)],["offsetright",Object.assign({value:25},i.PROP_NUMBER)],["offsettop",Object.assign({value:25},i.PROP_NUMBER)],["orderby",i.PROP_STRING],["reducexticks",Object.assign({value:!0},i.PROP_BOOLEAN)],["shape",Object.assign({value:"circle"},i.PROP_STRING)],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["showlabels",Object.assign({value:"outside"},i.PROP_STRING)],["showlabelsoutside",Object.assign({value:!0},i.PROP_BOOLEAN)],["showlegend",Object.assign({value:"top"},i.PROP_STRING)],["showvalues",Object.assign({value:!1},i.PROP_BOOLEAN)],["showxaxis",Object.assign({value:!0},i.PROP_BOOLEAN)],["showxdistance",Object.assign({value:!1},i.PROP_BOOLEAN)],["showyaxis",Object.assign({value:!0},i.PROP_BOOLEAN)],["showydistance",Object.assign({value:!1},i.PROP_BOOLEAN)],["staggerlabels",Object.assign({value:!1},i.PROP_BOOLEAN)],["subheading",i.PROP_STRING],["theme",i.PROP_STRING],["title",i.PROP_STRING],["tooltips",Object.assign({value:!0},i.PROP_BOOLEAN)],["type",i.PROP_STRING],["viewtype",Object.assign({value:"Grouped"},i.PROP_STRING)],["xaxisdatakey",i.PROP_STRING],["xaxislabel",i.PROP_STRING],["xaxislabeldistance",Object.assign({value:12},i.PROP_NUMBER)],["xdateformat",i.PROP_STRING],["xdomain",Object.assign({value:"Default"},i.PROP_STRING)],["xnumberformat",i.PROP_STRING],["xunits",i.PROP_STRING],["yaxisdatakey",i.PROP_STRING],["yaxislabel",i.PROP_STRING],["yaxislabeldistance",Object.assign({value:12},i.PROP_NUMBER)],["ydomain",Object.assign({value:"Default"},i.PROP_STRING)],["ynumberformat",i.PROP_STRING],["yunits",i.PROP_STRING]]))},p=["Column","Line","Area","Cumulative Line","Bar","Pie","Donut","Bubble"],u=["circle","square","diamond","cross","triangle-up","triangle-down"],d=["01/01/2001","01/01/2002","01/01/2003"],h={Terrestrial:{colors:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],tooltip:{backgroundColor:"#de7d28",textColor:"#FFFFFF"}},Annabelle:{colors:["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],tooltip:{backgroundColor:"#2e306f",textColor:"#FFFFFF"}},Azure:{colors:["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"],tooltip:{backgroundColor:"#3182bd",textColor:"#FFFFFF"}},Retro:{colors:["#0ca7a1","#ffa615","#334957","#acc5c2","#988f90","#8accc9","#515151","#f27861","#36c9fd","#794668","#0f709d","#0d2738","#44be78","#4a1839","#6a393f","#557d8b","#6c331c","#1c1c1c","#861500","#09562a"],tooltip:{backgroundColor:"#80513a",textColor:"#FFFFFF"}},Mellow:{colors:["#f0dcbf","#88c877","#aeb918","#2e2c23","#ddddd2","#dfe956","#4c963b","#5d3801","#e1eec3","#cd8472","#fcfab3","#9a4635","#9295ad","#2e3f12","#565677","#557d8b","#4f4d02","#0c0c1b","#833324","#24120e"],tooltip:{backgroundColor:"#7c9e73",textColor:"#FFFFFF"}},Orient:{colors:["#a80000","#cc6c3c","#f0e400","#000084","#fccc6c","#009c6c","#cc309c","#78cc00","#fc84e4","#48e4fc","#4878d8","#186c0c","#606060","#a8a8a8","#000000","#d7d7d7","#75a06e","#190d0b","#888888","#694b84"],tooltip:{backgroundColor:"#c14242",textColor:"#FFFFFF"}},GrayScale:{colors:["#141414","#353535","#5b5b5b","#848484","#a8a8a8","#c3c3c3","#e0e0e0","#c8c8c8","#a5a5a5","#878787","#656565","#4e4e4e","#303030","#1c1c1c","#4f4f4f","#3b3b3b","#757575","#606060","#868686","#c1c1c1"],tooltip:{backgroundColor:"#575757",textColor:"#FFFFFF"}},Flyer:{colors:["#3f454c","#5a646e","#848778","#cededf","#74c4dd","#0946ed","#380bb1","#000ff0","#f54a23","#1db262","#bca3aa","#ffa500","#a86b32","#63a18c","#56795e","#934343","#b75f5f","#752d2d","#4e1111","#920606"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}},Luminosity:{colors:["#FFFFFF","#e4e4e4","#00bcd4","#f0dd2f","#00aabf","#018376","#e91e63","#39e5d4","#ff6d6d","#00ff76","#ff9800","#969696","#ff4200","#e00000","#95cbe5","#5331ff","#fff4a7","#e7a800","#0061e4","#d5e7ff"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}}},m=["xaxislabel","yaxislabel","xunits","yunits","xnumberformat","xdateformat","ynumberformat","showvalues","showlabels","viewtype","areaviewtype","staggerlabels","reducexticks","offsettop","offsetbottom","offsetright","offsetleft","barspacing","xaxislabeldistance","yaxislabeldistance","theme","labeltype","donutratio","showlabelsoutside","showxdistance","showydistance","shape","nodatamessage","captions","showxaxis","showyaxis","centerlabel","customcolors","showlegend","legendtype","xdomain","ydomain","tooltips","linethickness","highlightpoints","interpolation","labelthreshold"],f={small:.3,medium:.5,large:.8},g={small:.3,medium:.6,large:.7},v=_.invert(f),y=_.invert(g),b={Thousand:{prefix:"K",divider:1e3},Million:{prefix:"M",divider:1e6},Billion:{prefix:"B",divider:1e9}},w="#preview-chart",P=["Column","Line","Pie","Bar","Donut","Bubble"],O=["Line","Area","Cumulative Line"],S=["Cumulative Line","Area"],E="Europe",T="Asia",R="America",C="Australia",A=function(e){return"Bar"===e},I=function(e){return"Donut"===e},D=function(e){return"Bubble"===e},N=function(e){return"Area"===e},x=function(e){return function(e){return"Pie"===e}(e)||I(e)},M=function(e){return _.includes(P,e)||!_.includes(p,e)},k=function(e){return _.includes(O,e)},L=function(e,t){return"value"===t?f[e]:"key"===t?v[e]:void 0},F=function(e,t){return"value"===t?g[e]:"key"===t?y[e]:void 0},j=function(e){return function(e,t,n){var i=[],o=[],r=[],a=[],s=[],l=[],c=[],p=[],d=[],h=[];switch(e){case"jsonFormat":i=[{x:"01/01/2001",y:4e6},{x:"01/01/2002",y:1e6},{x:"01/01/2003",y:5e6}],o=[{x:"01/01/2001",y:3e6},{x:"01/01/2002",y:4e6},{x:"01/01/2003",y:7e6}],r=[{x:"01/01/2001",y:2e6},{x:"01/01/2002",y:8e6},{x:"01/01/2003",y:6e6}],h[0]={values:i,key:E},t>=2&&(h[1]={values:o,key:T}),t>=3&&(h[2]={values:r,key:R});break;case"lineChartFormat":i=[{x:1,y:4e6},{x:2,y:1e6},{x:3,y:5e6}],o=[{x:1,y:3e6},{x:2,y:4e6},{x:3,y:7e6}],r=[{x:1,y:2e6},{x:2,y:8e6},{x:3,y:6e6}],h[0]={values:i,key:E},t>=2&&(h[1]={values:o,key:T}),t>=3&&(h[2]={values:r,key:R});break;case"arrayFormat":a=[[1,4e6],[2,1e6],[3,5e6]],s=[[1,3e6],[2,4e6],[3,7e6]],l=[[1,2e6],[2,8e6],[3,6e6]],h[0]={values:a,key:E},t>=2&&(h[1]={values:s,key:T}),t>=3&&(h[2]={values:l,key:R});break;case"bubbleFormat":c=[{x:80.66,y:33739900,size:78,shape:n="random"===n?u[Math.floor(Math.random()*u.length)]:n},{x:79.84,y:81902300,size:90,shape:n},{x:78.6,y:5523100,size:45,shape:n}],p=[{x:72.73,y:79716200,size:98,shape:n},{x:80.05,y:61801600,size:20,shape:n},{x:72.49,y:73137200,size:34,shape:n}],d=[{x:68.09,y:33739900,size:45,shape:n},{x:81.55,y:7485600,size:78,shape:n},{x:68.6,y:14185e4,size:56,shape:n}],h[0]={values:c,key:E},t>=2&&(h[1]={values:p,key:T}),t>=3&&(h[2]={values:d,key:R});break;case"pieChartFormat":h=[{x:E,y:1e6},{x:T,y:2e6},{x:R,y:3e6},{x:C,y:4e6}]}return h}(function(e){var t=e.type;return function(e){return"Line"===e}(t)?"lineChartFormat":x(t)?"pieChartFormat":D(t)?"bubbleFormat":M(t)?"jsonFormat":"arrayFormat"}(e),_.split(e.yaxisdatakey,",").length,e.shape)},B=function(e,t){return!("Min"!==e[t+"domain"]||(n=e.type,!function(e){return"Column"===e}(n)&&!N(n)));var n},G=function(e){return!(!_.isFinite(e.min)||!_.isFinite(e.max))},V=function(e){var t=Math.floor(e);return Math.abs(e)-t>0?e-.1:t-1},U=function(e,t){return isNaN(parseInt(e,10))?t(e,"value"):e},W=function(e,t){return e=e||"%x",d3.time.format(e)(new Date(moment(moment(t).format()).valueOf()))},q=function(e,t){var n,i,o;return n=d3.format(e)(t),e?(i=b[e]&&b[e].divider||0,(o=b[e]&&b[e].prefix)&&0!==i&&(n=d3.format(".2f")(t/i)+o)):n=t>=1e3?d3.format(".1s")(t):t,n},z=function(e){return"false"!==e&&!1!==e&&("true"===e||!0===e||"hide"!==e)},H=function(e,t,n,i){e.tooltip.contentGenerator((function(e){var o,r=e.data.x;return o=q(t.ynumberformat,e.data.y),x(n.type)&&(i=e.data.x,r=""),'<table><tbody><tr class="value"><b>'+r+'</b></tr><tr><td class="legend-color-guide"><div style="background-color:'+e.color+';"></div></td><td class="key">'+i+'</td><td class="value">'+o+"</td></tr></tbody></table>"}))},Y=function(e,t,n,i,o){i=function(e,t){return t&&!r.isEmptyObject(t)||(t={}),_.forEach(m,(function(n){_.isUndefined(t[n])&&(t[n]=e[n])})),t}(e,i);var a,s,l,c,u,v,y,b,w,P=[],O={},S={};switch(e.type){case"Column":v=U(i.barspacing,L)||f.medium,a=nv.models.multiBarChart().x((function(e){return e.x})).y((function(e){return e.y})).reduceXTicks(i.reducexticks).rotateLabels(0).showControls(!1).stacked("Stacked"===i.viewtype).groupSpacing(v);break;case"Cumulative Line":a=nv.models.cumulativeLineChart().x((function(e){return e[0]})).y((function(e){return e[1]})).showControls(!1).useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Line":a=nv.models.lineChart().useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Area":a=nv.models.stackedAreaChart().x((function(e){return e[0]})).y((function(e){return e[1]})).clipEdge(!0).showControls(!1).style(i.areaviewtype).useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Bar":v=U(i.barspacing,L)||f.medium,a=nv.models.multiBarHorizontalChart().x((function(e){return e.x})).y((function(e){return e.y})).showControls(!1).stacked("Stacked"===i.viewtype).showValues(i.showvalues).groupSpacing(v);break;case"Pie":case"Donut":c=function(e,t,n){var i={};switch(e){case"hide":i.showlabels=!1;break;case"inside":i.showlabels=!0,i.showlabelsoutside=!1;break;case"outside":i.showlabels=!0,i.showlabelsoutside=!0}return i}(i.showlabels,i.showlabelsoutside),u=U(i.donutratio,F)||g.medium,a=nv.models.pieChart().x((function(e){return e.x})).y((function(e){return e.y})).showLabels(c.showlabels).labelType(i.labeltype).valueFormat(d3.format("%")).title(i.centerlabel).labelThreshold(i.labelthreshold||.01).labelsOutside(c.showlabelsoutside),I(e.type)&&a.donut(!0).donutRatio(u),"key-value"===i.labeltype&&a.labelType((function(e){return e.data.x+" "+e.data.y}));break;case"Bubble":a=nv.models.scatterChart().x((function(e){return e.x})).y((function(e){return e.y})).showDistX(i.showxdistance).showDistY(i.showydistance)}return t&&(O.min=t.min.x||t.min[0],O.max=t.max.x||t.max[0],G(O)&&(O.min=V(O.min),a.xDomain([O.min,O.max]))),n&&(S.min=n.min.y||n.min[1],S.max=n.max.y||n.max[1],G(S)&&(S.min=V(S.min),a.yDomain([S.min,S.max]))),a.legend.vers(i.legendtype&&i.legendtype.toLowerCase()||"furious"),_.includes(p,e.type)||(a=nv.models.multiBarChart().x((function(e){return e.x})).y((function(e){return e.y}))),x(e.type)?("percent"===i.labeltype?a.valueFormat(d3.format("%")):a.valueFormat((function(e){return q(i.ynumberformat,e)})),H(a,i,e)):(a.showXAxis(i.showxaxis).showYAxis(i.showyaxis),s=i.xaxislabel||r.prettifyLabels(e.xaxisdatakey)||"x caption",l=i.yaxislabel||r.prettifyLabels(e.yaxisdatakey)||"y caption",e.yaxisdatakey&&e.yaxisdatakey.split(",").length>1&&(w=!0),w||D(e.type)||H(a,i,e,l),s+=i.xunits?"("+i.xunits+")":"",l+=i.yunits?"("+i.yunits+")":"",a.xAxis.axisLabel(s).axisLabelDistance(i.xaxislabeldistance).staggerLabels(i.staggerlabels),i.xdateformat||o&&!D(e.type)?k(e.type)?a.xAxis.tickFormat((function(t){return b=o?d[t-1]:e.xDataKeyArr[t],W(i.xdateformat,b)})):a.xAxis.tickFormat((function(e){return W(i.xdateformat,e)})):i.xnumberformat?a.xAxis.tickFormat((function(e){return q(i.xnumberformat,e)})):k(e.type)&&a.xAxis.tickFormat((function(t){return e.xDataKeyArr[t]})),a.yAxis.axisLabel(l).axisLabelDistance(i.yaxislabeldistance).staggerLabels(i.staggerlabels).tickFormat((function(e){return q(i.ynumberformat,e)})),A(e.type)&&a.valueFormat((function(e){return q(i.ynumberformat,e)}))),_.isString(i.customcolors)&&i.customcolors&&(P=_.split(i.customcolors,",")),_.isArray(i.customcolors)&&(P=i.customcolors),y=z(i.showlegend),a.showLegend(y).margin({top:i.offsettop,right:i.offsetright,bottom:i.offsetbottom,left:i.offsetleft}).color(P.length?P:h[i.theme].colors),a.tooltip.enabled(i.tooltips),e.message=i.nodatamessage||"No data found",a.noData(e.message),k(e.type)&&e.highlightpoints&&a.dispatch.on("stateChange",(function(){setTimeout((function(){return K(e)}),100)})),!e.showlegend||"Donut"!==e.type&&"Pie"!==e.type||"right"===e.showlegend&&a.legendPosition("right"),a},K=function(e,t){var n=t?null:e.$id;k(e.type)&&(function(e,t){t=t||1.5,(e?d3.select("#wmChart"+e+" svg"):d3.select(w+" svg")).selectAll(".nv-line").style({"stroke-width":t})}(n,e.linethickness),function(e,t){var n=e?d3.select("#wmChart"+e+" svg"):d3.select(w+" svg");t?n.selectAll(".nv-point").style({"stroke-width":"6px","fill-opacity":".95","stroke-opacity":".95"}):n.selectAll(".nv-point").style({"stroke-width":"0px","fill-opacity":"0"})}(n,e.highlightpoints)),e.showlegend&&function(e,t,n){var i,o=z(e.showlegend),r=n?"#wmChart"+n:w,a=d3.select(r+" .nv-legendWrap");if(o&&a[0][0]&&"bottom"===t){var s=a[0][0].getBoundingClientRect().height,l=d3.select(r+" .nv-wrap"),c=l&&l.attr("transform")?l.attr("transform").replace(/, /g,","):"",p=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(c);a.attr("transform","translate(0 , "+(0===(i=$(r+" svg>.nvd3.nv-wrap")[0].getBoundingClientRect().height)&&(i=$(r+" svg")[0].getBoundingClientRect().height-(s+15)),i-s-5+")")),p&&l.attr("transform","translate("+p[1]+",5)")}}(e,e.showlegend,n)},Q={widgetType:"wm-chart",hostClass:"app-chart"},X="none",J=["aggregation","aggregationcolumn","groupby","orderby"],Z={Column:"rect.nv-bar",Bar:"g.nv-bar",Area:".nv-stackedarea .nv-point","Cumulative Line":".nv-cumulativeLine .nv-scatterWrap path.nv-point",Line:".nv-lineChart .nv-scatterWrap path.nv-point",Pie:".nv-pieChart .nv-slice path",Donut:".nv-pieChart .nv-slice path",Bubble:".nv-scatterChart .nv-point-paths path"},ee={fontunit:"font-size",fontsize:"font-size",color:"fill",fontfamily:"font-family",fontweight:"font-weight",fontstyle:"font-style",textdecoration:"text-decoration"},te={average:"AVG",count:"COUNT",maximum:"MAX",minimum:"MIN",sum:"SUM"},ne=function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&e},ie=ne,oe=function(e){var t,n=[],i=[];return _.forEach(_.split(e,","),(function(e){t=_.split(e,":"),n.push(t[0]),i.push(t[1])})),{columns:n,orders:i}},re=oe,ae=function(e){return e?e.replace(/\./g,"$"):null},se=ae,le=function(e,t){d3.select("#wmChart"+t+" svg").selectAll("text").style(e)},ce=le,pe=function(e){var t=90*(e.startAngle+e.endAngle)/Math.PI-90;return t>90?t-180:t},ue=pe,de=function(e){function t(t,n){var o=e.call(this,t,Q)||this;return o.app=n,o.iconclass="",o.nonPrimaryColumns=[],o.xDataKeyArr=[],o.chartData=[],o._processedData=[],o._subsciptions=[],o._plotChartProxy=_.debounce(o.plotChartProxy.bind(o),100),o.redraw=o._plotChartProxy.bind(o),i.styler(o.nativeElement,o,i.APPLY_STYLES_TYPE.CONTAINER,["fontsize","fontunit","color","fontfamily","fontweight","fontstyle","textdecoration"]),o.$id=o.widgetId||Math.random(),r.removeAttr(o.nativeElement,"title"),o.chartReady=!1,o.binddataset=o.nativeElement.getAttribute("dataset.bind"),o._subsciptions.push(o.app.subscribe("toggle-variable-state",o.handleLoading.bind(o))),o._subsciptions.push(o.app.subscribe("iscroll-start",(function(){o.hideTooltip()}))),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.isGroupByEnabled=function(){return!(!this.groupby||this.groupby===X)},t.prototype.isValidAxis=function(){return!this.binddataset||this.xaxisdatakey&&this.yaxisdatakey},t.prototype.isAggregationEnabled=function(){return!(!this.isGroupByEnabled()||this.aggregation===X||!this.aggregationcolumn)},t.prototype.isDataFilteringEnabled=function(){return this.isAggregationEnabled()||!this.isVisuallyGrouped&&this.orderby},t.prototype.getxAxisVal=function(e,t,n){var i=_.get(e,t);return k(this.type)&&!r.isNumberType(this.xAxisDataType)?(this.xDataKeyArr.push(i),n):i},t.prototype.getXMinMaxValues=function(e){if(e){var t={};return t.min=_.minBy(e.values,(function(e){return e.x||e[0]})),t.max=_.maxBy(e.values,(function(e){return e.x||e[0]})),t}},t.prototype.getYMinMaxValues=function(e){var t={},n=[],i=[];if(e)return _.forEach(e,(function(e){n.push(_.minBy(e.values,(function(e){return e.y||e[1]}))),i.push(_.maxBy(e.values,(function(e){return e.y||e[1]})))})),t.min=_.minBy(n,(function(e){return e.y||e[1]})),t.max=_.maxBy(i,(function(e){return e.y||e[1]})),t},t.prototype.getValidData=function(e){return 1===e.length&&void 0===e[0]?[]:e},t.prototype.valueFinder=function(e,t,n,i,o){var r,a=this.getxAxisVal(e,t,i),s=_.get(e,n),l=parseFloat(s)||s,c=parseFloat(e[this.bubblesize])||2,p={};return M(this.type)?(p.x=a,p.y=l,D(this.type)&&(p.size=c,p.shape=o||"circle")):(r=this.type,_.includes(S,r)&&(p=[a,l])),p._dataObj=e,p},t.prototype.setErrMsg=function(e){this.showNoDataMsg&&(this.showContentLoadError=!0,this.invalidConfig=!0,this.errMsg="")},t.prototype.processChartData=function(){var e=this;if(this.sampleData=j(this),this.xDataKeyArr=[],!this.binddataset)return this.xDataKeyArr=d,this.sampleData;if(!this.chartData||!this.chartData.length)return[];var t,n=[],i=[],o=[],a=this.xaxisdatakey,s=this.yaxisdatakey?this.yaxisdatakey.split(","):[],l=this.chartData;return _.isArray(l)&&(x(this.type)?(t=s[0],n=_.map(l,(function(n,i){if(!r.isEmptyObject(l[i]))return e.valueFinder(l[i],a,t)})),n=this.getValidData(n)):(D(this.type)&&(i="random"===this.shape?u:this.shape),s.forEach((function(t,s){o=_.map(l,(function(n,o){if(!r.isEmptyObject(l[o]))return e.valueFinder(l[o],a,t,o,_.isArray(i)&&i[s]||e.shape)})),o=e.getValidData(o),n.push({values:o,key:r.prettifyLabels(t)})})))),n},t.prototype.setChartData=function(e){e&&(this._processedData=e)},t.prototype.getChartData=function(){return this._processedData},t.prototype.getVisuallyGroupedData=function(e,t){var n,i,o=this,r={},a=[],s=[],l=N(this.type),c=_.first(_.split(this.yaxisdatakey,","));return this.xDataKeyArr=[],e=_.orderBy(e,_.split(this.groupby,",")),this.orderby&&(n=oe(this.orderby),e=_.orderBy(e,n.columns,n.orders)),e=_.groupBy(e,t),l&&(i=_.max(_.map(e,(function(e){return e.length})))),_.forEach(e,(function(e,t){a=N?_.fill(new Array(i),[0,0]):[],_.forEachRight(e,(function(e,t){a[t]=o.valueFinder(e,o.xaxisdatakey,c,t)})),r={key:t,values:a},s.push(r)})),s},t.prototype.getGroupingDetails=function(){var e=this;if(this.isGroupByEnabled()&&!this.isAggregationEnabled()){var t,n,i,o=!1,r=[],a=this.groupby&&this.groupby!==X?this.groupby.split(","):[],s=this.yaxisdatakey?this.yaxisdatakey.split(","):[];return a.length>1&&(a.every((function(n,r){return e.xaxisdatakey===n||-1!==$.inArray(n,s)||(o=!0,t=n,i=r,a.splice(i,1),!1)})),t&&r.push(t),a.length&&(r=_.concat(r,a))),this.xaxisdatakey!==this.aggregationcolumn&&r.push(this.xaxisdatakey),_.forEach(s,(function(t){t!==e.aggregationcolumn&&r.push(t)})),n=r.join(","),this.isVisuallyGrouped=o,{expression:n,isVisuallyGrouped:o,visualGroupingColumn:t}}return{expression:"",isVisuallyGrouped:!1,visualGroupingColumn:""}},t.prototype.getAggregatedData=function(e){var t,n,i,o=this,a=this.datasource,s=this.yaxisdatakey?this.yaxisdatakey.split(","):[],l={},c=[],p=[];a&&(this.isGroupByEnabled()&&(p=_.split(this.groupby,",")),this.orderby&&(t=_.replace(this.orderby,/:/g," "),c=_.uniq(_.concat(c,p,[this.aggregationcolumn])),i=oe(this.orderby).columns,_.forEach(_.intersection(c,i),(function(e){n=ae(e),t=_.replace(t,e,n)}))),this.isAggregationEnabled()&&(l.groupByFields=p,l.aggregations=[{field:this.aggregationcolumn,type:te[this.aggregation],alias:ae(this.aggregationcolumn)}]),a.execute("getAggregatedData",{aggregations:l,sort:t}).then((function(t){var n=[],i=ae(o.aggregationcolumn),a=ae(o.xaxisdatakey),l=[];s.forEach((function(e){return l.push(ae(e))})),_.forEach(t.body.content,(function(e){var t={};o.isAggregationEnabled()&&(t[o.aggregationcolumn]=e[i],t[o.aggregationcolumn]=_.get(e,i)||_.get(e,o.aggregationcolumn)),t[o.xaxisdatakey]=_.get(e,a)||_.get(e,o.xaxisdatakey),s.forEach((function(n,i){t[n]=e[l[i]],t[n]=_.get(e,l[i])||_.get(e,n)})),n.push(t)})),o.chartData=n,r.triggerFn(e)}),(function(){o.chartData=[],o.setErrMsg("MESSAGE_ERROR_FETCH_DATA"),r.triggerFn(e)})))},t.prototype.setLabelsMaxWidth=function(){var e,t,n,i,o,r,a,s,l,c,p,u,d=parseInt(this.fontsize,10)||12,h=A(this.type);(e=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick").find("text")).each((function(){var e,n,r=$(this);if(r.text()&&"1"===r.css("opacity"))return e=r.parent().attr("transform").split(","),i=parseFloat(e[0].substr(10)),o=parseFloat(e[1]||"0"),!h&&i>0?n=i:o>0&&(n=o),t?(t=n-t,!1):(t=n,!0)})),h?(c=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-barsWrap")[0],p=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-y")[0],u=$("#wmChart"+this.$id+" svg")[0],r=c?c.getBoundingClientRect().height:0,l=p?u.getBoundingClientRect().width-p.getBoundingClientRect().width:u.getBoundingClientRect().width,n=Math.round(l/d),t<d&&(a=r/d,s=Math.ceil(this.chartData.length/a),d3.select("#wmChart"+this.$id+" svg").select("g.nv-x").selectAll("g.tick").select("text").each((function(e,t){t%s!=0&&d3.select(this).attr("opacity",0)})))):n=Math.round(t/d),n=Math.abs(n),e.each((function(){this.textContent.length>n&&(this.textContent=this.textContent.substr(0,n)+"...")}))},t.prototype.getDefaultColumns=function(){var e,t,n,i,o=[],a=this.datasource.execute(r.DataSource.Operation.GET_PROPERTIES_MAP)||[];for(n=0;n<a.length&&o.length<=2;n+=1)e=a[n].type,!a[n].isRelated&&r.isNumberType(e)?o.push(a[n].fieldName):"string"!==e||t||(t=a[n].fieldName);return t&&o.length>0&&!D(this.type)&&(i=o[0],o[0]=t,o[1]=i),o},t.prototype.attachClickEvent=function(){var e,t=this;d3.select("#wmChart"+this.$id+" svg").selectAll(Z[this.type]).style("pointer-events","all").on("click",(function(n,i){switch(t.type){case"Column":case"Bar":e=n._dataObj;break;case"Pie":case"Donut":e=n.data._dataObj;break;case"Area":case"Cumulative Line":case"Line":e=n[0]._dataObj;break;case"Bubble":e=n.data.point[4]._dataObj}t.selecteditem=e,t.invokeEventCallback("select",{$event:d3.event,selectedChartItem:n,selectedItem:t.selecteditem})}))},t.prototype.postPlotProcess=function(e){var t,n,i,o,a=this,s={},l=this.$element;K(this),x(this.type)?this.showlabelsoutside||(n=(t=d3.select("#wmChart"+this.$id+" svg")).select(".nv-pieLabels").selectAll(".nv-label"),i=t.select(".nv-pie").selectAll(".nv-slice"),o=[],i&&i.length&&(i.each((function(){d3.select(this).attr("transform",(function(e){o.push(pe(e))}))})),n.each((function(e,t){var n=d3.select(this);$(n[0][0]).find("text").attr("transform","rotate("+o[t]+")")})))):this.setLabelsMaxWidth(),_.forEach(ee,(function(e,t){s[e]="fontsize"===t||"fontunit"===t?a.fontsize+a.fontunit:a[t]})),le(s,this.$id),r.triggerFn(this._resizeFn&&this._resizeFn.clear),this._resizeFn=nv.utils.windowResize((function(){l[0].getBoundingClientRect().height&&(e.update(),K(a),x(a.type)||a.setLabelsMaxWidth())}))},t.prototype.configureChart=function(){var e,t,n,i;if(this._processedData.length>0&&(B(this,"x")&&(e=this.binddataset?this.getXMinMaxValues(this._processedData[0]):{min:{x:1},max:{x:5}}),B(this,"y")&&(t=this.binddataset?this.getYMinMaxValues(this._processedData):{min:{y:1},max:{y:5}})),!x(this.type)||this.binddataset&&this.scopedataset||(this._processedData=r.getClonedObject(this.scopedataset||this._processedData)),n=Y(this,e,t,null,!this.binddataset),_.isArray(this._processedData)){var o=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick");return o&&o.length&&o.remove(),(i=this.invokeEventCallback("beforerender",{chartInstance:n}))&&(n=i),this.chart=n,d3.select("#wmChart"+this.$id+" svg").datum(this._processedData).call(this.chart),this.postPlotProcess(n),n}},t.prototype.plotChart=function(){var e=this,t=this.$element;this.chartData=this.invokeEventCallback("transform")||this.chartData,this.isVisuallyGrouped&&!x(this.type)?this._processedData=this.chartData:this._processedData=this.processChartData(),t[0].getBoundingClientRect().height&&(this.clearCanvas&&(t.find("svg").replaceWith("<svg></svg>"),this.clearCanvas=!1),this.isValidAxis()||(this._processedData=[]),nv.addGraph((function(){return e.configureChart()}),(function(){setTimeout((function(){e.attachClickEvent()}),600)})),this.isLoadInProgress=!1)},Object.defineProperty(t.prototype,"isLiveVariable",{get:function(){var e=this.datasource;return e&&"wm.LiveVariable"===e.category},enumerable:!1,configurable:!0}),t.prototype.plotChartProxy=function(){var e=this;this.showContentLoadError=!1,this.invalidConfig=!1,this.isLoadInProgress=!0;var t=this.getGroupingDetails();this.binddataset&&this.isLiveVariable&&(this.filterFields||this.isDataFilteringEnabled())?this.getAggregatedData((function(){return e.plotChart()})):(this.dataset&&this.isLiveVariable&&(this.chartData=this.dataset,this.isGroupByEnabled()&&t.isVisuallyGrouped&&(this.chartData=this.getVisuallyGroupedData(this.chartData,t.visualGroupingColumn))),this.plotChart())},t.prototype.setDefaultAxisOptions=function(){var e=this.getDefaultColumns();this.xaxisdatakey=e[0]||null,this.yaxisdatakey=e[1]||null},t.prototype.getCutomizedOptions=function(e,t){var n,i=_.split(this.groupby,","),o=_.split(this.aggregationcolumn,",");if(!this.binddataset)return t;switch(this.axisoptions||(this.axisoptions=t),e){case"xaxisdatakey":this.isGroupByEnabled()&&(n=i);break;case"yaxisdatakey":this.isAggregationEnabled()?n=o:this.isLiveVariable&&(n=this.numericColumns);break;case"groupby":this.isLiveVariable&&this.nonPrimaryColumns&&this.nonPrimaryColumns.length&&(n=this.nonPrimaryColumns);break;case"aggregationcolumn":this.isLiveVariable&&this.isAggregationEnabled()&&"count"!==this.aggregation&&(n=this.numericColumns);break;case"orderby":this.isLiveVariable&&this.isAggregationEnabled()&&(n=_.uniq(_.concat(i,o)));break;case"bubblesize":this.numericColumns&&this.numericColumns.length&&(n=this.numericColumns)}return n||t||this.axisoptions},t.prototype.setNumericandNonPrimaryColumns=function(){var e,t,n=this,i=this.datasource.execute(r.DataSource.Operation.GET_PROPERTIES_MAP);this.numericColumns=[],this.nonPrimaryColumns=[],this.dataset&&!_.isEmpty(i)&&(e=[]),e&&(_.forEach(Object.keys(e),(function(i){t=e[i].type,r.isNumberType(t)&&n.numericColumns.push(i),"true"!==e[i].isRelatedPk&&e[i].isPrimaryKey||n.nonPrimaryColumns.push(i)})),this.numericColumns=this.numericColumns.sort(),this.nonPrimaryColumns=this.nonPrimaryColumns.sort())},t.prototype.handleDataSet=function(e){this.errMsg="",e||this.binddataset||(this.isVisuallyGrouped=!1,this.axisoptions=null),this.chartData=this.isLiveVariable?e||"":e&&""===e.dataValue&&1===_.keys(e).length?"":e,!_.isArray(this.chartData)&&_.isObject(this.chartData)&&(this.chartData=[this.chartData]),e&&e.filterFields&&(this.filterFields=e.filterFields),this.chartData&&this._plotChartProxy()},t.prototype.setDonutCenterLabel=function(e){var t;(t=d3.select("#wmChart"+this.$id+" svg").select(".nv-wrap.nv-pie").select(".nv-pie")).text(""),t.append("text").attr("dy",".35em").attr("text-anchor","middle").attr("class","nv-pie-title").text(e).each((function(e){var t=d3.select(this),n=d3.select(this.parentElement),i=Number(n.node().getBoundingClientRect().width)-30,o=this.getComputedTextLength();t.attr("data-scale",i/o)})).style("font-size",(function(){var e=16*d3.select(this).attr("data-scale");return e>24?24:e+"px"}))},t.prototype.onPropertyChange=function(t,n,i){switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"dataset":this.handleDataSet(n);break;case"centerlabel":this.chart&&(this.chart.title(n),this.setDonutCenterLabel(n));break;case"type":x(this.type)?(this.offsettop=20,this.offsetright=0,this.offsetbottom=0,this.offsetleft=0):"Pie"!==i&&"Donut"!==i||(this.offsettop=25,this.offsetright=25,this.offsetbottom=55,this.offsetleft=75),i!==n&&(this.clearCanvas=!0),this._plotChartProxy();break;default:this._plotChartProxy()}_.includes(J,t)&&this._plotChartProxy()},t.prototype.handleLoading=function(e){var t=this.datasource;t&&t.execute(r.DataSource.Operation.IS_API_AWARE)&&r.isDataSourceEqual(e.variable,t)&&(this.variableInflight=e.active,this.isLoadInProgress=e.active)},t.prototype.hideTooltip=function(){d3.selectAll(".nvtooltip").style("opacity",0)},t.prototype.onStyleChange=function(t,n,i){var o={};switch(e.prototype.onStyleChange.call(this,t,n,i),t){case"fontsize":case"fontunit":case"color":case"fontfamily":case"fontweight":case"fontstyle":case"textdecoration":o[ee[t]]="fontsize"===t||"fontunit"===t?this.fontsize+this.fontunit:n,le(o,this.$id)}},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),_.includes(["outside","inside","hide"],this.showlabels)||(this.showlabels=ne(this.showlabels),this.showlabelsoutside=ne(this.showlabelsoutside),this.showlabels=this.showlabels?this.showlabelsoutside?"outside":"inside":"hide"),this.theme||(this.theme=x(this.type)?"Azure":"Terrestrial"),this.nativeElement.setAttribute("id","wmChart"+this.$id),this.binddataset||this.nativeElement.getAttribute("scopedataset")||this._plotChartProxy()},t.prototype.ngOnDestroy=function(){this.hideTooltip(),this._subsciptions.forEach((function(e){e()})),e.prototype.ngOnDestroy.call(this)},t}(i.StylableComponent);de.initializeProps=c(),de.decorators=[{type:t.Component,args:[{selector:"div[wmChart]",template:'<div class="panel-heading" *ngIf="title">\n <h3 class="panel-title">\n <div class="pull-left"><i class="app-icon panel-icon {{iconclass}}" [class.ng-hide]="!iconclass"></i></div>\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" *ngIf="subheading" [innerHTML]="subheading"></div>\n </h3>\n</div>\n<div class="app-chart-inner" [ngClass]="{\'loading\':isLoadInProgress, \'panel-body\': title}">\n <svg></svg>\n <div class="wm-content-info readonly-wrapper" *ngIf="showContentLoadError && showNoDataMsg">\n <p class="wm-message" [title]="hintMsg" [ngClass]="{\'error\': invalidConfig}" [innerText]="errMsg"></p>\n </div>\n <div wmSpinner show.bind="isLoadInProgress" caption.bind="loadingdatamsg"></div>\n</div>\n',providers:[i.provideAsWidgetRef(de)],encapsulation:t.ViewEncapsulation.None,styles:[".nvd3 .nv-axis line,.nvd3 .nv-axis path{fill:none;shape-rendering:crispEdges}.nv-brush .extent,.nvd3 .background path,.nvd3 .nv-axis line,.nvd3 .nv-axis path{shape-rendering:crispEdges}.nv-distx,.nv-disty,.nv-noninteractive,.nvd3 .nv-axis,.nvd3.nv-pie .nv-label,.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3 .nv-axis{opacity:1}.nvd3 .nv-axis.nv-disabled,.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3 .nv-axis path{stroke:#000;stroke-opacity:.75}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{stroke:#e5e5e5}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity .25s linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:transparent}.nvd3 .nv-bars .hover text{fill:#000}.nvd3 .nv-discretebar .nv-groups rect,.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect{stroke-opacity:0;transition:fill-opacity .25s linear}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick,.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width .25s linear,stroke-opacity .25s linear}.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover,.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:#000;stroke:transparent}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover,.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-markerLine{stroke:#000;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nv-force-node{stroke:#fff;stroke-width:1.5px}.nv-force-link{stroke:#999;stroke-opacity:.6}.nv-force-node text{stroke-width:0}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point.hover,.nvd3.nv-scatter .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-user-select:none;-moz-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{box-shadow:0 5px 10px #0003;border-radius:5px}.nvd3 text{font:400 12px Arial,sans-serif}.nvd3 .title{font:700 14px Arial,sans-serif}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}@media print{.nvd3 text{stroke-width:0;fill-opacity:1}}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#eee;stroke-opacity:.4}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:#13c4f996}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;stroke:#fff;stroke-width:1px;stroke-opacity:1;fill-opacity:.7}.nvd3.nv-pie .hover path{fill-opacity:1}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-interactiveGuideLine,.nvtooltip{pointer-events:none}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvtooltip h3,.nvtooltip table td.key{font-weight:400}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity .25s linear,stroke-opacity .25s linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;color:#000;padding:1px;z-index:10000;display:block;font-family:Arial,sans-serif;font-size:13px;text-align:left;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip h3,.nvtooltip p{margin:0;text-align:center}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;transition-delay:.2s}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{padding:4px 14px;line-height:18px;background-color:#f7f7f7bf;color:#000;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.nvtooltip p{padding:5px 14px}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key.total{font-weight:700}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table td.percent{color:#a9a9a9}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{vertical-align:middle;width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 line.nv-guideline{stroke:#ccc}\n"]}]}],de.ctorParameters=function(){return[{type:t.Injector},{type:r.App}]},de.propDecorators={title:[{type:t.HostBinding,args:["class.panel"]}]};var he=[de],me=function(){};me.decorators=[{type:t.NgModule,args:[{imports:[o.BasicModule,n.CommonModule,i.WmComponentsModule],declarations:l([],s(he)),exports:l([],s(he)),entryComponents:[]}]}],e.ChartComponent=de,e.ChartModule=me,e["\u02750"]=ie,e["\u02751"]=re,e["\u02752"]=se,e["\u02753"]=ce,e["\u02754"]=ue,e["\u0275a"]=c,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-bootstrap/dropdown"),require("@wm/components/base"),require("@wm/components/basic"),require("@wm/components/input"),require("@angular/router"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/navigation/menu",["exports","@angular/core","@angular/common","ngx-bootstrap/dropdown","@wm/components/base","@wm/components/basic","@wm/components/input","@angular/router","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.menu={}),e.ng.core,e.ng.common,e["ngx-bootstrap"].dropdown,e.wm.components.base,e.wm.components.basic,e.wm.components.input,e.ng.router,e.wm.core)}(this,(function(e,t,n,i,o,r,a,s,l){"use strict";
253
+ ***************************************************************************** */var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function l(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var c=function(){i.register("wm-chart",new Map([["aggregation",Object.assign({value:"none"},i.PROP_STRING)],["aggregationcolumn",i.PROP_STRING],["areaviewtype",Object.assign({value:"stack"},i.PROP_STRING)],["barspacing",Object.assign({value:"medium"},i.PROP_STRING)],["bubblesize",i.PROP_STRING],["centerlabel",i.PROP_STRING],["class",i.PROP_STRING],["customcolors",i.PROP_ANY],["dataset",i.PROP_ANY],["datasource",i.PROP_STRING],["donutratio",Object.assign({value:"medium"},i.PROP_STRING)],["formattype",{value:"",PROP_STRING:i.PROP_STRING}],["groupby",i.PROP_STRING],["height",{value:"210px",PROP_STRING:i.PROP_STRING}],["highlightpoints",i.PROP_BOOLEAN],["iconclass",i.PROP_STRING],["interpolation",Object.assign({value:"linear"},i.PROP_STRING)],["labelthreshold",Object.assign({value:.01},i.PROP_NUMBER)],["labeltype",Object.assign({value:"percent"},i.PROP_STRING)],["legendtype",Object.assign({value:"furious"},i.PROP_STRING)],["linethickness",i.PROP_STRING],["loadingdatamsg",Object.assign({value:"Loading..."},i.PROP_STRING)],["name",i.PROP_STRING],["nodatamessage",Object.assign({value:"No Data Available."},i.PROP_STRING)],["offset",i.PROP_STRING],["offsetbottom",Object.assign({value:55},i.PROP_NUMBER)],["offsetleft",Object.assign({value:75},i.PROP_NUMBER)],["offsetright",Object.assign({value:25},i.PROP_NUMBER)],["offsettop",Object.assign({value:25},i.PROP_NUMBER)],["orderby",i.PROP_STRING],["reducexticks",Object.assign({value:!0},i.PROP_BOOLEAN)],["shape",Object.assign({value:"circle"},i.PROP_STRING)],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["showlabels",Object.assign({value:"outside"},i.PROP_STRING)],["showlabelsoutside",Object.assign({value:!0},i.PROP_BOOLEAN)],["showlegend",Object.assign({value:"top"},i.PROP_STRING)],["showvalues",Object.assign({value:!1},i.PROP_BOOLEAN)],["showxaxis",Object.assign({value:!0},i.PROP_BOOLEAN)],["showxdistance",Object.assign({value:!1},i.PROP_BOOLEAN)],["showyaxis",Object.assign({value:!0},i.PROP_BOOLEAN)],["showydistance",Object.assign({value:!1},i.PROP_BOOLEAN)],["staggerlabels",Object.assign({value:!1},i.PROP_BOOLEAN)],["subheading",i.PROP_STRING],["theme",i.PROP_STRING],["title",i.PROP_STRING],["tooltips",Object.assign({value:!0},i.PROP_BOOLEAN)],["type",i.PROP_STRING],["viewtype",Object.assign({value:"Grouped"},i.PROP_STRING)],["xaxisdatakey",i.PROP_STRING],["xaxislabel",i.PROP_STRING],["xaxislabeldistance",Object.assign({value:12},i.PROP_NUMBER)],["xdateformat",i.PROP_STRING],["xdomain",Object.assign({value:"Default"},i.PROP_STRING)],["xnumberformat",i.PROP_STRING],["xunits",i.PROP_STRING],["yaxisdatakey",i.PROP_STRING],["yaxislabel",i.PROP_STRING],["yaxislabeldistance",Object.assign({value:12},i.PROP_NUMBER)],["ydomain",Object.assign({value:"Default"},i.PROP_STRING)],["ynumberformat",i.PROP_STRING],["yunits",i.PROP_STRING]]))},p=["Column","Line","Area","Cumulative Line","Bar","Pie","Donut","Bubble"],u=["circle","square","diamond","cross","triangle-up","triangle-down"],d=["01/01/2001","01/01/2002","01/01/2003"],h={Terrestrial:{colors:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],tooltip:{backgroundColor:"#de7d28",textColor:"#FFFFFF"}},Annabelle:{colors:["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],tooltip:{backgroundColor:"#2e306f",textColor:"#FFFFFF"}},Azure:{colors:["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"],tooltip:{backgroundColor:"#3182bd",textColor:"#FFFFFF"}},Retro:{colors:["#0ca7a1","#ffa615","#334957","#acc5c2","#988f90","#8accc9","#515151","#f27861","#36c9fd","#794668","#0f709d","#0d2738","#44be78","#4a1839","#6a393f","#557d8b","#6c331c","#1c1c1c","#861500","#09562a"],tooltip:{backgroundColor:"#80513a",textColor:"#FFFFFF"}},Mellow:{colors:["#f0dcbf","#88c877","#aeb918","#2e2c23","#ddddd2","#dfe956","#4c963b","#5d3801","#e1eec3","#cd8472","#fcfab3","#9a4635","#9295ad","#2e3f12","#565677","#557d8b","#4f4d02","#0c0c1b","#833324","#24120e"],tooltip:{backgroundColor:"#7c9e73",textColor:"#FFFFFF"}},Orient:{colors:["#a80000","#cc6c3c","#f0e400","#000084","#fccc6c","#009c6c","#cc309c","#78cc00","#fc84e4","#48e4fc","#4878d8","#186c0c","#606060","#a8a8a8","#000000","#d7d7d7","#75a06e","#190d0b","#888888","#694b84"],tooltip:{backgroundColor:"#c14242",textColor:"#FFFFFF"}},GrayScale:{colors:["#141414","#353535","#5b5b5b","#848484","#a8a8a8","#c3c3c3","#e0e0e0","#c8c8c8","#a5a5a5","#878787","#656565","#4e4e4e","#303030","#1c1c1c","#4f4f4f","#3b3b3b","#757575","#606060","#868686","#c1c1c1"],tooltip:{backgroundColor:"#575757",textColor:"#FFFFFF"}},Flyer:{colors:["#3f454c","#5a646e","#848778","#cededf","#74c4dd","#0946ed","#380bb1","#000ff0","#f54a23","#1db262","#bca3aa","#ffa500","#a86b32","#63a18c","#56795e","#934343","#b75f5f","#752d2d","#4e1111","#920606"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}},Luminosity:{colors:["#FFFFFF","#e4e4e4","#00bcd4","#f0dd2f","#00aabf","#018376","#e91e63","#39e5d4","#ff6d6d","#00ff76","#ff9800","#969696","#ff4200","#e00000","#95cbe5","#5331ff","#fff4a7","#e7a800","#0061e4","#d5e7ff"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}}},m=["xaxislabel","yaxislabel","xunits","yunits","xnumberformat","xdateformat","ynumberformat","showvalues","showlabels","viewtype","areaviewtype","staggerlabels","reducexticks","offsettop","offsetbottom","offsetright","offsetleft","barspacing","xaxislabeldistance","yaxislabeldistance","theme","labeltype","donutratio","showlabelsoutside","showxdistance","showydistance","shape","nodatamessage","captions","showxaxis","showyaxis","centerlabel","customcolors","showlegend","legendtype","xdomain","ydomain","tooltips","linethickness","highlightpoints","interpolation","labelthreshold"],f={small:.3,medium:.5,large:.8},g={small:.3,medium:.6,large:.7},v=_.invert(f),y=_.invert(g),b={Thousand:{prefix:"K",divider:1e3},Million:{prefix:"M",divider:1e6},Billion:{prefix:"B",divider:1e9}},w="#preview-chart",P=["Column","Line","Pie","Bar","Donut","Bubble"],O=["Line","Area","Cumulative Line"],S=["Cumulative Line","Area"],E="Europe",T="Asia",R="America",C="Australia",A=function(e){return"Bar"===e},I=function(e){return"Donut"===e},D=function(e){return"Bubble"===e},N=function(e){return"Area"===e},x=function(e){return function(e){return"Pie"===e}(e)||I(e)},M=function(e){return _.includes(P,e)||!_.includes(p,e)},k=function(e){return _.includes(O,e)},L=function(e,t){return"value"===t?f[e]:"key"===t?v[e]:void 0},F=function(e,t){return"value"===t?g[e]:"key"===t?y[e]:void 0},j=function(e){return function(e,t,n){var i=[],o=[],r=[],a=[],s=[],l=[],c=[],p=[],d=[],h=[];switch(e){case"jsonFormat":i=[{x:"01/01/2001",y:4e6},{x:"01/01/2002",y:1e6},{x:"01/01/2003",y:5e6}],o=[{x:"01/01/2001",y:3e6},{x:"01/01/2002",y:4e6},{x:"01/01/2003",y:7e6}],r=[{x:"01/01/2001",y:2e6},{x:"01/01/2002",y:8e6},{x:"01/01/2003",y:6e6}],h[0]={values:i,key:E},t>=2&&(h[1]={values:o,key:T}),t>=3&&(h[2]={values:r,key:R});break;case"lineChartFormat":i=[{x:1,y:4e6},{x:2,y:1e6},{x:3,y:5e6}],o=[{x:1,y:3e6},{x:2,y:4e6},{x:3,y:7e6}],r=[{x:1,y:2e6},{x:2,y:8e6},{x:3,y:6e6}],h[0]={values:i,key:E},t>=2&&(h[1]={values:o,key:T}),t>=3&&(h[2]={values:r,key:R});break;case"arrayFormat":a=[[1,4e6],[2,1e6],[3,5e6]],s=[[1,3e6],[2,4e6],[3,7e6]],l=[[1,2e6],[2,8e6],[3,6e6]],h[0]={values:a,key:E},t>=2&&(h[1]={values:s,key:T}),t>=3&&(h[2]={values:l,key:R});break;case"bubbleFormat":c=[{x:80.66,y:33739900,size:78,shape:n="random"===n?u[Math.floor(Math.random()*u.length)]:n},{x:79.84,y:81902300,size:90,shape:n},{x:78.6,y:5523100,size:45,shape:n}],p=[{x:72.73,y:79716200,size:98,shape:n},{x:80.05,y:61801600,size:20,shape:n},{x:72.49,y:73137200,size:34,shape:n}],d=[{x:68.09,y:33739900,size:45,shape:n},{x:81.55,y:7485600,size:78,shape:n},{x:68.6,y:14185e4,size:56,shape:n}],h[0]={values:c,key:E},t>=2&&(h[1]={values:p,key:T}),t>=3&&(h[2]={values:d,key:R});break;case"pieChartFormat":h=[{x:E,y:1e6},{x:T,y:2e6},{x:R,y:3e6},{x:C,y:4e6}]}return h}(function(e){var t=e.type;return function(e){return"Line"===e}(t)?"lineChartFormat":x(t)?"pieChartFormat":D(t)?"bubbleFormat":M(t)?"jsonFormat":"arrayFormat"}(e),_.split(e.yaxisdatakey,",").length,e.shape)},B=function(e,t){return!("Min"!==e[t+"domain"]||(n=e.type,!function(e){return"Column"===e}(n)&&!N(n)));var n},G=function(e){return!(!_.isFinite(e.min)||!_.isFinite(e.max))},V=function(e){var t=Math.floor(e);return Math.abs(e)-t>0?e-.1:t-1},U=function(e,t){return isNaN(parseInt(e,10))?t(e,"value"):e},W=function(e,t){return e=e||"%x",d3.time.format(e)(new Date(moment(moment(t).format()).valueOf()))},q=function(e,t){var n,i,o;return n=d3.format(e)(t),e?(i=b[e]&&b[e].divider||0,(o=b[e]&&b[e].prefix)&&0!==i&&(n=d3.format(".2f")(t/i)+o)):n=t>=1e3?d3.format(".1s")(t):t,n},z=function(e){return"false"!==e&&!1!==e&&("true"===e||!0===e||"hide"!==e)},H=function(e,t,n,i){e.tooltip.contentGenerator((function(e){var o,r=e.data.x;return o=q(t.ynumberformat,e.data.y),x(n.type)&&(i=e.data.x,r=""),'<table><tbody><tr class="value"><b>'+r+'</b></tr><tr><td class="legend-color-guide"><div style="background-color:'+e.color+';"></div></td><td class="key">'+i+'</td><td class="value">'+o+"</td></tr></tbody></table>"}))},Y=function(e,t,n,i,o){i=function(e,t){return t&&!r.isEmptyObject(t)||(t={}),_.forEach(m,(function(n){_.isUndefined(t[n])&&(t[n]=e[n])})),t}(e,i);var a,s,l,c,u,v,y,b,w,P=[],O={},S={};switch(e.type){case"Column":v=U(i.barspacing,L)||f.medium,a=nv.models.multiBarChart().x((function(e){return e.x})).y((function(e){return e.y})).reduceXTicks(i.reducexticks).rotateLabels(0).showControls(!1).stacked("Stacked"===i.viewtype).groupSpacing(v);break;case"Cumulative Line":a=nv.models.cumulativeLineChart().x((function(e){return e[0]})).y((function(e){return e[1]})).showControls(!1).useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Line":a=nv.models.lineChart().useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Area":a=nv.models.stackedAreaChart().x((function(e){return e[0]})).y((function(e){return e[1]})).clipEdge(!0).showControls(!1).style(i.areaviewtype).useInteractiveGuideline(i.tooltips).interpolate(i.interpolation);break;case"Bar":v=U(i.barspacing,L)||f.medium,a=nv.models.multiBarHorizontalChart().x((function(e){return e.x})).y((function(e){return e.y})).showControls(!1).stacked("Stacked"===i.viewtype).showValues(i.showvalues).groupSpacing(v);break;case"Pie":case"Donut":c=function(e,t,n){var i={};switch(e){case"hide":i.showlabels=!1;break;case"inside":i.showlabels=!0,i.showlabelsoutside=!1;break;case"outside":i.showlabels=!0,i.showlabelsoutside=!0}return i}(i.showlabels,i.showlabelsoutside),u=U(i.donutratio,F)||g.medium,a=nv.models.pieChart().x((function(e){return e.x})).y((function(e){return e.y})).showLabels(c.showlabels).labelType(i.labeltype).valueFormat(d3.format("%")).title(i.centerlabel).labelThreshold(i.labelthreshold||.01).labelsOutside(c.showlabelsoutside),I(e.type)&&a.donut(!0).donutRatio(u),"key-value"===i.labeltype&&a.labelType((function(e){return e.data.x+" "+e.data.y}));break;case"Bubble":a=nv.models.scatterChart().x((function(e){return e.x})).y((function(e){return e.y})).showDistX(i.showxdistance).showDistY(i.showydistance)}if(t&&(O.min=t.min.x||t.min[0],O.max=t.max.x||t.max[0],G(O)&&(O.min=V(O.min),a.xDomain([O.min,O.max]))),n&&(S.min=n.min.y||n.min[1],S.max=n.max.y||n.max[1],G(S)&&(S.min=V(S.min),a.yDomain([S.min,S.max]))),a.legend.vers(i.legendtype&&i.legendtype.toLowerCase()||"furious"),_.includes(p,e.type)||(a=nv.models.multiBarChart().x((function(e){return e.x})).y((function(e){return e.y}))),x(e.type)?("percent"===i.labeltype?a.valueFormat(d3.format("%")):a.valueFormat((function(e){return q(i.ynumberformat,e)})),H(a,i,e)):(a.showXAxis(i.showxaxis).showYAxis(i.showyaxis),s=i.xaxislabel||r.prettifyLabels(e.xaxisdatakey)||"x caption",l=i.yaxislabel||r.prettifyLabels(e.yaxisdatakey)||"y caption",e.yaxisdatakey&&e.yaxisdatakey.split(",").length>1&&(w=!0),w||D(e.type)||H(a,i,e,l),s+=i.xunits?"("+i.xunits+")":"",l+=i.yunits?"("+i.yunits+")":"",a.xAxis.axisLabel(s).axisLabelDistance(i.xaxislabeldistance).staggerLabels(i.staggerlabels),i.xdateformat||o&&!D(e.type)?k(e.type)?a.xAxis.tickFormat((function(t){return b=o?d[t-1]:e.xDataKeyArr[t],W(i.xdateformat,b)})):a.xAxis.tickFormat((function(e){return W(i.xdateformat,e)})):i.xnumberformat?a.xAxis.tickFormat((function(e){return q(i.xnumberformat,e)})):k(e.type)&&a.xAxis.tickFormat((function(t){return e.xDataKeyArr[t]})),a.yAxis.axisLabel(l).axisLabelDistance(i.yaxislabeldistance).staggerLabels(i.staggerlabels).tickFormat((function(e){return q(i.ynumberformat,e)})),A(e.type)&&a.valueFormat((function(e){return q(i.ynumberformat,e)}))),_.isString(i.customcolors)&&i.customcolors){var E=i.customcolors.replace(/'/g,'"');P=JSON.parse(E)}return _.isArray(i.customcolors)&&(P=i.customcolors),y=z(i.showlegend),a.showLegend(y).margin({top:i.offsettop,right:i.offsetright,bottom:i.offsetbottom,left:i.offsetleft}).color(P.length?P:h[i.theme].colors),a.tooltip.enabled(i.tooltips),e.message=i.nodatamessage||"No data found",a.noData(e.message),k(e.type)&&e.highlightpoints&&a.dispatch.on("stateChange",(function(){setTimeout((function(){return K(e)}),100)})),!e.showlegend||"Donut"!==e.type&&"Pie"!==e.type||"right"===e.showlegend&&a.legendPosition("right"),a},K=function(e,t){var n=t?null:e.$id;k(e.type)&&(function(e,t){t=t||1.5,(e?d3.select("#wmChart"+e+" svg"):d3.select(w+" svg")).selectAll(".nv-line").style({"stroke-width":t})}(n,e.linethickness),function(e,t){var n=e?d3.select("#wmChart"+e+" svg"):d3.select(w+" svg");t?n.selectAll(".nv-point").style({"stroke-width":"6px","fill-opacity":".95","stroke-opacity":".95"}):n.selectAll(".nv-point").style({"stroke-width":"0px","fill-opacity":"0"})}(n,e.highlightpoints)),e.showlegend&&function(e,t,n){var i,o=z(e.showlegend),r=n?"#wmChart"+n:w,a=d3.select(r+" .nv-legendWrap");if(o&&a[0][0]&&"bottom"===t){var s=a[0][0].getBoundingClientRect().height,l=d3.select(r+" .nv-wrap"),c=l&&l.attr("transform")?l.attr("transform").replace(/, /g,","):"",p=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(c);a.attr("transform","translate(0 , "+(0===(i=$(r+" svg>.nvd3.nv-wrap")[0].getBoundingClientRect().height)&&(i=$(r+" svg")[0].getBoundingClientRect().height-(s+15)),i-s-5+")")),p&&l.attr("transform","translate("+p[1]+",5)")}}(e,e.showlegend,n)},Q={widgetType:"wm-chart",hostClass:"app-chart"},X="none",J=["aggregation","aggregationcolumn","groupby","orderby"],Z={Column:"rect.nv-bar",Bar:"g.nv-bar",Area:".nv-stackedarea .nv-point","Cumulative Line":".nv-cumulativeLine .nv-scatterWrap path.nv-point",Line:".nv-lineChart .nv-scatterWrap path.nv-point",Pie:".nv-pieChart .nv-slice path",Donut:".nv-pieChart .nv-slice path",Bubble:".nv-scatterChart .nv-point-paths path"},ee={fontunit:"font-size",fontsize:"font-size",color:"fill",fontfamily:"font-family",fontweight:"font-weight",fontstyle:"font-style",textdecoration:"text-decoration"},te={average:"AVG",count:"COUNT",maximum:"MAX",minimum:"MIN",sum:"SUM"},ne=function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&e},ie=ne,oe=function(e){var t,n=[],i=[];return _.forEach(_.split(e,","),(function(e){t=_.split(e,":"),n.push(t[0]),i.push(t[1])})),{columns:n,orders:i}},re=oe,ae=function(e){return e?e.replace(/\./g,"$"):null},se=ae,le=function(e,t){d3.select("#wmChart"+t+" svg").selectAll("text").style(e)},ce=le,pe=function(e){var t=90*(e.startAngle+e.endAngle)/Math.PI-90;return t>90?t-180:t},ue=pe,de=function(e){function t(t,n){var o=e.call(this,t,Q)||this;return o.app=n,o.iconclass="",o.nonPrimaryColumns=[],o.xDataKeyArr=[],o.chartData=[],o._processedData=[],o._subsciptions=[],o._plotChartProxy=_.debounce(o.plotChartProxy.bind(o),100),o.redraw=o._plotChartProxy.bind(o),i.styler(o.nativeElement,o,i.APPLY_STYLES_TYPE.CONTAINER,["fontsize","fontunit","color","fontfamily","fontweight","fontstyle","textdecoration"]),o.$id=o.widgetId||Math.random(),r.removeAttr(o.nativeElement,"title"),o.chartReady=!1,o.binddataset=o.nativeElement.getAttribute("dataset.bind"),o._subsciptions.push(o.app.subscribe("toggle-variable-state",o.handleLoading.bind(o))),o._subsciptions.push(o.app.subscribe("iscroll-start",(function(){o.hideTooltip()}))),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.isGroupByEnabled=function(){return!(!this.groupby||this.groupby===X)},t.prototype.isValidAxis=function(){return!this.binddataset||this.xaxisdatakey&&this.yaxisdatakey},t.prototype.isAggregationEnabled=function(){return!(!this.isGroupByEnabled()||this.aggregation===X||!this.aggregationcolumn)},t.prototype.isDataFilteringEnabled=function(){return this.isAggregationEnabled()||!this.isVisuallyGrouped&&this.orderby},t.prototype.getxAxisVal=function(e,t,n){var i=_.get(e,t);return k(this.type)&&!r.isNumberType(this.xAxisDataType)?(this.xDataKeyArr.push(i),i):i},t.prototype.getXMinMaxValues=function(e){if(e){var t={};return t.min=_.minBy(e.values,(function(e){return e.x||e[0]})),t.max=_.maxBy(e.values,(function(e){return e.x||e[0]})),t}},t.prototype.getYMinMaxValues=function(e){var t={},n=[],i=[];if(e)return _.forEach(e,(function(e){n.push(_.minBy(e.values,(function(e){return e.y||e[1]}))),i.push(_.maxBy(e.values,(function(e){return e.y||e[1]})))})),t.min=_.minBy(n,(function(e){return e.y||e[1]})),t.max=_.maxBy(i,(function(e){return e.y||e[1]})),t},t.prototype.getValidData=function(e){return 1===e.length&&void 0===e[0]?[]:e},t.prototype.valueFinder=function(e,t,n,i,o){var r,a=this.getxAxisVal(e,t,i),s=_.get(e,n),l=parseFloat(s)||s,c=parseFloat(e[this.bubblesize])||2,p={};return M(this.type)?(p.x=a,p.y=l,D(this.type)&&(p.size=c,p.shape=o||"circle")):(r=this.type,_.includes(S,r)&&(p=[a,l])),p._dataObj=e,p},t.prototype.setErrMsg=function(e){this.showNoDataMsg&&(this.showContentLoadError=!0,this.invalidConfig=!0,this.errMsg="")},t.prototype.processChartData=function(){var e=this;if(this.sampleData=j(this),this.xDataKeyArr=[],!this.binddataset)return this.xDataKeyArr=d,this.sampleData;if(!this.chartData||!this.chartData.length)return[];var t,n=[],i=[],o=[],a=this.xaxisdatakey,s=this.yaxisdatakey?this.yaxisdatakey.split(","):[],l=this.chartData;return _.isArray(l)&&(x(this.type)?(t=s[0],n=_.map(l,(function(n,i){if(!r.isEmptyObject(l[i]))return e.valueFinder(l[i],a,t)})),n=this.getValidData(n)):(D(this.type)&&(i="random"===this.shape?u:this.shape),s.forEach((function(t,s){o=_.map(l,(function(n,o){if(!r.isEmptyObject(l[o]))return e.valueFinder(l[o],a,t,o,_.isArray(i)&&i[s]||e.shape)})),o=e.getValidData(o),n.push({values:o,key:r.prettifyLabels(t)})})))),n},t.prototype.setChartData=function(e){e&&(this._processedData=e)},t.prototype.getChartData=function(){return this._processedData},t.prototype.getVisuallyGroupedData=function(e,t){var n,i,o=this,r={},a=[],s=[],l=N(this.type),c=_.first(_.split(this.yaxisdatakey,","));return this.xDataKeyArr=[],e=_.orderBy(e,_.split(this.groupby,",")),this.orderby&&(n=oe(this.orderby),e=_.orderBy(e,n.columns,n.orders)),e=_.groupBy(e,t),l&&(i=_.max(_.map(e,(function(e){return e.length})))),_.forEach(e,(function(e,t){a=N?_.fill(new Array(i),[0,0]):[],_.forEachRight(e,(function(e,t){a[t]=o.valueFinder(e,o.xaxisdatakey,c,t)})),r={key:t,values:a},s.push(r)})),s},t.prototype.getGroupingDetails=function(){var e=this;if(this.isGroupByEnabled()&&!this.isAggregationEnabled()){var t,n,i,o=!1,r=[],a=this.groupby&&this.groupby!==X?this.groupby.split(","):[],s=this.yaxisdatakey?this.yaxisdatakey.split(","):[];return a.length>1&&(a.every((function(n,r){return e.xaxisdatakey===n||-1!==$.inArray(n,s)||(o=!0,t=n,i=r,a.splice(i,1),!1)})),t&&r.push(t),a.length&&(r=_.concat(r,a))),this.xaxisdatakey!==this.aggregationcolumn&&r.push(this.xaxisdatakey),_.forEach(s,(function(t){t!==e.aggregationcolumn&&r.push(t)})),n=r.join(","),this.isVisuallyGrouped=o,{expression:n,isVisuallyGrouped:o,visualGroupingColumn:t}}return{expression:"",isVisuallyGrouped:!1,visualGroupingColumn:""}},t.prototype.getAggregatedData=function(e){var t,n,i,o=this,a=this.datasource,s=this.yaxisdatakey?this.yaxisdatakey.split(","):[],l={},c=[],p=[];a&&(this.isGroupByEnabled()&&(p=_.split(this.groupby,",")),this.orderby&&(t=_.replace(this.orderby,/:/g," "),c=_.uniq(_.concat(c,p,[this.aggregationcolumn])),i=oe(this.orderby).columns,_.forEach(_.intersection(c,i),(function(e){n=ae(e),t=_.replace(t,e,n)}))),this.isAggregationEnabled()&&(l.groupByFields=p,l.aggregations=[{field:this.aggregationcolumn,type:te[this.aggregation],alias:ae(this.aggregationcolumn)}]),a.execute("getAggregatedData",{aggregations:l,sort:t}).then((function(t){var n=[],i=ae(o.aggregationcolumn),a=ae(o.xaxisdatakey),l=[];s.forEach((function(e){return l.push(ae(e))})),_.forEach(t.body.content,(function(e){var t={};o.isAggregationEnabled()&&(t[o.aggregationcolumn]=e[i],t[o.aggregationcolumn]=_.get(e,i)||_.get(e,o.aggregationcolumn)),t[o.xaxisdatakey]=_.get(e,a)||_.get(e,o.xaxisdatakey),s.forEach((function(n,i){t[n]=e[l[i]],t[n]=_.get(e,l[i])||_.get(e,n)})),n.push(t)})),o.chartData=n,r.triggerFn(e)}),(function(){o.chartData=[],o.setErrMsg("MESSAGE_ERROR_FETCH_DATA"),r.triggerFn(e)})))},t.prototype.setLabelsMaxWidth=function(){var e,t,n,i,o,r,a,s,l,c,p,u,d=parseInt(this.fontsize,10)||12,h=A(this.type);(e=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick").find("text")).each((function(){var e,n,r=$(this);if(r.text()&&"1"===r.css("opacity"))return e=r.parent().attr("transform").split(","),i=parseFloat(e[0].substr(10)),o=parseFloat(e[1]||"0"),!h&&i>0?n=i:o>0&&(n=o),t?(t=n-t,!1):(t=n,!0)})),h?(c=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-barsWrap")[0],p=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-y")[0],u=$("#wmChart"+this.$id+" svg")[0],r=c?c.getBoundingClientRect().height:0,l=p?u.getBoundingClientRect().width-p.getBoundingClientRect().width:u.getBoundingClientRect().width,n=Math.round(l/d),t<d&&(a=r/d,s=Math.ceil(this.chartData.length/a),d3.select("#wmChart"+this.$id+" svg").select("g.nv-x").selectAll("g.tick").select("text").each((function(e,t){t%s!=0&&d3.select(this).attr("opacity",0)})))):n=Math.round(t/d),n=Math.abs(n),e.each((function(){this.textContent.length>n&&(this.textContent=this.textContent.substr(0,n)+"...")}))},t.prototype.getDefaultColumns=function(){var e,t,n,i,o=[],a=this.datasource.execute(r.DataSource.Operation.GET_PROPERTIES_MAP)||[];for(n=0;n<a.length&&o.length<=2;n+=1)e=a[n].type,!a[n].isRelated&&r.isNumberType(e)?o.push(a[n].fieldName):"string"!==e||t||(t=a[n].fieldName);return t&&o.length>0&&!D(this.type)&&(i=o[0],o[0]=t,o[1]=i),o},t.prototype.attachClickEvent=function(){var e,t=this;d3.select("#wmChart"+this.$id+" svg").selectAll(Z[this.type]).style("pointer-events","all").on("click",(function(n,i){switch(t.type){case"Column":case"Bar":e=n._dataObj;break;case"Pie":case"Donut":e=n.data._dataObj;break;case"Area":case"Cumulative Line":case"Line":e=n[0]._dataObj;break;case"Bubble":e=n.data.point[4]._dataObj}t.selecteditem=e,t.invokeEventCallback("select",{$event:d3.event,selectedChartItem:n,selectedItem:t.selecteditem})}))},t.prototype.postPlotProcess=function(e){var t,n,i,o,a=this,s={},l=this.$element;K(this),x(this.type)?this.showlabelsoutside||(n=(t=d3.select("#wmChart"+this.$id+" svg")).select(".nv-pieLabels").selectAll(".nv-label"),i=t.select(".nv-pie").selectAll(".nv-slice"),o=[],i&&i.length&&(i.each((function(){d3.select(this).attr("transform",(function(e){o.push(pe(e))}))})),n.each((function(e,t){var n=d3.select(this);$(n[0][0]).find("text").attr("transform","rotate("+o[t]+")")})))):this.setLabelsMaxWidth(),_.forEach(ee,(function(e,t){s[e]="fontsize"===t||"fontunit"===t?a.fontsize+a.fontunit:a[t]})),le(s,this.$id),r.triggerFn(this._resizeFn&&this._resizeFn.clear),this._resizeFn=nv.utils.windowResize((function(){l[0].getBoundingClientRect().height&&(e.update(),K(a),x(a.type)||a.setLabelsMaxWidth())}))},t.prototype.configureChart=function(){var e,t,n,i;if(this._processedData.length>0&&(B(this,"x")&&(e=this.binddataset?this.getXMinMaxValues(this._processedData[0]):{min:{x:1},max:{x:5}}),B(this,"y")&&(t=this.binddataset?this.getYMinMaxValues(this._processedData):{min:{y:1},max:{y:5}})),!x(this.type)||this.binddataset&&this.scopedataset||(this._processedData=r.getClonedObject(this.scopedataset||this._processedData)),n=Y(this,e,t,null,!this.binddataset),_.isArray(this._processedData)){var o=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick");return o&&o.length&&o.remove(),(i=this.invokeEventCallback("beforerender",{chartInstance:n}))&&(n=i),this.chart=n,d3.select("#wmChart"+this.$id+" svg").datum(this._processedData).call(this.chart),this.postPlotProcess(n),n}},t.prototype.plotChart=function(){var e=this,t=this.$element;this.chartData=this.invokeEventCallback("transform")||this.chartData,this.isVisuallyGrouped&&!x(this.type)?this._processedData=this.chartData:this._processedData=this.processChartData(),t[0].getBoundingClientRect().height&&(this.clearCanvas&&(t.find("svg").replaceWith("<svg></svg>"),this.clearCanvas=!1),this.isValidAxis()||(this._processedData=[]),nv.addGraph((function(){return e.configureChart()}),(function(){setTimeout((function(){e.attachClickEvent()}),600)})),this.isLoadInProgress=!1)},Object.defineProperty(t.prototype,"isLiveVariable",{get:function(){var e=this.datasource;return e&&"wm.LiveVariable"===e.category},enumerable:!1,configurable:!0}),t.prototype.plotChartProxy=function(){var e=this;this.showContentLoadError=!1,this.invalidConfig=!1,this.isLoadInProgress=!0;var t=this.getGroupingDetails();this.binddataset&&this.isLiveVariable&&(this.filterFields||this.isDataFilteringEnabled())?this.getAggregatedData((function(){return e.plotChart()})):(this.dataset&&this.isLiveVariable&&(this.chartData=this.dataset,this.isGroupByEnabled()&&t.isVisuallyGrouped&&(this.chartData=this.getVisuallyGroupedData(this.chartData,t.visualGroupingColumn))),this.plotChart())},t.prototype.setDefaultAxisOptions=function(){var e=this.getDefaultColumns();this.xaxisdatakey=e[0]||null,this.yaxisdatakey=e[1]||null},t.prototype.getCutomizedOptions=function(e,t){var n,i=_.split(this.groupby,","),o=_.split(this.aggregationcolumn,",");if(!this.binddataset)return t;switch(this.axisoptions||(this.axisoptions=t),e){case"xaxisdatakey":this.isGroupByEnabled()&&(n=i);break;case"yaxisdatakey":this.isAggregationEnabled()?n=o:this.isLiveVariable&&(n=this.numericColumns);break;case"groupby":this.isLiveVariable&&this.nonPrimaryColumns&&this.nonPrimaryColumns.length&&(n=this.nonPrimaryColumns);break;case"aggregationcolumn":this.isLiveVariable&&this.isAggregationEnabled()&&"count"!==this.aggregation&&(n=this.numericColumns);break;case"orderby":this.isLiveVariable&&this.isAggregationEnabled()&&(n=_.uniq(_.concat(i,o)));break;case"bubblesize":this.numericColumns&&this.numericColumns.length&&(n=this.numericColumns)}return n||t||this.axisoptions},t.prototype.setNumericandNonPrimaryColumns=function(){var e,t,n=this,i=this.datasource.execute(r.DataSource.Operation.GET_PROPERTIES_MAP);this.numericColumns=[],this.nonPrimaryColumns=[],this.dataset&&!_.isEmpty(i)&&(e=[]),e&&(_.forEach(Object.keys(e),(function(i){t=e[i].type,r.isNumberType(t)&&n.numericColumns.push(i),"true"!==e[i].isRelatedPk&&e[i].isPrimaryKey||n.nonPrimaryColumns.push(i)})),this.numericColumns=this.numericColumns.sort(),this.nonPrimaryColumns=this.nonPrimaryColumns.sort())},t.prototype.handleDataSet=function(e){this.errMsg="",e||this.binddataset||(this.isVisuallyGrouped=!1,this.axisoptions=null),this.chartData=this.isLiveVariable?e||"":e&&""===e.dataValue&&1===_.keys(e).length?"":e,!_.isArray(this.chartData)&&_.isObject(this.chartData)&&(this.chartData=[this.chartData]),e&&e.filterFields&&(this.filterFields=e.filterFields),this.chartData&&this._plotChartProxy()},t.prototype.setDonutCenterLabel=function(e){var t;(t=d3.select("#wmChart"+this.$id+" svg").select(".nv-wrap.nv-pie").select(".nv-pie")).text(""),t.append("text").attr("dy",".35em").attr("text-anchor","middle").attr("class","nv-pie-title").text(e).each((function(e){var t=d3.select(this),n=d3.select(this.parentElement),i=Number(n.node().getBoundingClientRect().width)-30,o=this.getComputedTextLength();t.attr("data-scale",i/o)})).style("font-size",(function(){var e=16*d3.select(this).attr("data-scale");return e>24?24:e+"px"}))},t.prototype.onPropertyChange=function(t,n,i){switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"dataset":this.handleDataSet(n);break;case"centerlabel":this.chart&&(this.chart.title(n),this.setDonutCenterLabel(n));break;case"type":x(this.type)?(this.offsettop=20,this.offsetright=0,this.offsetbottom=0,this.offsetleft=0):"Pie"!==i&&"Donut"!==i||(this.offsettop=25,this.offsetright=25,this.offsetbottom=55,this.offsetleft=75),i!==n&&(this.clearCanvas=!0),this._plotChartProxy();break;default:this._plotChartProxy()}_.includes(J,t)&&this._plotChartProxy()},t.prototype.handleLoading=function(e){var t=this.datasource;t&&t.execute(r.DataSource.Operation.IS_API_AWARE)&&r.isDataSourceEqual(e.variable,t)&&(this.variableInflight=e.active,this.isLoadInProgress=e.active)},t.prototype.hideTooltip=function(){d3.selectAll(".nvtooltip").style("opacity",0)},t.prototype.onStyleChange=function(t,n,i){var o={};switch(e.prototype.onStyleChange.call(this,t,n,i),t){case"fontsize":case"fontunit":case"color":case"fontfamily":case"fontweight":case"fontstyle":case"textdecoration":o[ee[t]]="fontsize"===t||"fontunit"===t?this.fontsize+this.fontunit:n,le(o,this.$id)}},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),_.includes(["outside","inside","hide"],this.showlabels)||(this.showlabels=ne(this.showlabels),this.showlabelsoutside=ne(this.showlabelsoutside),this.showlabels=this.showlabels?this.showlabelsoutside?"outside":"inside":"hide"),this.theme||(this.theme=x(this.type)?"Azure":"Terrestrial"),this.nativeElement.setAttribute("id","wmChart"+this.$id),this.binddataset||this.nativeElement.getAttribute("scopedataset")||this._plotChartProxy()},t.prototype.ngOnDestroy=function(){this.hideTooltip(),this._subsciptions.forEach((function(e){e()})),e.prototype.ngOnDestroy.call(this)},t}(i.StylableComponent);de.initializeProps=c(),de.decorators=[{type:t.Component,args:[{selector:"div[wmChart]",template:'<div class="panel-heading" *ngIf="title">\n <h3 class="panel-title">\n <div class="pull-left"><i class="app-icon panel-icon {{iconclass}}" [class.ng-hide]="!iconclass"></i></div>\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" *ngIf="subheading" [innerHTML]="subheading"></div>\n </h3>\n</div>\n<div class="app-chart-inner" [ngClass]="{\'loading\':isLoadInProgress, \'panel-body\': title}">\n <svg></svg>\n <div class="wm-content-info readonly-wrapper" *ngIf="showContentLoadError && showNoDataMsg">\n <p class="wm-message" [title]="hintMsg" [ngClass]="{\'error\': invalidConfig}" [innerText]="errMsg"></p>\n </div>\n <div wmSpinner show.bind="isLoadInProgress" caption.bind="loadingdatamsg"></div>\n</div>\n',providers:[i.provideAsWidgetRef(de)],encapsulation:t.ViewEncapsulation.None,styles:[".nvd3 .nv-axis line,.nvd3 .nv-axis path{fill:none;shape-rendering:crispEdges}.nv-brush .extent,.nvd3 .background path,.nvd3 .nv-axis line,.nvd3 .nv-axis path{shape-rendering:crispEdges}.nv-distx,.nv-disty,.nv-noninteractive,.nvd3 .nv-axis,.nvd3.nv-pie .nv-label,.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3 .nv-axis{opacity:1}.nvd3 .nv-axis.nv-disabled,.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3 .nv-axis path{stroke:#000;stroke-opacity:.75}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{stroke:#e5e5e5}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity .25s linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:transparent}.nvd3 .nv-bars .hover text{fill:#000}.nvd3 .nv-discretebar .nv-groups rect,.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect{stroke-opacity:0;transition:fill-opacity .25s linear}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick,.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width .25s linear,stroke-opacity .25s linear}.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover,.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:#000;stroke:transparent}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover,.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-markerLine{stroke:#000;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nv-force-node{stroke:#fff;stroke-width:1.5px}.nv-force-link{stroke:#999;stroke-opacity:.6}.nv-force-node text{stroke-width:0}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point.hover,.nvd3.nv-scatter .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-user-select:none;-moz-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{box-shadow:0 5px 10px #0003;border-radius:5px}.nvd3 text{font:400 12px Arial,sans-serif}.nvd3 .title{font:700 14px Arial,sans-serif}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}@media print{.nvd3 text{stroke-width:0;fill-opacity:1}}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#eee;stroke-opacity:.4}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:#13c4f996}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;stroke:#fff;stroke-width:1px;stroke-opacity:1;fill-opacity:.7}.nvd3.nv-pie .hover path{fill-opacity:1}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-interactiveGuideLine,.nvtooltip{pointer-events:none}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvtooltip h3,.nvtooltip table td.key{font-weight:400}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity .25s linear,stroke-opacity .25s linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;color:#000;padding:1px;z-index:10000;display:block;font-family:Arial,sans-serif;font-size:13px;text-align:left;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip h3,.nvtooltip p{margin:0;text-align:center}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;transition-delay:.2s}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{padding:4px 14px;line-height:18px;background-color:#f7f7f7bf;color:#000;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.nvtooltip p{padding:5px 14px}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key.total{font-weight:700}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table td.percent{color:#a9a9a9}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{vertical-align:middle;width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 line.nv-guideline{stroke:#ccc}\n"]}]}],de.ctorParameters=function(){return[{type:t.Injector},{type:r.App}]},de.propDecorators={title:[{type:t.HostBinding,args:["class.panel"]}]};var he=[de],me=function(){};me.decorators=[{type:t.NgModule,args:[{imports:[o.BasicModule,n.CommonModule,i.WmComponentsModule],declarations:l([],s(he)),exports:l([],s(he)),entryComponents:[]}]}],e.ChartComponent=de,e.ChartModule=me,e["\u02750"]=ie,e["\u02751"]=re,e["\u02752"]=se,e["\u02753"]=ce,e["\u02754"]=ue,e["\u0275a"]=c,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-bootstrap/dropdown"),require("@wm/components/base"),require("@wm/components/basic"),require("@wm/components/input"),require("@angular/router"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/navigation/menu",["exports","@angular/core","@angular/common","ngx-bootstrap/dropdown","@wm/components/base","@wm/components/basic","@wm/components/input","@angular/router","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.menu={}),e.ng.core,e.ng.common,e["ngx-bootstrap"].dropdown,e.wm.components.base,e.wm.components.basic,e.wm.components.input,e.ng.router,e.wm.core)}(this,(function(e,t,n,i,o,r,a,s,l){"use strict";
254
254
  /*! *****************************************************************************
255
255
  Copyright (c) Microsoft Corporation.
256
256
 
@@ -685,7 +685,7 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
685
685
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
686
686
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
687
687
  PERFORMANCE OF THIS SOFTWARE.
688
- ***************************************************************************** */var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function p(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var u=function(){i.register("wm-wizard",new Map([["actionsalignment",Object.assign({value:"right"},i.PROP_STRING)],["cancelable",Object.assign({value:!0},i.PROP_BOOLEAN)],["cancelbtnlabel",Object.assign({value:"Cancel"},i.PROP_STRING)],["class",Object.assign({value:"classic"},i.PROP_STRING)],["defaultstep",Object.assign({value:"none"},i.PROP_STRING)],["donebtnlabel",Object.assign({value:"Done"},i.PROP_STRING)],["name",i.PROP_STRING],["nextbtnlabel",Object.assign({value:"Next"},i.PROP_STRING)],["previousbtnlabel",Object.assign({value:"Previous"},i.PROP_STRING)],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["stepstyle",Object.assign({value:"auto"},i.PROP_STRING)]]))},d=function(){i.register("wm-wizardstep",new Map([["class",i.PROP_STRING],["enableskip",Object.assign({value:!1},i.PROP_BOOLEAN)],["iconclass",Object.assign({value:"wi wi-person"},i.PROP_STRING)],["doneiconclass",Object.assign({value:"wi wi-done"},i.PROP_STRING)],["name",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["title",Object.assign({value:"Step Title"},i.PROP_STRING)]]))},h={widgetType:"wm-wizardstep",hostClass:"app-wizard-step-content"},m=function(e){function t(t,n){var i=e.call(this,t,h)||this;return i.ngForm=n,i.isDone=!1,i.status=2,i.wizardComponent=i.inj.get(g),i}return s(t,e),Object.defineProperty(t.prototype,"isCurrent",{get:function(){return this.active},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return(this.ngForm.valid||this.ngForm.disabled)&&this.areEmbeddedFormsValid()},enumerable:!1,configurable:!0}),t.prototype.areEmbeddedFormsValid=function(){var e,t,n=this.getAllEmbeddedForms();try{for(var i=l(n),o=i.next();!o.done;o=i.next()){var r=o.value;if(r.widget&&!r.widget.ngform.valid)return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return!0},t.prototype.getAllEmbeddedForms=function(){return this.$element.find("form")},Object.defineProperty(t.prototype,"enableNext",{get:function(){return!this.disablenext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableDone",{get:function(){return!this.disabledone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enablePrev",{get:function(){return!this.disableprevious},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return 1===this.status},set:function(e){var t=this.active;this.status=1,e&&!t&&this.redrawChildren()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"done",{get:function(){return 3===this.status},set:function(e){e&&(this.status=3)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return 2===this.status},set:function(e){e&&(this.status=2)},enumerable:!1,configurable:!0}),t.prototype.invokeNextCB=function(e){return this.invokeEventCallback("next",{currentStep:this,stepIndex:e})},t.prototype.invokePrevCB=function(e){return this.invokeEventCallback("prev",{currentStep:this,stepIndex:e})},t.prototype.invokeSkipCB=function(e){return this.invokeEventCallback("skip",{currentStep:this,stepIndex:e})},t.prototype.redrawChildren=function(){var e=this;setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}));var t=e.wizardComponent.getCurrentStepIndex();e.invokeEventCallback("load",{stepIndex:t})}),100)},t}(i.BaseComponent);m.initializeProps=d(),m.decorators=[{type:t.Directive,args:[{selector:"form[wmWizardStep]",providers:[i.provideAsWidgetRef(m)],exportAs:"wmWizardStep"}]}],m.ctorParameters=function(){return[{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Self}]}]},m.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[i.RedrawableDirective,{descendants:!0}]}],isCurrent:[{type:t.HostBinding,args:["class.current"]}]};var f={widgetType:"wm-wizard",hostClass:"app-wizard panel clearfix"},g=function(e){function t(t){var n=this,r=o.noop;return n=e.call(this,t,f,new Promise((function(e){return r=e})))||this,i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.SHELL),n.promiseResolverFn=r,n.message={caption:"",type:""},n}return s(t,e),Object.defineProperty(t.prototype,"hasPrevStep",{get:function(){return!this.isFirstStep(this.currentStep)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNextStep",{get:function(){return!this.isLastStep(this.currentStep)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDoneBtn",{get:function(){if(this.currentStep)return!this.hasNextStep&&this.currentStep.enableDone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enablePrev",{get:function(){if(this.currentStep)return this.currentStep.enablePrev},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableNext",{get:function(){if(this.currentStep)return this.currentStep.enableNext&&this.currentStep.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableDone",{get:function(){if(this.currentStep)return this.currentStep.enableDone&&this.currentStep.isValid},enumerable:!1,configurable:!0}),t.prototype.getNextValidStepFormIndex=function(e){for(var t=e;t<this.steps.length;t++){var n=this.getStepRefByIndex(t);if(n.show)return n}},t.prototype.getPreviousValidStepFormIndex=function(e){for(var t=e;t>=0;t--){var n=this.getStepRefByIndex(t);if(n.show)return n}},t.prototype.getCurrentStepIndex=function(){return this.getStepIndexByRef(this.currentStep)},t.prototype.getStepRefByIndex=function(e){return this.steps.toArray()[e]},t.prototype.getStepIndexByRef=function(e){return this.steps.toArray().indexOf(e)},t.prototype.getStepRefByName=function(e){return this.steps.find((function(t){return t.name===e}))},t.prototype.setDefaultStep=function(e){if(e&&e.show){this.currentStep=e,e.active=!0,e.isInitialized=!0;for(var t=this.getStepIndexByRef(e)-1;t>=0;){var n=this.getStepRefByIndex(t);n.done=!0,n.isInitialized=!0,t--}}else(e=this.getNextValidStepFormIndex(0))&&this.setDefaultStep(e)},t.prototype.onWizardHeaderClick=function(e,t){var n=this;t.done&&(this.steps.forEach((function(e,i){i<n.getStepIndexByRef(t)?(e.done=!0,e.isDone=!0):(e.disabled=!0,e.isDone=!1)})),this.currentStep=t,this.currentStep.active=!0)},t.prototype.next=function(e){void 0===e&&(e="next");var t,n=this.currentStep,i=this.getCurrentStepIndex();if("skip"===e){if(!1===n.invokeSkipCB(i))return}else if("next"===e&&!1===n.invokeNextCB(i))return;(t=this.getNextValidStepFormIndex(i+1)).isInitialized=!0,t&&(n.isDone=!0,n.done=!0,t.active=!0,this.currentStep=t)},t.prototype.prev=function(){var e,t=this.currentStep,n=this.getCurrentStepIndex();!1!==t.invokePrevCB(n)&&(e=this.getPreviousValidStepFormIndex(n-1))&&(t.isDone=!1,t.disabled=!0,e.active=!0,this.currentStep=e)},t.prototype.skip=function(){this.next("skip")},t.prototype.done=function(){this.currentStep.isDone=!0,this.invokeEventCallback("done",{steps:this.steps.toArray()})},t.prototype.cancel=function(){this.invokeEventCallback("cancel",{steps:this.steps.toArray()})},t.prototype.isFirstStep=function(e){return this.steps.first===e},t.prototype.isLastStep=function(e){return this.steps.last===e},t.prototype.onPropertyChange=function(t,n,i){"stepstyle"===t?this.stepClass="justified"===n?"nav-justified":"":"defaultstep"===t?this.setDefaultStep(this.getStepRefByName(n)):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.ngAfterContentInit=function(){e.prototype.ngAfterContentInit.call(this),this.promiseResolverFn()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),i.styler(this.nativeElement.querySelector(".panel-body"),this,i.APPLY_STYLES_TYPE.INNER_SHELL)},t}(i.StylableComponent);g.initializeProps=u(),g.decorators=[{type:t.Component,args:[{selector:"div[wmWizard]",template:'<div class="app-wizard-heading" role="tab">\n <ul class="app-wizard-steps nav nav-pills {{stepClass}}">\n <li class="app-wizard-step" *ngFor="let step of steps; let i = index" [hidden]="!step.show"\n [ngClass]="{active: step.done, current: step.active, disabled: step.disabled}"\n (click)="onWizardHeaderClick($event, step)">\n <a href="javascript:void(0)" [attr.aria-label]="step.title" [attr.title]="step.title">\n <span class="arrow" *ngIf="class && class.includes(\'classic\')"></span>\n <span class="wizard-step-number">\n <span class="count" *ngIf="class && class.includes(\'number\') && !step.isDone">{{i+1}}</span>\n <i class="dottedstepper" *ngIf="class && (class.includes(\'dottedstepper\') || class.includes(\'text-inline\') && !class.includes(\'iconstepper\')) && !step.isDone"></i>\n <i class="app-icon wi wi-done" *ngIf="class && (class.includes(\'dottedstepper\') || class.includes(\'number\')) && step.isDone"></i>\n <i class="app-icon {{step.iconclass}}" *ngIf="(class && class.includes(\'iconstepper\')) && ((step.iconclass && !step.isDone) || (step.iconclass && step.isDone && step.doneiconclass ===\'\'))"></i>\n <i class="app-icon {{step.doneiconclass}}" *ngIf="step.doneiconclass && step.isDone && (class && class.includes(\'iconstepper\'))"></i>\n </span>\n <span class="title-wrapper">\n <span *ngIf="class && class.includes(\'text-inline\')">{{\'0\' + (i+1)}}</span>\n <span class="step-title" [textContent]="step.title"></span>\n </span>\n </a>\n </li>\n </ul>\n</div>\n<div class="app-wizard-body panel-body" role="tabpanel">\n <p wmMessage *ngIf="message.caption" caption.bind="message.caption" type.bind="message.type"></p>\n <ng-content ngProjectAs="form[wmWizardStep]"></ng-content>\n</div>\n<div class="app-wizard-actions panel-footer {{actionsalignment}}">\n <a class="app-wizard-skip" name="skipStep_{{name}}" *ngIf="currentStep?.enableskip" title="Skip step" (click)="skip()">Skip &raquo;</a>\n <div class="app-wizard-actions-right">\n <button type="button" name="cancelBtn_{{name}}" class="btn app-button btn-default" *ngIf="cancelable"\n (click)="cancel()" [title]="cancelbtnlabel" [textContent]="cancelbtnlabel"></button>\n <button type="button" name="previousBtn_{{name}}" class="btn app-button btn-default"\n *ngIf="hasPrevStep" (click)="prev()" [disabled]="!enablePrev">\n <i class="app-icon wi wi-chevron-left"></i>\n <span class="btn-caption" [textContent]="previousbtnlabel"></span>\n </button>\n <button type="button" name="nextBtn_{{name}}" class="btn app-button btn-primary"\n *ngIf="hasNextStep" (click)="next()" [disabled]="!enableNext">\n <span class="btn-caption" [textContent]="nextbtnlabel"></span>\n <i class="app-icon wi wi-chevron-right"></i>\n </button>\n <button type="button" name="doneBtn_{{name}}" class="btn app-button btn-success"\n *ngIf="showDoneBtn" (click)="done()"\n [disabled]="!enableDone">\n <i class="app-icon wm-sl-l sl-check"></i>\n <span class="btn-caption" [textContent]="donebtnlabel"></span>\n </button>\n </div>\n</div>\n',providers:[i.provideAsWidgetRef(g)]}]}],g.ctorParameters=function(){return[{type:t.Injector}]},g.propDecorators={steps:[{type:t.ContentChildren,args:[m]}]};var v=[m,g],y=function(){};y.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:p([],c(v)),exports:p([],c(v)),entryComponents:[]}]}],e.WizardComponent=g,e.WizardModule=y,e.WizardStepDirective=m,e["\u0275a"]=d,e["\u0275b"]=u,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-bootstrap/carousel"),require("@wm/components/base"),require("@swipey")):"function"==typeof define&&define.amd?define("@wm/components/advanced/carousel",["exports","@angular/core","@angular/common","ngx-bootstrap/carousel","@wm/components/base","@swipey"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.carousel={}),e.ng.core,e.ng.common,e["ngx-bootstrap"].carousel,e.wm.components.base,e.swipey)}(this,(function(e,t,n,i,o,r){"use strict";
688
+ ***************************************************************************** */var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function p(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var u=function(){i.register("wm-wizard",new Map([["actionsalignment",Object.assign({value:"right"},i.PROP_STRING)],["cancelable",Object.assign({value:!0},i.PROP_BOOLEAN)],["cancelbtnlabel",Object.assign({value:"Cancel"},i.PROP_STRING)],["class",Object.assign({value:"classic"},i.PROP_STRING)],["defaultstep",Object.assign({value:"none"},i.PROP_STRING)],["donebtnlabel",Object.assign({value:"Done"},i.PROP_STRING)],["name",i.PROP_STRING],["nextbtnlabel",Object.assign({value:"Next"},i.PROP_STRING)],["previousbtnlabel",Object.assign({value:"Previous"},i.PROP_STRING)],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["stepstyle",Object.assign({value:"auto"},i.PROP_STRING)]]))},d=function(){i.register("wm-wizardstep",new Map([["class",i.PROP_STRING],["enableskip",Object.assign({value:!1},i.PROP_BOOLEAN)],["iconclass",Object.assign({value:"wi wi-person"},i.PROP_STRING)],["doneiconclass",Object.assign({value:"wi wi-done"},i.PROP_STRING)],["name",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["title",Object.assign({value:"Step Title"},i.PROP_STRING)],["subtitle",i.PROP_STRING]]))},h={widgetType:"wm-wizardstep",hostClass:"app-wizard-step-content"},m=function(e){function t(t,n){var i=e.call(this,t,h)||this;return i.ngForm=n,i.isDone=!1,i.status=2,i.wizardComponent=i.inj.get(g),i}return s(t,e),Object.defineProperty(t.prototype,"isCurrent",{get:function(){return this.active},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return(this.ngForm.valid||this.ngForm.disabled)&&this.areEmbeddedFormsValid()},enumerable:!1,configurable:!0}),t.prototype.areEmbeddedFormsValid=function(){var e,t,n=this.getAllEmbeddedForms();try{for(var i=l(n),o=i.next();!o.done;o=i.next()){var r=o.value;if(r.widget&&!r.widget.ngform.valid)return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return!0},t.prototype.getAllEmbeddedForms=function(){return this.$element.find("form")},Object.defineProperty(t.prototype,"enableNext",{get:function(){return!this.disablenext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableDone",{get:function(){return!this.disabledone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enablePrev",{get:function(){return!this.disableprevious},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return 1===this.status},set:function(e){var t=this.active;this.status=1,e&&!t&&this.redrawChildren()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"done",{get:function(){return 3===this.status},set:function(e){e&&(this.status=3)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return 2===this.status},set:function(e){e&&(this.status=2)},enumerable:!1,configurable:!0}),t.prototype.invokeNextCB=function(e){return this.invokeEventCallback("next",{currentStep:this,stepIndex:e})},t.prototype.invokePrevCB=function(e){return this.invokeEventCallback("prev",{currentStep:this,stepIndex:e})},t.prototype.invokeSkipCB=function(e){return this.invokeEventCallback("skip",{currentStep:this,stepIndex:e})},t.prototype.redrawChildren=function(){var e=this;setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}));var t=e.wizardComponent.getCurrentStepIndex();e.invokeEventCallback("load",{stepIndex:t})}),100)},t}(i.BaseComponent);m.initializeProps=d(),m.decorators=[{type:t.Directive,args:[{selector:"form[wmWizardStep]",providers:[i.provideAsWidgetRef(m)],exportAs:"wmWizardStep"}]}],m.ctorParameters=function(){return[{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Self}]}]},m.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[i.RedrawableDirective,{descendants:!0}]}],isCurrent:[{type:t.HostBinding,args:["class.current"]}]};var f={widgetType:"wm-wizard",hostClass:"app-wizard panel clearfix"},g=function(e){function t(t){var n=this,r=o.noop;return n=e.call(this,t,f,new Promise((function(e){return r=e})))||this,i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.SHELL),n.promiseResolverFn=r,n.message={caption:"",type:""},n}return s(t,e),Object.defineProperty(t.prototype,"hasPrevStep",{get:function(){return!this.isFirstStep(this.currentStep)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNextStep",{get:function(){return!this.isLastStep(this.currentStep)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDoneBtn",{get:function(){if(this.currentStep)return!this.hasNextStep&&this.currentStep.enableDone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enablePrev",{get:function(){if(this.currentStep)return this.currentStep.enablePrev},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableNext",{get:function(){if(this.currentStep)return this.currentStep.enableNext&&this.currentStep.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableDone",{get:function(){if(this.currentStep)return this.currentStep.enableDone&&this.currentStep.isValid},enumerable:!1,configurable:!0}),t.prototype.getNextValidStepFormIndex=function(e){for(var t=e;t<this.steps.length;t++){var n=this.getStepRefByIndex(t);if(n.show)return n}},t.prototype.getPreviousValidStepFormIndex=function(e){for(var t=e;t>=0;t--){var n=this.getStepRefByIndex(t);if(n.show)return n}},t.prototype.getCurrentStepIndex=function(){return this.getStepIndexByRef(this.currentStep)},t.prototype.getStepRefByIndex=function(e){return this.steps.toArray()[e]},t.prototype.getStepIndexByRef=function(e){return this.steps.toArray().indexOf(e)},t.prototype.getStepRefByName=function(e){return this.steps.find((function(t){return t.name===e}))},t.prototype.setDefaultStep=function(e){if(e&&e.show){this.currentStep=e,e.active=!0,e.isInitialized=!0;for(var t=this.getStepIndexByRef(e)-1;t>=0;){var n=this.getStepRefByIndex(t);n.done=!0,n.isInitialized=!0,t--}}else(e=this.getNextValidStepFormIndex(0))&&this.setDefaultStep(e)},t.prototype.onWizardHeaderClick=function(e,t){var n=this;t.done&&(this.steps.forEach((function(e,i){i<n.getStepIndexByRef(t)?(e.done=!0,e.isDone=!0):(e.disabled=!0,e.isDone=!1)})),this.currentStep=t,this.currentStep.active=!0)},t.prototype.next=function(e){void 0===e&&(e="next");var t,n=this.currentStep,i=this.getCurrentStepIndex();if("skip"===e){if(!1===n.invokeSkipCB(i))return}else if("next"===e&&!1===n.invokeNextCB(i))return;(t=this.getNextValidStepFormIndex(i+1)).isInitialized=!0,t&&(n.isDone=!0,n.done=!0,t.active=!0,this.currentStep=t)},t.prototype.prev=function(){var e,t=this.currentStep,n=this.getCurrentStepIndex();!1!==t.invokePrevCB(n)&&(e=this.getPreviousValidStepFormIndex(n-1))&&(t.isDone=!1,t.disabled=!0,e.active=!0,this.currentStep=e)},t.prototype.skip=function(){this.next("skip")},t.prototype.done=function(){this.currentStep.isDone=!0,this.invokeEventCallback("done",{steps:this.steps.toArray()})},t.prototype.cancel=function(){this.invokeEventCallback("cancel",{steps:this.steps.toArray()})},t.prototype.isFirstStep=function(e){return this.steps.first===e},t.prototype.isLastStep=function(e){return this.steps.last===e},t.prototype.onPropertyChange=function(t,n,i){"stepstyle"===t?this.stepClass="justified"===n?"nav-justified":"":"defaultstep"===t?this.setDefaultStep(this.getStepRefByName(n)):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.ngAfterContentInit=function(){e.prototype.ngAfterContentInit.call(this),this.promiseResolverFn()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),i.styler(this.nativeElement.querySelector(".panel-body"),this,i.APPLY_STYLES_TYPE.INNER_SHELL)},t}(i.StylableComponent);g.initializeProps=u(),g.decorators=[{type:t.Component,args:[{selector:"div[wmWizard]",template:'<div class="app-wizard-heading" role="tab">\n <ul class="app-wizard-steps nav nav-pills {{stepClass}}">\n <li class="app-wizard-step" *ngFor="let step of steps; let i = index" [hidden]="!step.show"\n [ngClass]="{active: step.done, current: step.active, disabled: step.disabled}"\n (click)="onWizardHeaderClick($event, step)">\n <a href="javascript:void(0)" [attr.aria-label]="step.title" [attr.title]="step.title">\n <span class="arrow" *ngIf="class && class.includes(\'classic\')"></span>\n <span class="wizard-step-number">\n <span class="count" *ngIf="class && class.includes(\'number\') && !step.isDone">{{i+1}}</span>\n <i class="dottedstepper" *ngIf="class && (class.includes(\'dottedstepper\') || class.includes(\'text-inline\') && !class.includes(\'iconstepper\')) && !step.isDone"></i>\n <i class="app-icon wi wi-done" *ngIf="class && (class.includes(\'dottedstepper\') || class.includes(\'number\')) && step.isDone"></i>\n <i class="app-icon {{step.iconclass}}" *ngIf="(class && class.includes(\'iconstepper\')) && ((step.iconclass && !step.isDone) || (step.iconclass && step.isDone && step.doneiconclass ===\'\'))"></i>\n <i class="app-icon {{step.doneiconclass}}" *ngIf="step.doneiconclass && step.isDone && (class && class.includes(\'iconstepper\'))"></i>\n </span>\n <span class="title-wrapper">\n <span *ngIf="class && class.includes(\'text-inline\')">{{\'0\' + (i+1)}}</span>\n <span class="step-title" [textContent]="step.title"></span>\n </span>\n <span class="subtitle-wrapper" [attr.title]="step.subtitle">\n <span class="step-title" [textContent]="step.subtitle"></span>\n </span>\n </a>\n </li>\n </ul>\n</div>\n<div class="app-wizard-body panel-body" role="tabpanel">\n <p wmMessage *ngIf="message.caption" caption.bind="message.caption" type.bind="message.type"></p>\n <ng-content ngProjectAs="form[wmWizardStep]"></ng-content>\n</div>\n<div class="app-wizard-actions panel-footer {{actionsalignment}}">\n <a class="app-wizard-skip" name="skipStep_{{name}}" *ngIf="currentStep?.enableskip" title="Skip step" (click)="skip()">Skip &raquo;</a>\n <div class="app-wizard-actions-right">\n <button type="button" name="cancelBtn_{{name}}" class="btn app-button btn-default" *ngIf="cancelable"\n (click)="cancel()" [title]="cancelbtnlabel" [textContent]="cancelbtnlabel"></button>\n <button type="button" name="previousBtn_{{name}}" class="btn app-button btn-default"\n *ngIf="hasPrevStep" (click)="prev()" [disabled]="!enablePrev">\n <i class="app-icon wi wi-chevron-left"></i>\n <span class="btn-caption" [textContent]="previousbtnlabel"></span>\n </button>\n <button type="button" name="nextBtn_{{name}}" class="btn app-button btn-primary"\n *ngIf="hasNextStep" (click)="next()" [disabled]="!enableNext">\n <span class="btn-caption" [textContent]="nextbtnlabel"></span>\n <i class="app-icon wi wi-chevron-right"></i>\n </button>\n <button type="button" name="doneBtn_{{name}}" class="btn app-button btn-success"\n *ngIf="showDoneBtn" (click)="done()"\n [disabled]="!enableDone">\n <i class="app-icon wm-sl-l sl-check"></i>\n <span class="btn-caption" [textContent]="donebtnlabel"></span>\n </button>\n </div>\n</div>\n',providers:[i.provideAsWidgetRef(g)]}]}],g.ctorParameters=function(){return[{type:t.Injector}]},g.propDecorators={steps:[{type:t.ContentChildren,args:[m]}]};var v=[m,g],y=function(){};y.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:p([],c(v)),exports:p([],c(v)),entryComponents:[]}]}],e.WizardComponent=g,e.WizardModule=y,e.WizardStepDirective=m,e["\u0275a"]=d,e["\u0275b"]=u,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-bootstrap/carousel"),require("@wm/components/base"),require("@swipey")):"function"==typeof define&&define.amd?define("@wm/components/advanced/carousel",["exports","@angular/core","@angular/common","ngx-bootstrap/carousel","@wm/components/base","@swipey"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.carousel={}),e.ng.core,e.ng.common,e["ngx-bootstrap"].carousel,e.wm.components.base,e.swipey)}(this,(function(e,t,n,i,o,r){"use strict";
689
689
  /*! *****************************************************************************
690
690
  Copyright (c) Microsoft Corporation.
691
691