// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/dom dojo/_base/lang ../core/Accessor ../core/ArrayPool ../core/Collection ../core/Evented ../core/Handles ../core/Logger ../core/watchUtils ../core/accessorSupport/decorators maquette".split(" "),function(w,x,k,d,l,m,n,g,f,p,q,r,e,c,t){var u=r.getLogger("esri.widgets.Widget"),v=0;return function(h){function a(b,a){b=h.call(this)||this;b._attached=!1;b.destroyed=!1;b.domNode=null;b.iconClass="esri-icon-checkbox-unchecked"; b.visible=!0;b._internalHandles=new q;b.render=b.render.bind(b);return b}k(a,h);a.prototype.normalizeCtorArgs=function(b,a){b=m.mixin({},b);a&&(b.container=a);return b};a.prototype.initialize=function(){var b=this;this._internalHandles.add(this._renderableProps.map(function(a){return e.init(b,a,function(b,c){var d=this;f.isCollection(c)&&this._internalHandles.remove(this.declaredClass+":"+a+"-collection-change-event-listener");f.isCollection(b)&&(b=b.on("change",function(){return d.scheduleRender()}), this._internalHandles.add(b,this.declaredClass+":"+a+"-collection-change-event-listener"));this.scheduleRender()})}));this._delegatedEventNames.length&&this._internalHandles.add(e.init(this,"viewModel",function(){b._get("viewModel")&&b._internalHandles.remove("delegated-events");b._delegatedEventNames.map(function(a){return b.viewModel.on(a,function(c){b.emit(a,c)})})}),"delegated-events");this.postInitialize();this._internalHandles.add(e.whenOnce(this,"container",function(a){return b._attach(a)}))}; a.prototype.postInitialize=function(){};a.prototype.destroy=function(){this.destroyed||(this.viewModel&&this.viewModel.destroy(),this._detach(this.container),this._internalHandles.destroy(),this._set("destroyed",!0))};a.prototype.startup=function(){u.warn("Widget.startup() is deprecated and no longer needed")};Object.defineProperty(a.prototype,"container",{set:function(b){this._get("container")||this._set("container",b)},enumerable:!0,configurable:!0});a.prototype.castContainer=function(b){return l.byId(b)}; Object.defineProperty(a.prototype,"id",{get:function(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+v++},set:function(b){b&&this._set("id",b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.declaredClass.split(".").pop()},enumerable:!0,configurable:!0});a.prototype.scheduleRender=function(){this._projector.scheduleRender()};a.prototype.on=function(b,a){var c=this.inherited(arguments);this._internalHandles.add(c); return c};a.prototype.classes=function(b){for(var a=g.acquire(),c=0;c