/*
    *
    * Wijmo Library 5.20181.462
    * http://wijmo.com/
    *
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    *
    * Licensed under the GrapeCity Commercial License.
    * sales@wijmo.com
    * wijmo.com/products/wijmo-5/license/
    *
    */
"use strict";function _getProps(t,e){for(var i=window,n=t.split("."),o=0;o<n.length&&null!=i;o++)i=i[n[o]];if(!i)return null;for(var r=["control","initialized","wjProperty"],s=i.prototype;s!=Object.prototype;s=Object.getPrototypeOf(s))for(var p=Object.getOwnPropertyNames(s),o=0;o<p.length;o++){var a=p[o],l=Object.getOwnPropertyDescriptor(s,a),h=a.match(/^on[A-Z]/);(l.set||h)&&(h&&(a=a[2].toLowerCase()+a.substr(3)),r.indexOf(a)<0&&!a.match(/disabled|required/)&&r.push(a))}return e&&Array.prototype.push.apply(r,e),r}function _initialize(t,e){function i(t){this.ctl[this.prop]=t}var n=[];for(var o in t.$options.propsData)n.push(o);return n.sort(),n.forEach(function(n){!(n in e)||e[n]instanceof wjcCore.Event||wjcCore.isUndefined(t[n])||(e[n]=t[n],t.$watch(n,i.bind({ctl:e,prop:n})))}),n.forEach(function(i){if(e[i]instanceof wjcCore.Event){var n=e[i];wjcCore.isFunction(t[i])&&n.addHandler(t[i],e)}}),t.control&&t.$parent&&(t.$parent[t.control]=e),wjcCore.isFunction(t.initialized)&&t.initialized(e),e}Object.defineProperty(exports,"__esModule",{value:!0});var wjcCore=require("wijmo/wijmo"),wjcSelfRef=require("wijmo/wijmo.vue2.base"),wjcSelf=wjcSelfRef||exports;window.wijmo=window.wijmo||{},window.wijmo.vue2=window.wijmo.vue2||{},window.wijmo.vue2.base=wjcSelf;var vue_1=require("vue"),VueModule=require("vue");exports.Vue=vue_1.default||VueModule,exports.WjVueBase=exports.Vue.extend({beforeCreate:function(){var t=this.$options[WjComponentBehavior._behClassProp];t&&(this[WjComponentBehavior._behProp]=t._attach(this))},mounted:function(){this[WjComponentBehavior._behProp].lhMounted()},destroyed:function(){this[WjComponentBehavior._behProp].lhDestroyed()}});var WjComponentBehavior=function(){function t(t){this._isMounted=!1,this._mountedCBs=[],this.component=t}return t._attach=function(t){return new this(t)},t.register=function(){var e=(i={extends:exports.WjVueBase,template:this.template,props:_getProps(this.className)},i[t._behClassProp]=this,i);return exports.Vue.component(this.tag,e);var i},t.prototype.lhMounted=function(){var e=this;if(this._isChild()){var i=this.component.$parent;i&&(this.parent=i[t._behProp],this.parent._mountedCB(function(){e._prepareControl(),e._initParent()}))}else this._prepareControl()},t.prototype.lhDestroyed=function(){this._siblingInsertedEH&&this._getElement().removeEventListener("DOMNodeInserted",this._siblingInsertedEH);var t=this.control;if(t)if(this._isChild()){var e=this._getParentProp();if(e){var i=this.parent.control[e];if(wjcCore.isArray(i)){var n=i.indexOf(t);n>-1&&i.splice(n,1)}}}else t instanceof wjcCore.Control&&t.dispose()},t.prototype._createControl=function(){var t=this._isChild()?this._isParentInCtor()?this.parent.control:void 0:this._getElement();return new(this.constructor._getControlType())(t)},t.prototype._initParent=function(){var t=this._getParentProp();if(t){var e=this.parent.control,i=e[t];if(wjcCore.isArray(i)){var n=this._getSiblingIndex();(n<0||n>=i.length)&&(n=i.length),i.splice(n,0,this.control),this._siblingInsertedEH=this._siblingInserted.bind(this),this._getElement().addEventListener("DOMNodeInserted",this._siblingInsertedEH)}else e[t]=this.control}},t.prototype._prepareControl=function(){var t=this.control=this._createControl(),e=this._getElement(),i=(wjcCore.Control,this.constructor);this._siblingId||(null==i.siblingId&&(i.siblingId=++i._siblingDirId+""),this._siblingId=i.siblingId),e.setAttribute(i._typeSiblingIdAttr,this._siblingId),this._isMounted=!0;var n=this._mountedCBs;this._mountedCBs=[];for(var o=0,r=n;o<r.length;o++)(0,r[o])();_initialize(this.component,t)},t.prototype._isChild=function(){var t=this.constructor;return null!=t.parentProp||null!=t.parentInCtor},t.prototype._isParentInCtor=function(){return!0===this.constructor.parentInCtor},t.prototype._getParentProp=function(){return this.component.$options.propsData.wjProperty||this.constructor.parentProp},t.prototype._getSiblingIndex=function(){var e=this._getElement(),i=e.parentElement;if(!i)return-1;for(var n=i.childNodes,o=-1,r=this._siblingId,s=0;s<n.length;s++){var p=n[s];if(1==p.nodeType&&p.getAttribute(t._typeSiblingIdAttr)==r&&(++o,p===e))return o}return-1},t.prototype._siblingInserted=function(t){if(t.target===this._getElement()){var e=this._getSiblingIndex(),i=this.control,n=this.parent.control[this._getParentProp()],o=n.indexOf(i);e>=0&&o>=0&&e!==o&&(n.splice(o,1),e=Math.min(e,n.length),n.splice(e,0,i))}},t.prototype._getElement=function(){return this.component.$el},t._getControlType=function(){return this.classCtor()},t.prototype._mountedCB=function(t){this._isMounted?t():this._mountedCBs.push(t)},t._typeSiblingIdAttr="_wjSiblingId",t._behClassProp="_wjBehCl",t._behProp="__wjBeh",t._siblingDirId=0,t}();exports.WjComponentBehavior=WjComponentBehavior,exports._getProps=_getProps,exports._initialize=_initialize;