System.register(["./json-asset-607afd3e.js","./spot-light-efad47c2.js"],(function(t){"use strict";var e,a,i,n,s,r,l,o,h,c,u,_,f,m,g,d;return{setters:[function(t){e=t.ep,a=t.eu,i=t.dp,n=t.ev,s=t.d,r=t.ei,l=t.eq,o=t.l,h=t.et,c=t.g7,u=t.er,_=t.ez,f=t.dO,m=t.dJ,g=t.es},function(t){d=t.o}],execute:function(){var M,p,I,v,y,b,w,k,C,F,O={parent:null,owner:null,subModelIdx:0},R=t("R",(M=e("cc.RenderableComponent"),p=a([i]),I=a(i),v=h(),y=c(),M((F=function(t){function e(){for(var e,a=arguments.length,i=new Array(a),n=0;n<a;n++)i[n]=arguments[n];return e=t.call.apply(t,[this].concat(i))||this,u(e,"_materials",k,_(e)),u(e,"_visFlags",C,_(e)),e._materialInstances=[],e._models=[],e}n(e,t);var a=e.prototype;return a.getMaterial=function(t){return t<0||t>=this._materials.length?null:this._materials[t]},a.setMaterial=function(t,e){t&&t instanceof d&&console.error("Can't set a material instance to a sharedMaterial slot"),this._materials[e]=t;var a=this._materialInstances[e];a&&(a.destroy(),this._materialInstances[e]=null),this._onMaterialModified(e,this._materials[e])},a.getMaterialInstance=function(t){if(!this._materials[t])return null;if(!this._materialInstances[t]){O.parent=this._materials[t],O.owner=this,O.subModelIdx=t;var e=new d(O);O.parent=null,O.owner=null,O.subModelIdx=0,this.setMaterialInstance(e,t)}return this._materialInstances[t]},a.setMaterialInstance=function(t,e){if("number"==typeof t){s(12007);var a=t;t=e,e=a}var i=this._materialInstances[e];t&&t.parent?t!==i&&(this._materialInstances[e]=t,this._onMaterialModified(e,t)):(t!==this._materials[e]||i)&&this.setMaterial(t,e)},a.getRenderMaterial=function(t){return this._materialInstances[t]||this._materials[t]},a._collectModels=function(){return this._models},a._attachToScene=function(){},a._detachFromScene=function(){},a._onMaterialModified=function(){},a._onRebuildPSO=function(){},a._clearMaterials=function(){},a._onVisibilityChange=function(){},r(e,[{key:"visibility",get:function(){return this._visFlags},set:function(t){this._visFlags=t,this._onVisibilityChange(t)}},{key:"sharedMaterials",get:function(){return this._materials},set:function(t){for(var e=0;e<t.length;e++)t[e]!==this._materials[e]&&this.setMaterial(t[e],e);if(t.length<this._materials.length){for(var a=t.length;a<this._materials.length;a++)this.setMaterial(null,a);this._materials.splice(t.length)}}},{key:"materials",get:function(){for(var t=0;t<this._materials.length;t++)this._materialInstances[t]=this.getMaterialInstance(t);return this._materialInstances},set:function(t){var e=t.length-this._materials.length;if(e>0)this._materials.length=t.length,this._materialInstances.length=t.length;else if(e<0)for(var a=this._materials.length-e;a<this._materials.length;++a)this.setMaterialInstance(null,a);for(var i=0;i<this._materialInstances.length;i++)this._materialInstances[i]!=t[i]&&this.setMaterialInstance(t[i],i)}},{key:"sharedMaterial",get:function(){return this.getMaterial(0)}},{key:"material",get:function(){return this.getMaterialInstance(0)},set:function(t){(1!==this._materials.length||this._materialInstances[0]||this._materials[0]!==t)&&this.setMaterialInstance(t,0)}}]),e}(f),k=l((w=F).prototype,"_materials",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=l(w.prototype,"_visFlags",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return m.Enum.NONE}}),l(w.prototype,"sharedMaterials",[I,v,y],Object.getOwnPropertyDescriptor(w.prototype,"sharedMaterials"),w.prototype),b=w))||b));o.RenderableComponent=R}}}));
