=0;B--)this.removeListener(P,S[B]);return this};function g(C,P,S){var V=C._events;if(V===void 0)return[];var B=V[P];return B===void 0?[]:typeof B=="function"?S?[B.listener||B]:[B]:S?R(B):f(B,B.length)}i.prototype.listeners=function(P){return g(this,P,!0)},i.prototype.rawListeners=function(P){return g(this,P,!1)},i.listenerCount=function(C,P){return typeof C.listenerCount=="function"?C.listenerCount(P):_.call(C,P)},i.prototype.listenerCount=_;function _(C){var P=this._events;if(P!==void 0){var S=P[C];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]};function f(C,P){for(var S=new Array(P),V=0;V>1,u=-7,d=m?s-1:0,g=m?-1:1,_=p[c+d];for(d+=g,i=_&(1<<-u)-1,_>>=-u,u+=e;u>0;i=i*256+p[c+d],d+=g,u-=8);for(r=i&(1<<-u)-1,i>>=-u,u+=h;u>0;r=r*256+p[c+d],d+=g,u-=8);if(i===0)i=1-o;else{if(i===t)return r?NaN:(_?-1:1)*(1/0);r=r+Math.pow(2,h),i=i-o}return(_?-1:1)*r*Math.pow(2,i-h)},x.write=function(p,c,m,h,s,i){var r,e,t,o=i*8-s-1,u=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=h?0:i-1,f=h?1:-1,v=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(e=isNaN(c)?1:0,r=u):(r=Math.floor(Math.log(c)/Math.LN2),c*(t=Math.pow(2,-r))<1&&(r--,t*=2),r+d>=1?c+=g/t:c+=g*Math.pow(2,1-d),c*t>=2&&(r++,t/=2),r+d>=u?(e=0,r=u):r+d>=1?(e=(c*t-1)*Math.pow(2,s),r=r+d):(e=c*Math.pow(2,d-1)*Math.pow(2,s),r=0));s>=8;p[m+_]=e&255,_+=f,e/=256,s-=8);for(r=r<0;p[m+_]=r&255,_+=f,r/=256,o-=8);p[m+_-f]|=v*128}},{}],6:[function(y,k,x){(function(p,c){(function(){"use strict";let m=y("events").EventEmitter,h=y("./store"),s=y("./topic-alias-recv"),i=y("./topic-alias-send"),r=y("mqtt-packet"),e=y("./default-message-id-provider"),t=y("readable-stream").Writable,o=y("inherits"),u=y("reinterval"),d=y("rfdc/default"),g=y("./validations"),_=y("xtend"),f=y("debug")("mqttjs:client"),v=p?p.nextTick:function(E){setTimeout(E,0)},R=c.setImmediate||function(E){v(E)},A={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0},W=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],j={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function C(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function P(E,T){if(E.options.protocolVersion===5&&T.cmd==="publish"){let U;T.properties&&(U=T.properties.topicAlias);let z=T.topic.toString();if(E.topicAliasSend)if(U){if(z.length!==0&&(f("applyTopicAlias :: register topic: %s - alias: %d",z,U),!E.topicAliasSend.put(z,U)))return f("applyTopicAlias :: error out of range. topic: %s - alias: %d",z,U),new Error("Sending Topic Alias out of range")}else z.length!==0&&(E.options.autoAssignTopicAlias?(U=E.topicAliasSend.getAliasByTopic(z),U?(T.topic="",T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",z,U)):(U=E.topicAliasSend.getLruAlias(),E.topicAliasSend.put(z,U),T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto assign topic: %s - alias: %d",z,U))):E.options.autoUseTopicAlias&&(U=E.topicAliasSend.getAliasByTopic(z),U&&(T.topic="",T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto use topic: %s - alias: %d",z,U))));else if(U)return f("applyTopicAlias :: error out of range. topic: %s - alias: %d",z,U),new Error("Sending Topic Alias out of range")}}function S(E,T){let U;T.properties&&(U=T.properties.topicAlias);let z=T.topic.toString();if(z.length===0){if(typeof U>"u")return new Error("Unregistered Topic Alias");if(z=E.topicAliasSend.getTopicByAlias(U),typeof z>"u")return new Error("Unregistered Topic Alias");T.topic=z}U&&delete T.properties.topicAlias}function V(E,T,U){f("sendPacket :: packet: %O",T),f("sendPacket :: emitting `packetsend`"),E.emit("packetsend",T),f("sendPacket :: writing to stream");let z=r.writeToStream(T,E.stream,E.options);f("sendPacket :: writeToStream result %s",z),!z&&U&&U!==ie?(f("sendPacket :: handle events on `drain` once through callback."),E.stream.once("drain",U)):U&&(f("sendPacket :: invoking cb"),U())}function B(E){E&&(f("flush: queue exists? %b",!!E),Object.keys(E).forEach(function(T){typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function ne(E){E&&(f("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(E).forEach(function(T){E[T].volatile&&typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function se(E,T,U,z){f("storeAndSend :: store packet with cmd %s to outgoingStore",T.cmd);let re=T,ee;if(re.cmd==="publish"&&(re=d(T),ee=S(E,re),ee))return U&&U(ee);E.outgoingStore.put(re,function(D){if(D)return U&&U(D);z(),V(E,T,U)})}function ie(E){f("nop ::",E)}function G(E,T){let U,z=this;if(!(this instanceof G))return new G(E,T);this.options=T||{};for(U in A)typeof this.options[U]>"u"?this.options[U]=A[U]:this.options[U]=T[U];f("MqttClient :: options.protocol",T.protocol),f("MqttClient :: options.protocolVersion",T.protocolVersion),f("MqttClient :: options.username",T.username),f("MqttClient :: options.keepalive",T.keepalive),f("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),f("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),f("MqttClient :: options.topicAliasMaximum",T.topicAliasMaximum),this.options.clientId=typeof T.clientId=="string"?T.clientId:C(),f("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new e:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new h,this.incomingStore=T.incomingStore||new h,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.topicAliasMaximum>0&&(T.topicAliasMaximum>65535?f("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(T.topicAliasMaximum)),this.on("connect",function(){let re=this.queue;function ee(){let H=re.shift();f("deliver :: entry %o",H);let D=null;if(!H){z._resubscribe();return}D=H.packet,f("deliver :: call _sendPacket for %o",D);let X=!0;D.messageId&&D.messageId!==0&&(z.messageIdProvider.register(D.messageId)||(X=!1)),X?z._sendPacket(D,function($){H.cb&&H.cb($),ee()}):(f("messageId: %d has already used. The message is skipped and removed.",D.messageId),ee())}f("connect :: sending queued packets"),ee()}),this.on("close",function(){f("close :: connected set to `false`"),this.connected=!1,f("close :: clearing connackTimer"),clearTimeout(this.connackTimer),f("close :: clearing ping timer"),z.pingTimer!==null&&(z.pingTimer.clear(),z.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),f("close :: calling _setupReconnect"),this._setupReconnect()}),m.call(this),f("MqttClient :: setting up stream"),this._setupStream()}o(G,m),G.prototype._setupStream=function(){let E=this,T=new t,U=r.parser(this.options),z=null,re=[];f("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),f("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),U.on("packet",function($){f("parser :: on packet push to packets array."),re.push($)});function ee(){if(re.length)v(H);else{let $=z;z=null,$()}}function H(){f("work :: getting next packet in queue");let $=re.shift();if($)f("work :: packet pulled from queue"),E._handlePacket($,ee);else{f("work :: no packets in queue");let oe=z;z=null,f("work :: done flag is %s",!!oe),oe&&oe()}}T._write=function($,oe,Z){z=Z,f("writable stream :: parsing buffer"),U.parse($),H()};function D($){f("streamErrorHandler :: error",$.message),W.includes($.code)?(f("streamErrorHandler :: emitting error"),E.emit("error",$)):ie($)}f("_setupStream :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",D),this.stream.on("close",function(){f("(%s)stream :: on close",E.options.clientId),ne(E.outgoing),f("stream: emit close to MqttClient"),E.emit("close")}),f("_setupStream: sending packet `connect`");let X=Object.create(this.options);if(X.cmd="connect",this.topicAliasRecv&&(X.properties||(X.properties={}),this.topicAliasRecv&&(X.properties.topicAliasMaximum=this.topicAliasRecv.max)),V(this,X),U.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return E.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let $=_({cmd:"auth",reasonCode:0},this.options.authPacket);V(this,$)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){f("!!connectTimeout hit!! Calling _cleanUp with force `true`"),E._cleanUp(!0)},this.options.connectTimeout)},G.prototype._handlePacket=function(E,T){let U=this.options;if(U.protocolVersion===5&&U.properties&&U.properties.maximumPacketSize&&U.properties.maximumPacketSize0||!D())&&this._storeProcessingQueue.push({invoke:D,cbStorePut:U.cbStorePut,callback:z}),this},G.prototype.subscribe=function(){let E=this,T=new Array(arguments.length);for(let Z=0;Z0){let te={qos:Y.qos};D===5&&(te.nl=Y.nl||!1,te.rap=Y.rap||!1,te.rh=Y.rh||0,te.properties=Y.properties),E._resubscribeTopics[Y.topic]=te,M.push(Y.topic)}}),E.messageIdToTopic[F.messageId]=M}return E.outgoing[F.messageId]={volatile:!0,cb:function(M,Y){if(!M){let te=Y.granted;for(let O=0;O0||!oe())&&this._storeProcessingQueue.push({invoke:oe,callback:ee}),this},G.prototype.unsubscribe=function(){let E=this,T=new Array(arguments.length);for(let D=0;D0||!H())&&this._storeProcessingQueue.push({invoke:H,callback:z}),this},G.prototype.end=function(E,T,U){let z=this;f("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(U=T||ie,T=E,E=!1,typeof T!="object"&&(U=T,T=null,typeof U!="function"&&(U=ie))),typeof T!="object"&&(U=T,T=null),f("end :: cb? %s",!!U),U=U||ie;function re(){f("end :: closeStores: closing incoming and outgoing stores"),z.disconnected=!0,z.incomingStore.close(function(H){z.outgoingStore.close(function(D){if(f("end :: closeStores: emitting end"),z.emit("end"),U){let X=H||D;f("end :: closeStores: invoking callback with args"),U(X)}})}),z._deferredReconnect&&z._deferredReconnect()}function ee(){f("end :: (%s) :: finish :: calling _cleanUp with force %s",z.options.clientId,E),z._cleanUp(E,()=>{f("end :: finish :: calling process.nextTick on closeStores"),v(re.bind(z))},T)}return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(f("end :: (%s) :: calling finish in 10ms once outgoing is empty",z.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,ee,10))):(f("end :: (%s) :: immediately calling finish",z.options.clientId),ee()),this)},G.prototype.removeOutgoingMessage=function(E){let T=this.outgoing[E]?this.outgoing[E].cb:null;return delete this.outgoing[E],this.outgoingStore.del({messageId:E},function(){T(new Error("Message removed"))}),this},G.prototype.reconnect=function(E){f("client reconnect");let T=this,U=function(){E?(T.options.incomingStore=E.incomingStore,T.options.outgoingStore=E.outgoingStore):(T.options.incomingStore=null,T.options.outgoingStore=null),T.incomingStore=T.options.incomingStore||new h,T.outgoingStore=T.options.outgoingStore||new h,T.disconnecting=!1,T.disconnected=!1,T._deferredReconnect=null,T._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=U:U(),this},G.prototype._reconnect=function(){f("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),f("client already connected. disconnecting first.")):(f("_reconnect: calling _setupStream"),this._setupStream())},G.prototype._setupReconnect=function(){let E=this;!E.disconnecting&&!E.reconnectTimer&&E.options.reconnectPeriod>0?(this.reconnecting||(f("_setupReconnect :: emit `offline` state"),this.emit("offline"),f("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),f("_setupReconnect :: setting reconnectTimer for %d ms",E.options.reconnectPeriod),E.reconnectTimer=setInterval(function(){f("reconnectTimer :: reconnect triggered!"),E._reconnect()},E.options.reconnectPeriod)):f("_setupReconnect :: doing nothing...")},G.prototype._clearReconnect=function(){f("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},G.prototype._cleanUp=function(E,T){let U=arguments[2];if(T&&(f("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),f("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&B(this.outgoing),f("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let z=_({cmd:"disconnect"},U);f("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(z,R.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(f("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(f("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),T&&!this.connected&&(f("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())},G.prototype._sendPacket=function(E,T,U){f("_sendPacket :: (%s) :: start",this.options.clientId),U=U||ie,T=T||ie;let z=P(this,E);if(z){T(z);return}if(!this.connected){if(E.cmd==="auth"){this._shiftPingInterval(),V(this,E,T);return}f("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,U);return}switch(this._shiftPingInterval(),E.cmd){case"publish":break;case"pubrel":se(this,E,T,U);return;default:V(this,E,T);return}switch(E.qos){case 2:case 1:se(this,E,T,U);break;case 0:default:V(this,E,T);break}f("_sendPacket :: (%s) :: end",this.options.clientId)},G.prototype._storePacket=function(E,T,U){f("_storePacket :: packet: %o",E),f("_storePacket :: cb? %s",!!T),U=U||ie;let z=E;if(z.cmd==="publish"){z=d(E);let re=S(this,z);if(re)return T&&T(re)}(z.qos||0)===0&&this.queueQoSZero||z.cmd!=="publish"?this.queue.push({packet:z,cb:T}):z.qos>0?(T=this.outgoing[z.messageId]?this.outgoing[z.messageId].cb:null,this.outgoingStore.put(z,function(re){if(re)return T&&T(re);U()})):T&&T(new Error("No connection to broker"))},G.prototype._setupPingTimer=function(){f("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);let E=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=u(function(){E._checkPing()},this.options.keepalive*1e3))},G.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},G.prototype._checkPing=function(){f("_checkPing :: checking ping..."),this.pingResp?(f("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(f("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},G.prototype._handlePingresp=function(){this.pingResp=!0},G.prototype._handleConnack=function(E){f("_handleConnack");let T=this.options,z=T.protocolVersion===5?E.reasonCode:E.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,E.properties){if(E.properties.topicAliasMaximum){if(E.properties.topicAliasMaximum>65535){this.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}E.properties.topicAliasMaximum>0&&(this.topicAliasSend=new i(E.properties.topicAliasMaximum))}E.properties.serverKeepAlive&&T.keepalive&&(T.keepalive=E.properties.serverKeepAlive,this._shiftPingInterval()),E.properties.maximumPacketSize&&(T.properties||(T.properties={}),T.properties.maximumPacketSize=E.properties.maximumPacketSize)}if(z===0)this.reconnecting=!1,this._onConnect(E);else if(z>0){let re=new Error("Connection refused: "+j[z]);re.code=z,this.emit("error",re)}},G.prototype._handleAuth=function(E){let U=this.options.protocolVersion,z=U===5?E.reasonCode:E.returnCode;if(U!==5){let ee=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+U);ee.code=z,this.emit("error",ee);return}let re=this;this.handleAuth(E,function(ee,H){if(ee){re.emit("error",ee);return}if(z===24)re.reconnecting=!1,re._sendPacket(H);else{let D=new Error("Connection refused: "+j[z]);ee.code=z,re.emit("error",D)}})},G.prototype.handleAuth=function(E,T){T()},G.prototype._handlePublish=function(E,T){f("_handlePublish: packet %o",E),T=typeof T<"u"?T:ie;let U=E.topic.toString(),z=E.payload,re=E.qos,ee=E.messageId,H=this,D=this.options,X=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let $;if(E.properties&&($=E.properties.topicAlias),typeof $<"u")if(U.length===0)if($>0&&$<=65535){let oe=this.topicAliasRecv.getTopicByAlias($);if(oe)U=oe,f("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",U,$);else{f("_handlePublish :: unregistered topic alias. alias: %d",$),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{f("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}else if(this.topicAliasRecv.put(U,$))f("_handlePublish :: registered topic: %s - alias: %d",U,$);else{f("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(f("_handlePublish: qos %d",re),re){case 2:{D.customHandleAcks(U,z,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for pubrec"));oe?H._sendPacket({cmd:"pubrec",messageId:ee,reasonCode:oe},T):H.incomingStore.put(E,function(){H._sendPacket({cmd:"pubrec",messageId:ee},T)})});break}case 1:{D.customHandleAcks(U,z,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for puback"));oe||H.emit("message",U,z,E),H.handleMessage(E,function(Z){if(Z)return T&&T(Z);H._sendPacket({cmd:"puback",messageId:ee,reasonCode:oe},T)})});break}case 0:this.emit("message",U,z,E),this.handleMessage(E,T);break;default:f("_handlePublish: unknown QoS. Doing nothing.");break}},G.prototype.handleMessage=function(E,T){T()},G.prototype._handleAck=function(E){let T=E.messageId,U=E.cmd,z=null,re=this.outgoing[T]?this.outgoing[T].cb:null,ee=this,H;if(!re){f("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(f("_handleAck :: packet type",U),U){case"pubcomp":case"puback":{let D=E.reasonCode;D&&D>0&&D!==16&&(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)),delete this.outgoing[T],this.outgoingStore.del(E,re),this.messageIdProvider.deallocate(T),this._invokeStoreProcessingQueue();break}case"pubrec":{z={cmd:"pubrel",qos:2,messageId:T};let D=E.reasonCode;D&&D>0&&D!==16?(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)):this._sendPacket(z);break}case"suback":{delete this.outgoing[T],this.messageIdProvider.deallocate(T);for(let D=0;D0)if(this.options.resubscribe)if(this.options.protocolVersion===5){f("_resubscribe: protocolVersion 5");for(let T=0;T0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1},G.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},G.prototype._flushStoreProcessingQueue=function(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},k.exports=G}).call(this)}).call(this,y("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-message-id-provider":12,"./store":13,"./topic-alias-recv":14,"./topic-alias-send":15,"./validations":16,_process:85,debug:20,events:4,inherits:24,"mqtt-packet":48,"readable-stream":72,reinterval:73,"rfdc/default":74,xtend:82}],7:[function(y,k,x){"use strict";let{Buffer:p}=y("buffer"),c=y("readable-stream").Transform,m=y("duplexify"),h,s,i,r=!1;function e(){let g=new c;return g._write=function(_,f,v){h.sendSocketMessage({data:_.buffer,success:function(){v()},fail:function(){v(new Error)}})},g._flush=function(f){h.closeSocket({success:function(){f()}})},g}function t(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function o(g,_){let f=g.protocol==="alis"?"wss":"ws",v=f+"://"+g.hostname+g.path;return g.port&&g.port!==80&&g.port!==443&&(v=f+"://"+g.hostname+":"+g.port+g.path),typeof g.transformWsUrl=="function"&&(v=g.transformWsUrl(v,g,_)),v}function u(){r||(r=!0,h.onSocketOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onSocketMessage(function(g){if(typeof g.data=="string"){let _=p.from(g.data,"base64");s.push(_)}else{let _=new FileReader;_.addEventListener("load",function(){let f=_.result;f instanceof ArrayBuffer?f=p.from(f):f=p.from(f,"utf8"),s.push(f)}),_.readAsArrayBuffer(g.data)}}),h.onSocketClose(function(){i.end(),i.destroy()}),h.onSocketError(function(g){i.destroy(g)}))}function d(g,_){if(_.hostname=_.hostname||_.host,!_.hostname)throw new Error("Could not determine host. Specify host manually.");let f=_.protocolId==="MQIsdp"&&_.protocolVersion===3?"mqttv3.1":"mqtt";t(_);let v=o(_,g);return h=_.my,h.connectSocket({url:v,protocols:f}),s=e(),i=m.obj(),u(),i}k.exports=d},{buffer:3,duplexify:22,"readable-stream":72}],8:[function(y,k,x){"use strict";let p=y("net"),c=y("debug")("mqttjs:tcp");function m(h,s){s.port=s.port||1883,s.hostname=s.hostname||s.host||"localhost";let i=s.port,r=s.hostname;return c("port %d and host %s",i,r),p.createConnection(i,r)}k.exports=m},{debug:20,net:2}],9:[function(y,k,x){"use strict";let p=y("tls"),c=y("net"),m=y("debug")("mqttjs:tls");function h(s,i){i.port=i.port||8883,i.host=i.hostname||i.host||"localhost",c.isIP(i.host)===0&&(i.servername=i.host),i.rejectUnauthorized=i.rejectUnauthorized!==!1,delete i.path,m("port %d host %s rejectUnauthorized %b",i.port,i.host,i.rejectUnauthorized);let r=p.connect(i);r.on("secureConnect",function(){i.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",e)});function e(t){i.rejectUnauthorized&&s.emit("error",t),r.end()}return r.on("error",e),r}k.exports=h},{debug:20,net:2,tls:2}],10:[function(y,k,x){(function(p){(function(){"use strict";let{Buffer:c}=y("buffer"),m=y("ws"),h=y("debug")("mqttjs:ws"),s=y("duplexify"),i=y("readable-stream").Transform,r=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],e=typeof p<"u"&&p.title==="browser"||typeof __webpack_require__=="function";function t(v,R){let A=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(A=v.transformWsUrl(A,v,R)),A}function o(v){let R=v;return v.hostname||(R.hostname="localhost"),v.port||(v.protocol==="wss"?R.port=443:R.port=80),v.path||(R.path="/"),v.wsOptions||(R.wsOptions={}),!e&&v.protocol==="wss"&&r.forEach(function(A){Object.prototype.hasOwnProperty.call(v,A)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,A)&&(R.wsOptions[A]=v[A])}),R}function u(v){let R=o(v);if(R.hostname||(R.hostname=R.host),!R.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let A=new URL(document.URL);R.hostname=A.hostname,R.port||(R.port=A.port)}return R.objectMode===void 0&&(R.objectMode=!(R.binary===!0||R.binary===void 0)),R}function d(v,R,A){h("createWebSocket"),h("protocol: "+A.protocolId+" "+A.protocolVersion);let W=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt";return h("creating new Websocket for url: "+R+" and protocol: "+W),new m(R,[W],A.wsOptions)}function g(v,R){let A=R.protocolId==="MQIsdp"&&R.protocolVersion===3?"mqttv3.1":"mqtt",W=t(R,v),j=new WebSocket(W,[A]);return j.binaryType="arraybuffer",j}function _(v,R){h("streamBuilder");let A=o(R),W=t(A,v),j=d(v,W,A),C=m.createWebSocketStream(j,A.wsOptions);return C.url=W,j.on("close",()=>{C.destroy()}),C}function f(v,R){h("browserStreamBuilder");let A,j=u(R).browserBufferSize||1024*512,C=R.browserBufferTimeout||1e3,P=!R.objectMode,S=g(v,R),V=ne(R,U,z);R.objectMode||(V._writev=T),V.on("close",()=>{S.close()});let B=typeof S.addEventListener<"u";S.readyState===S.OPEN?A=V:(A=A=s(void 0,void 0,R),R.objectMode||(A._writev=T),B?S.addEventListener("open",se):S.onopen=se),A.socket=S,B?(S.addEventListener("close",ie),S.addEventListener("error",G),S.addEventListener("message",E)):(S.onclose=ie,S.onerror=G,S.onmessage=E);function ne(re,ee,H){let D=new i({objectModeMode:re.objectMode});return D._write=ee,D._flush=H,D}function se(){A.setReadable(V),A.setWritable(V),A.emit("connect")}function ie(){A.end(),A.destroy()}function G(re){A.destroy(re)}function E(re){let ee=re.data;ee instanceof ArrayBuffer?ee=c.from(ee):ee=c.from(ee,"utf8"),V.push(ee)}function T(re,ee){let H=new Array(re.length);for(let D=0;Dj&&setTimeout(U,C,re,ee,H),P&&typeof re=="string"&&(re=c.from(re,"utf8"));try{S.send(re)}catch(D){return H(D)}H()}function z(re){S.close(),re()}return A}e?k.exports=f:k.exports=_}).call(this)}).call(this,y("_process"))},{_process:85,buffer:3,debug:20,duplexify:22,"readable-stream":72,ws:81}],11:[function(y,k,x){"use strict";let{Buffer:p}=y("buffer"),c=y("readable-stream").Transform,m=y("duplexify"),h,s,i;function r(){let d=new c;return d._write=function(g,_,f){h.send({data:g.buffer,success:function(){f()},fail:function(v){f(new Error(v))}})},d._flush=function(_){h.close({success:function(){_()}})},d}function e(d){d.hostname||(d.hostname="localhost"),d.path||(d.path="/"),d.wsOptions||(d.wsOptions={})}function t(d,g){let _=d.protocol==="wxs"?"wss":"ws",f=_+"://"+d.hostname+d.path;return d.port&&d.port!==80&&d.port!==443&&(f=_+"://"+d.hostname+":"+d.port+d.path),typeof d.transformWsUrl=="function"&&(f=d.transformWsUrl(f,d,g)),f}function o(){h.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onMessage(function(d){let g=d.data;g instanceof ArrayBuffer?g=p.from(g):g=p.from(g,"utf8"),s.push(g)}),h.onClose(function(){i.end(),i.destroy()}),h.onError(function(d){i.destroy(new Error(d.errMsg))})}function u(d,g){if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let _=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";e(g);let f=t(g,d);h=wx.connectSocket({url:f,protocols:[_]}),s=r(),i=m.obj(),i._destroy=function(R,A){h.close({success:function(){A&&A(R)}})};let v=i.destroy;return i.destroy=(function(){i.destroy=v;let R=this;setTimeout(function(){h.close({fail:function(){R._destroy(new Error)}})},0)}).bind(i),o(),i}k.exports=u},{buffer:3,duplexify:22,"readable-stream":72}],12:[function(y,k,x){"use strict";function p(){if(!(this instanceof p))return new p;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}p.prototype.allocate=function(){let c=this.nextId++;return this.nextId===65536&&(this.nextId=1),c},p.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},p.prototype.register=function(c){return!0},p.prototype.deallocate=function(c){},p.prototype.clear=function(){},k.exports=p},{}],13:[function(y,k,x){"use strict";let p=y("xtend"),c=y("readable-stream").Readable,m={objectMode:!0},h={clean:!0};function s(i){if(!(this instanceof s))return new s(i);this.options=i||{},this.options=p(h,i),this._inflights=new Map}s.prototype.put=function(i,r){return this._inflights.set(i.messageId,i),r&&r(),this},s.prototype.createStream=function(){let i=new c(m),r=[],e=!1,t=0;return this._inflights.forEach(function(o,u){r.push(o)}),i._read=function(){!e&&tthis.max?!1:(this.aliasToTopic[m]=c,this.length=Object.keys(this.aliasToTopic).length,!0)},p.prototype.getTopicByAlias=function(c){return this.aliasToTopic[c]},p.prototype.clear=function(){this.aliasToTopic={}},k.exports=p},{}],15:[function(y,k,x){"use strict";let p=y("lru-cache"),c=y("number-allocator").NumberAllocator;function m(h){if(!(this instanceof m))return new m(h);h>0&&(this.aliasToTopic=new p({max:h}),this.topicToAlias={},this.numberAllocator=new c(1,h),this.max=h,this.length=0)}m.prototype.put=function(h,s){if(s===0||s>this.max)return!1;let i=this.aliasToTopic.get(s);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(s,h),this.topicToAlias[h]=s,this.numberAllocator.use(s),this.length=this.aliasToTopic.length,!0},m.prototype.getTopicByAlias=function(h){return this.aliasToTopic.get(h)},m.prototype.getAliasByTopic=function(h){let s=this.topicToAlias[h];return typeof s<"u"&&this.aliasToTopic.get(s),s},m.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},m.prototype.getLruAlias=function(){let h=this.numberAllocator.firstVacant();return h||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},k.exports=m},{"lru-cache":45,"number-allocator":54}],16:[function(y,k,x){"use strict";function p(m){let h=m.split("/");for(let s=0;sthis.length||s<0)return;let i=this._offset(s);return this._bufs[i[0]][i[1]]},m.prototype.slice=function(s,i){return typeof s=="number"&&s<0&&(s+=this.length),typeof i=="number"&&i<0&&(i+=this.length),this.copy(null,0,s,i)},m.prototype.copy=function(s,i,r,e){if((typeof r!="number"||r<0)&&(r=0),(typeof e!="number"||e>this.length)&&(e=this.length),r>=this.length||e<=0)return s||p.alloc(0);let t=!!s,o=this._offset(r),u=e-r,d=u,g=t&&i||0,_=o[1];if(r===0&&e===this.length){if(!t)return this._bufs.length===1?this._bufs[0]:p.concat(this._bufs,this.length);for(let f=0;fv)this._bufs[f].copy(s,g,_),g+=v;else{this._bufs[f].copy(s,g,_,_+d),g+=v;break}d-=v,_&&(_=0)}return s.length>g?s.slice(0,g):s},m.prototype.shallowSlice=function(s,i){if(s=s||0,i=typeof i!="number"?this.length:i,s<0&&(s+=this.length),i<0&&(i+=this.length),s===i)return this._new();let r=this._offset(s),e=this._offset(i),t=this._bufs.slice(r[0],e[0]+1);return e[1]===0?t.pop():t[t.length-1]=t[t.length-1].slice(0,e[1]),r[1]!==0&&(t[0]=t[0].slice(r[1])),this._new(t)},m.prototype.toString=function(s,i,r){return this.slice(i,r).toString(s)},m.prototype.consume=function(s){if(s=Math.trunc(s),Number.isNaN(s)||s<=0)return this;for(;this._bufs.length;)if(s>=this._bufs[0].length)s-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(s),this.length-=s;break}return this},m.prototype.duplicate=function(){let s=this._new();for(let i=0;ithis.length?this.length:s;let r=this._offset(s),e=r[0],t=r[1];for(;e=h.length){let d=o.indexOf(h,t);if(d!==-1)return this._reverseOffset([e,d]);t=o.length-h.length+1}else{let d=this._reverseOffset([e,t]);if(this._match(d,h))return d;t++}t=0}return-1},m.prototype._match=function(h,s){if(this.length-h{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function c(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function m(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+k.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let o=0,u=0;e[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(o++,d==="%c"&&(u=o))}),e.splice(u,0,t)}x.log=console.debug||console.log||(()=>{});function h(e){try{e?x.storage.setItem("debug",e):x.storage.removeItem("debug")}catch{}}function s(){let e;try{e=x.storage.getItem("debug")}catch{}return!e&&typeof p<"u"&&"env"in p&&(e=p.env.DEBUG),e}function i(){try{return localStorage}catch{}}k.exports=y("./common")(x);let{formatters:r}=k.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,y("_process"))},{"./common":21,_process:85}],21:[function(y,k,x){function p(c){h.debug=h,h.default=h,h.coerce=o,h.disable=r,h.enable=i,h.enabled=e,h.humanize=y("ms"),h.destroy=u,Object.keys(c).forEach(d=>{h[d]=c[d]}),h.names=[],h.skips=[],h.formatters={};function m(d){let g=0;for(let _=0;_{if(V==="%%")return"%";P++;let ne=h.formatters[B];if(typeof ne=="function"){let se=A[P];V=ne.call(W,se),A.splice(P,1),P--}return V}),h.formatArgs.call(W,A),(W.log||h.log).apply(W,A)}return R.namespace=d,R.useColors=h.useColors(),R.color=h.selectColor(d),R.extend=s,R.destroy=h.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(f!==h.namespaces&&(f=h.namespaces,v=h.enabled(d)),v),set:A=>{_=A}}),typeof h.init=="function"&&h.init(R),R}function s(d,g){let _=h(this.namespace+(typeof g>"u"?":":g)+d);return _.log=this.log,_}function i(d){h.save(d),h.namespaces=d,h.names=[],h.skips=[];let g,_=(typeof d=="string"?d:"").split(/[\s,]+/),f=_.length;for(g=0;g"-"+g)].join(",");return h.enable(""),d}function e(d){if(d[d.length-1]==="*")return!0;let g,_;for(g=0,_=h.skips.length;g<_;g++)if(h.skips[g].test(d))return!1;for(g=0,_=h.names.length;g<_;g++)if(h.names[g].test(d))return!0;return!1}function t(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function o(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return h.enable(h.load()),h}k.exports=p},{ms:53}],22:[function(y,k,x){(function(p,c){(function(){var m=y("readable-stream"),h=y("end-of-stream"),s=y("inherits"),i=y("stream-shift"),r=c.from&&c.from!==Uint8Array.from?c.from([0]):new c([0]),e=function(f,v){f._corked?f.once("uncork",v):v()},t=function(f,v){f._autoDestroy&&f.destroy(v)},o=function(f,v){return function(R){R?t(f,R.message==="premature close"?null:R):v&&!f._ended&&f.end()}},u=function(f,v){if(!f||f._writableState&&f._writableState.finished)return v();if(f._writableState)return f.end(v);f.end(),v()},d=function(){},g=function(f){return new m.Readable({objectMode:!0,highWaterMark:16}).wrap(f)},_=function(f,v,R){if(!(this instanceof _))return new _(f,v,R);m.Duplex.call(this,R),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!R||R.autoDestroy!==!1,this._forwardDestroy=!R||R.destroy!==!1,this._forwardEnd=!R||R.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,f&&this.setWritable(f),v&&this.setReadable(v)};s(_,m.Duplex),_.obj=function(f,v,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new _(f,v,R)},_.prototype.cork=function(){++this._corked===1&&this.emit("cork")},_.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},_.prototype.setWritable=function(f){if(this._unwrite&&this._unwrite(),this.destroyed){f&&f.destroy&&f.destroy();return}if(f===null||f===!1){this.end();return}var v=this,R=h(f,{writable:!0,readable:!1},o(this,this._forwardEnd)),A=function(){var j=v._ondrain;v._ondrain=null,j&&j()},W=function(){v._writable.removeListener("drain",A),R()};this._unwrite&&p.nextTick(A),this._writable=f,this._writable.on("drain",A),this._unwrite=W,this.uncork()},_.prototype.setReadable=function(f){if(this._unread&&this._unread(),this.destroyed){f&&f.destroy&&f.destroy();return}if(f===null||f===!1){this.push(null),this.resume();return}var v=this,R=h(f,{writable:!1,readable:!0},o(this)),A=function(){v._forward()},W=function(){v.push(null)},j=function(){v._readable2.removeListener("readable",A),v._readable2.removeListener("end",W),R()};this._drained=!0,this._readable=f,this._readable2=f._readableState?f:g(f),this._readable2.on("readable",A),this._readable2.on("end",W),this._unread=j,this._forward()},_.prototype._read=function(){this._drained=!0,this._forward()},_.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var f;this._drained&&(f=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(f));this._forwarding=!1}},_.prototype.destroy=function(f,v){if(v||(v=d),this.destroyed)return v(null);this.destroyed=!0;var R=this;p.nextTick(function(){R._destroy(f),v(null)})},_.prototype._destroy=function(f){if(f){var v=this._ondrain;this._ondrain=null,v?v(f):this.emit("error",f)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},_.prototype._write=function(f,v,R){if(!this.destroyed){if(this._corked)return e(this,this._write.bind(this,f,v,R));if(f===r)return this._finish(R);if(!this._writable)return R();this._writable.write(f)===!1?this._ondrain=R:this.destroyed||R()}},_.prototype._finish=function(f){var v=this;this.emit("preend"),e(this,function(){u(v._forwardEnd&&v._writable,function(){v._writableState.prefinished===!1&&(v._writableState.prefinished=!0),v.emit("prefinish"),e(v,f)})})},_.prototype.end=function(f,v,R){return typeof f=="function"?this.end(null,null,f):typeof v=="function"?this.end(f,null,v):(this._ended=!0,f&&this.write(f),!this._writableState.ending&&!this._writableState.destroyed&&this.write(r),m.Writable.prototype.end.call(this,R))},k.exports=_}).call(this)}).call(this,y("_process"),y("buffer").Buffer)},{_process:85,buffer:3,"end-of-stream":23,inherits:24,"readable-stream":72,"stream-shift":77}],23:[function(y,k,x){(function(p){(function(){var c=y("once"),m=function(){},h=function(r){return r.setHeader&&typeof r.abort=="function"},s=function(r){return r.stdio&&Array.isArray(r.stdio)&&r.stdio.length===3},i=function(r,e,t){if(typeof e=="function")return i(r,null,e);e||(e={}),t=c(t||m);var o=r._writableState,u=r._readableState,d=e.readable||e.readable!==!1&&r.readable,g=e.writable||e.writable!==!1&&r.writable,_=!1,f=function(){r.writable||v()},v=function(){g=!1,d||t.call(r)},R=function(){d=!1,g||t.call(r)},A=function(S){t.call(r,S?new Error("exited with error code: "+S):null)},W=function(S){t.call(r,S)},j=function(){p.nextTick(C)},C=function(){if(!_){if(d&&!(u&&u.ended&&!u.destroyed))return t.call(r,new Error("premature close"));if(g&&!(o&&o.ended&&!o.destroyed))return t.call(r,new Error("premature close"))}},P=function(){r.req.on("finish",v)};return h(r)?(r.on("complete",v),r.on("abort",j),r.req?P():r.on("request",P)):g&&!o&&(r.on("end",f),r.on("close",f)),s(r)&&r.on("exit",A),r.on("end",R),r.on("finish",v),e.error!==!1&&r.on("error",W),r.on("close",j),function(){_=!0,r.removeListener("complete",v),r.removeListener("abort",j),r.removeListener("request",P),r.req&&r.req.removeListener("finish",v),r.removeListener("end",f),r.removeListener("close",f),r.removeListener("finish",v),r.removeListener("exit",A),r.removeListener("end",R),r.removeListener("error",W),r.removeListener("close",j)}};k.exports=i}).call(this)}).call(this,y("_process"))},{_process:85,once:56}],24:[function(y,k,x){typeof Object.create=="function"?k.exports=function(c,m){m&&(c.super_=m,c.prototype=Object.create(m.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(c,m){if(m){c.super_=m;var h=function(){};h.prototype=m.prototype,c.prototype=new h,c.prototype.constructor=c}}},{}],25:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.ContainerIterator=x.Container=x.Base=void 0;class p{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}}x.ContainerIterator=p;class c{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}}x.Base=c;class m extends c{}x.Container=m},{}],26:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.HashContainerIterator=x.HashContainer=void 0;var p=y("../../ContainerBase"),c=h(y("../../../utils/checkObject")),m=y("../../../utils/throwError");function h(r){return r&&r.t?r:{default:r}}class s extends p.ContainerIterator{constructor(e,t,o){super(o),this.o=e,this.h=t,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this})}}x.HashContainerIterator=s;class i extends p.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(e){let{L:t,B:o}=e;t.B=o,o.L=t,e===this.p&&(this.p=o),e===this._&&(this._=t),this.i-=1}M(e,t,o){o===void 0&&(o=(0,c.default)(e));let u;if(o){let d=e[this.HASH_TAG];if(d!==void 0)return this.H[d].l=t,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),u={u:e,l:t,L:this._,B:this.h},this.H.push(u)}else{let d=this.g[e];if(d)return d.l=t,this.i;u={u:e,l:t,L:this._,B:this.h},this.g[e]=u}return this.i===0?(this.p=u,this.h.B=u):this._.B=u,this._=u,this.h.L=u,++this.i}I(e,t){if(t===void 0&&(t=(0,c.default)(e)),t){let o=e[this.HASH_TAG];return o===void 0?this.h:this.H[o]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(t){delete t.u[e]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(e,t){let o;if(t===void 0&&(t=(0,c.default)(e)),t){let u=e[this.HASH_TAG];if(u===void 0)return!1;delete e[this.HASH_TAG],o=this.H[u],delete this.H[u]}else{if(o=this.g[e],o===void 0)return!1;delete this.g[e]}return this.V(o),!0}eraseElementByIterator(e){let t=e.o;return t===this.h&&(0,m.throwIteratorAccessError)(),this.V(t),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let t=this.p;for(;e--;)t=t.B;return this.V(t),this.i}}x.HashContainer=i},{"../../../utils/checkObject":43,"../../../utils/throwError":44,"../../ContainerBase":25}],27:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=y("./Base"),c=h(y("../../utils/checkObject")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends p.HashContainerIterator{constructor(t,o,u,d){super(t,o,d),this.container=u}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,u){if(u==="0")return t.o.u;if(u==="1")return t.o.l},set(o,u,d){if(u!=="1")throw new TypeError("props must be 1");return t.o.l=d,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends p.HashContainer{constructor(t=[]){super();let o=this;t.forEach(function(u){o.setElement(u[0],u[1])})}begin(){return new s(this.p,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this._,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(t,o,u){return this.M(t,o,u)}getElementByKey(t,o){if(o===void 0&&(o=(0,c.default)(t)),o){let d=t[this.HASH_TAG];return d!==void 0?this.H[d].l:void 0}let u=this.g[t];return u?u.l:void 0}getElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return[o.u,o.l]}find(t,o){let u=this.I(t,o);return new s(u,this.h,this)}forEach(t){let o=0,u=this.p;for(;u!==this.h;)t([u.u,u.l],o++,this),u=u.B}[Symbol.iterator](){return(function*(){let t=this.p;for(;t!==this.h;)yield[t.u,t.l],t=t.B}).bind(this)()}}var r=i;x.default=r},{"../../utils/checkObject":43,"../../utils/throwError":44,"./Base":26}],28:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=y("./Base"),c=y("../../utils/throwError");class m extends p.HashContainerIterator{constructor(r,e,t,o){super(r,e,o),this.container=t}get pointer(){return this.o===this.h&&(0,c.throwIteratorAccessError)(),this.o.u}copy(){return new m(this.o,this.h,this.container,this.iteratorType)}}class h extends p.HashContainer{constructor(r=[]){super();let e=this;r.forEach(function(t){e.insert(t)})}begin(){return new m(this.p,this.h,this)}end(){return new m(this.h,this.h,this)}rBegin(){return new m(this._,this.h,this,1)}rEnd(){return new m(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(r,e){return this.M(r,void 0,e)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=this.p;for(;r--;)e=e.B;return e.u}find(r,e){let t=this.I(r,e);return new m(t,this.h,this)}forEach(r){let e=0,t=this.p;for(;t!==this.h;)r(t.u,e++,this),t=t.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield r.u,r=r.B}).bind(this)()}}var s=h;x.default=s},{"../../utils/throwError":44,"./Base":26}],29:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=y("../ContainerBase");class c extends p.Base{constructor(s=[],i=function(e,t){return e>t?-1:e>1;for(let t=this.i-1>>1;t>=0;--t)this.k(t,e)}m(s){let i=this.C[s];for(;s>0;){let r=s-1>>1,e=this.C[r];if(this.v(e,i)<=0)break;this.C[s]=e,s=r}this.C[s]=i}k(s,i){let r=this.C[s];for(;s0&&(e=t,o=this.C[t]),this.v(o,r)>=0)break;this.C[s]=o,s=e}this.C[s]=r}clear(){this.i=0,this.C.length=0}push(s){this.C.push(s),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let s=this.C[0],i=this.C.pop();return this.i-=1,this.i&&(this.C[0]=i,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let i=this.C.indexOf(s);return i<0?!1:(i===0?this.pop():i===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(i,1,this.C.pop()),this.i-=1,this.m(i),this.k(i,this.i>>1)),!0)}updateItem(s){let i=this.C.indexOf(s);return i<0?!1:(this.m(i),this.k(i,this.i>>1),!0)}toArray(){return[...this.C]}}var m=c;x.default=m},{"../ContainerBase":25}],30:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=y("../ContainerBase");class c extends p.Base{constructor(s=[]){super(),this.j=0,this.q=[];let i=this;s.forEach(function(r){i.push(r)})}clear(){this.q=[],this.i=this.j=0}push(s){let i=this.q.length;if(this.j/i>.5&&this.j+this.i>=i&&i>4096){let r=this.i;for(let e=0;e{if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size;if(typeof e.size=="function")return e.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=t,this.P=Math.max(Math.ceil(o/this.F),1);for(let g=0;g>1)-(u>>1),this.D=this.N=this.F-o%this.F>>1;let d=this;e.forEach(function(g){d.pushBack(g)})}T(){let e=[],t=Math.max(this.P>>1,1);for(let o=0;o>1}begin(){return new h(0,this)}end(){return new h(this.i,this)}rBegin(){return new h(this.i-1,this,1)}rEnd(){return new h(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:t,curNodePointerIndex:o}=this.O(e);return this.A[t][o]}setElementByPos(e,t){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:u}=this.O(e);this.A[o][u]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;o--;)this.pushFront(t);else if(e===this.i)for(;o--;)this.pushBack(t);else{let u=[];for(let d=e;dthis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else{let t=[];for(let u=e+1;ue;)this.popBack();return this.i}sort(e){let t=[];for(let o=0;othis.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return o.l}eraseElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return this.V(o),this.i}eraseElementByValue(t){let o=this.p;for(;o!==this.h;)o.l===t&&this.V(o),o=o.B;return this.i}eraseElementByIterator(t){let o=t.o;return o===this.h&&(0,m.throwIteratorAccessError)(),t=t.next(),this.V(o),t}pushBack(t){return this.G(t,this._),this.i}popBack(){if(this.i===0)return;let t=this._.l;return this.V(this._),t}pushFront(t){return this.G(t,this.h),this.i}popFront(){if(this.i===0)return;let t=this.p.l;return this.V(this.p),t}setElementByPos(t,o){if(t<0||t>this.i-1)throw new RangeError;let u=this.p;for(;t--;)u=u.B;u.l=o}insert(t,o,u=1){if(t<0||t>this.i)throw new RangeError;if(u<=0)return this.i;if(t===0)for(;u--;)this.pushFront(o);else if(t===this.i)for(;u--;)this.pushBack(o);else{let d=this.p;for(let _=1;_this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let t=0;for(let o=0;othis.i-1)throw new RangeError;this.J[e]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(o).fill(t)),this.i+=o,this.i}find(e){for(let t=0;to?1:0},e=!1){super(),this.Y=void 0,this.v=r,e?(this.re=p.TreeNodeEnableIndex,this.M=function(t,o,u){let d=this.ne(t,o,u);if(d){let g=d.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let _=this.he(d);if(_){let{parentNode:f,grandParent:v,curNode:R}=_;f.ie(),v.ie(),R.ie()}}return this.i},this.V=function(t){let o=this.fe(t);for(;o!==this.h;)o.rt-=1,o=o.tt}):(this.re=p.TreeNode,this.M=function(t,o,u){let d=this.ne(t,o,u);return d&&this.he(d),this.i},this.V=this.fe),this.h=new this.re}X(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)r=r.W;else if(o>0)t=r,r=r.U;else return r}return t}Z(r,e){let t=this.h;for(;r;)this.v(r.u,e)<=0?r=r.W:(t=r,r=r.U);return t}$(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)t=r,r=r.W;else if(o>0)r=r.U;else return r}return t}rr(r,e){let t=this.h;for(;r;)this.v(r.u,e)<0?(t=r,r=r.W):r=r.U;return t}ue(r){for(;;){let e=r.tt;if(e===this.h)return;if(r.ee===1){r.ee=0;return}if(r===e.U){let t=e.W;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.te():e.te();else if(t.W&&t.W.ee===1){t.ee=e.ee,e.ee=0,t.W.ee=0,e===this.Y?this.Y=e.te():e.te();return}else t.U&&t.U.ee===1?(t.ee=1,t.U.ee=0,t.se()):(t.ee=1,r=e)}else{let t=e.U;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.se():e.se();else if(t.U&&t.U.ee===1){t.ee=e.ee,e.ee=0,t.U.ee=0,e===this.Y?this.Y=e.se():e.se();return}else t.W&&t.W.ee===1?(t.ee=1,t.W.ee=0,t.te()):(t.ee=1,r=e)}}}fe(r){if(this.i===1)return this.clear(),this.h;let e=r;for(;e.U||e.W;){if(e.W)for(e=e.W;e.U;)e=e.U;else e=e.U;[r.u,e.u]=[e.u,r.u],[r.l,e.l]=[e.l,r.l],r=e}this.h.U===e?this.h.U=e.tt:this.h.W===e&&(this.h.W=e.tt),this.ue(e);let t=e.tt;return e===t.U?t.U=void 0:t.W=void 0,this.i-=1,this.Y.ee=0,t}oe(r,e){return r===void 0?!1:this.oe(r.U,e)||e(r)?!0:this.oe(r.W,e)}he(r){for(;;){let e=r.tt;if(e.ee===0)return;let t=e.tt;if(e===t.U){let o=t.W;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.W){if(r.ee=0,r.U&&(r.U.tt=e),r.W&&(r.W.tt=t),e.W=r.U,t.U=r.W,r.U=e,r.W=t,t===this.Y)this.Y=r,this.h.tt=r;else{let u=t.tt;u.U===t?u.U=r:u.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.se():t.se(),t.ee=1}else{let o=t.U;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.U){if(r.ee=0,r.U&&(r.U.tt=t),r.W&&(r.W.tt=e),t.W=r.U,e.U=r.W,r.U=t,r.W=e,t===this.Y)this.Y=r,this.h.tt=r;else{let u=t.tt;u.U===t?u.U=r:u.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.te():t.te(),t.ee=1}return}}ne(r,e,t){if(this.Y===void 0){this.i+=1,this.Y=new this.re(r,e),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let o,u=this.h.U,d=this.v(u.u,r);if(d===0){u.l=e;return}else if(d>0)u.U=new this.re(r,e),u.U.tt=u,o=u.U,this.h.U=o;else{let g=this.h.W,_=this.v(g.u,r);if(_===0){g.l=e;return}else if(_<0)g.W=new this.re(r,e),g.W.tt=g,o=g.W,this.h.W=o;else{if(t!==void 0){let f=t.o;if(f!==this.h){let v=this.v(f.u,r);if(v===0){f.l=e;return}else if(v>0){let R=f.L(),A=this.v(R.u,r);if(A===0){R.l=e;return}else A<0&&(o=new this.re(r,e),R.W===void 0?(R.W=o,o.tt=R):(f.U=o,o.tt=f))}}}if(o===void 0)for(o=this.Y;;){let f=this.v(o.u,r);if(f>0){if(o.U===void 0){o.U=new this.re(r,e),o.U.tt=o,o=o.U;break}o=o.U}else if(f<0){if(o.W===void 0){o.W=new this.re(r,e),o.W.tt=o,o=o.W;break}o=o.W}else{o.l=e;return}}}}return this.i+=1,o}I(r,e){for(;r;){let t=this.v(r.u,e);if(t<0)r=r.W;else if(t>0)r=r.U;else return r}return r||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(r,e){let t=r.o;if(t===this.h&&(0,m.throwIteratorAccessError)(),this.i===1)return t.u=e,!0;if(t===this.h.U)return this.v(t.B().u,e)>0?(t.u=e,!0):!1;if(t===this.h.W)return this.v(t.L().u,e)<0?(t.u=e,!0):!1;let o=t.L().u;if(this.v(o,e)>=0)return!1;let u=t.B().u;return this.v(u,e)<=0?!1:(t.u=e,!0)}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=0,t=this;return this.oe(this.Y,function(o){return r===e?(t.V(o),!0):(e+=1,!1)}),this.i}eraseElementByKey(r){if(this.i===0)return!1;let e=this.I(this.Y,r);return e===this.h?!1:(this.V(e),!0)}eraseElementByIterator(r){let e=r.o;e===this.h&&(0,m.throwIteratorAccessError)();let t=e.W===void 0;return r.iteratorType===0?t&&r.next():(!t||e.U===void 0)&&r.next(),this.V(e),r}forEach(r){let e=0;for(let t of this)r(t,e++,this)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e,t=0;for(let o of this){if(t===r){e=o;break}t+=1}return e}getHeight(){if(this.i===0)return 0;let r=function(e){return e?Math.max(r(e.U),r(e.W))+1:0};return r(this.Y)}}var s=h;x.default=s},{"../../../utils/throwError":44,"../../ContainerBase":25,"./TreeNode":38}],40:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=h(y("./Base")),c=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends c.default{constructor(t,o,u,d){super(t,o,d),this.container=u}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,u){if(u==="0")return t.o.u;if(u==="1")return t.o.l},set(o,u,d){if(u!=="1")throw new TypeError("props must be 1");return t.o.l=d,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends p.default{constructor(t=[],o,u){super(o,u);let d=this;t.forEach(function(g){d.setElement(g[0],g[1])})}*K(t){t!==void 0&&(yield*Ie(this.K(t.U)),yield[t.u,t.l],yield*Ie(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i===0)return;let t=this.h.U;return[t.u,t.l]}back(){if(this.i===0)return;let t=this.h.W;return[t.u,t.l]}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}setElement(t,o,u){return this.M(t,o,u)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}getElementByKey(t){return this.I(this.Y,t).l}union(t){let o=this;return t.forEach(function(u){o.setElement(u[0],u[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],41:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=h(y("./Base")),c=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends c.default{constructor(t,o,u,d){super(t,o,d),this.container=u}get pointer(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o.u}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends p.default{constructor(t=[],o,u){super(o,u);let d=this;t.forEach(function(g){d.insert(g)})}*K(t){t!==void 0&&(yield*Ie(this.K(t.U)),yield t.u,yield*Ie(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(t,o){return this.M(t,void 0,o)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}union(t){let o=this;return t.forEach(function(u){o.insert(u)}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],42:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),Object.defineProperty(x,"Deque",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(x,"HashMap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(x,"HashSet",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(x,"LinkList",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(x,"OrderedMap",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(x,"OrderedSet",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(x,"PriorityQueue",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(x,"Queue",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(x,"Stack",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(x,"Vector",{enumerable:!0,get:function(){return h.default}});var p=u(y("./container/OtherContainer/Stack")),c=u(y("./container/OtherContainer/Queue")),m=u(y("./container/OtherContainer/PriorityQueue")),h=u(y("./container/SequentialContainer/Vector")),s=u(y("./container/SequentialContainer/LinkList")),i=u(y("./container/SequentialContainer/Deque")),r=u(y("./container/TreeContainer/OrderedSet")),e=u(y("./container/TreeContainer/OrderedMap")),t=u(y("./container/HashContainer/HashSet")),o=u(y("./container/HashContainer/HashMap"));function u(d){return d&&d.t?d:{default:d}}},{"./container/HashContainer/HashMap":27,"./container/HashContainer/HashSet":28,"./container/OtherContainer/PriorityQueue":29,"./container/OtherContainer/Queue":30,"./container/OtherContainer/Stack":31,"./container/SequentialContainer/Deque":34,"./container/SequentialContainer/LinkList":35,"./container/SequentialContainer/Vector":36,"./container/TreeContainer/OrderedMap":40,"./container/TreeContainer/OrderedSet":41}],43:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=p;function p(c){let m=typeof c;return m==="object"&&c!==null||m==="function"}},{}],44:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.throwIteratorAccessError=p;function p(){throw new RangeError("Iterator access denied!")}},{}],45:[function(y,k,x){"use strict";let p=y("yallist"),c=Symbol("max"),m=Symbol("length"),h=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),r=Symbol("dispose"),e=Symbol("noDisposeOnSet"),t=Symbol("lruList"),o=Symbol("cache"),u=Symbol("updateAgeOnGet"),d=()=>1;class g{constructor(C){if(typeof C=="number"&&(C={max:C}),C||(C={}),C.max&&(typeof C.max!="number"||C.max<0))throw new TypeError("max must be a non-negative number");let P=this[c]=C.max||1/0,S=C.length||d;if(this[h]=typeof S!="function"?d:S,this[s]=C.stale||!1,C.maxAge&&typeof C.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=C.maxAge||0,this[r]=C.dispose,this[e]=C.noDisposeOnSet||!1,this[u]=C.updateAgeOnGet||!1,this.reset()}set max(C){if(typeof C!="number"||C<0)throw new TypeError("max must be a non-negative number");this[c]=C||1/0,v(this)}get max(){return this[c]}set allowStale(C){this[s]=!!C}get allowStale(){return this[s]}set maxAge(C){if(typeof C!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=C,v(this)}get maxAge(){return this[i]}set lengthCalculator(C){typeof C!="function"&&(C=d),C!==this[h]&&(this[h]=C,this[m]=0,this[t].forEach(P=>{P.length=this[h](P.value,P.key),this[m]+=P.length})),v(this)}get lengthCalculator(){return this[h]}get length(){return this[m]}get itemCount(){return this[t].length}rforEach(C,P){P=P||this;for(let S=this[t].tail;S!==null;){let V=S.prev;W(this,C,S,P),S=V}}forEach(C,P){P=P||this;for(let S=this[t].head;S!==null;){let V=S.next;W(this,C,S,P),S=V}}keys(){return this[t].toArray().map(C=>C.key)}values(){return this[t].toArray().map(C=>C.value)}reset(){this[r]&&this[t]&&this[t].length&&this[t].forEach(C=>this[r](C.key,C.value)),this[o]=new Map,this[t]=new p,this[m]=0}dump(){return this[t].map(C=>f(this,C)?!1:{k:C.key,v:C.value,e:C.now+(C.maxAge||0)}).toArray().filter(C=>C)}dumpLru(){return this[t]}set(C,P,S){if(S=S||this[i],S&&typeof S!="number")throw new TypeError("maxAge must be a number");let V=S?Date.now():0,B=this[h](P,C);if(this[o].has(C)){if(B>this[c])return R(this,this[o].get(C)),!1;let ie=this[o].get(C).value;return this[r]&&(this[e]||this[r](C,ie.value)),ie.now=V,ie.maxAge=S,ie.value=P,this[m]+=B-ie.length,ie.length=B,this.get(C),v(this),!0}let ne=new A(C,P,B,V,S);return ne.length>this[c]?(this[r]&&this[r](C,P),!1):(this[m]+=ne.length,this[t].unshift(ne),this[o].set(C,this[t].head),v(this),!0)}has(C){if(!this[o].has(C))return!1;let P=this[o].get(C).value;return!f(this,P)}get(C){return _(this,C,!0)}peek(C){return _(this,C,!1)}pop(){let C=this[t].tail;return C?(R(this,C),C.value):null}del(C){R(this,this[o].get(C))}load(C){this.reset();let P=Date.now();for(let S=C.length-1;S>=0;S--){let V=C[S],B=V.e||0;if(B===0)this.set(V.k,V.v);else{let ne=B-P;ne>0&&this.set(V.k,V.v,ne)}}}prune(){this[o].forEach((C,P)=>_(this,P,!1))}}let _=(j,C,P)=>{let S=j[o].get(C);if(S){let V=S.value;if(f(j,V)){if(R(j,S),!j[s])return}else P&&(j[u]&&(S.value.now=Date.now()),j[t].unshiftNode(S));return V.value}},f=(j,C)=>{if(!C||!C.maxAge&&!j[i])return!1;let P=Date.now()-C.now;return C.maxAge?P>C.maxAge:j[i]&&P>j[i]},v=j=>{if(j[m]>j[c])for(let C=j[t].tail;j[m]>j[c]&&C!==null;){let P=C.prev;R(j,C),C=P}},R=(j,C)=>{if(C){let P=C.value;j[r]&&j[r](P.key,P.value),j[m]-=P.length,j[o].delete(P.key),j[t].removeNode(C)}};class A{constructor(C,P,S,V,B){this.key=C,this.value=P,this.length=S,this.now=V,this.maxAge=B||0}}let W=(j,C,P,S)=>{let V=P.value;f(j,V)&&(R(j,P),j[s]||(V=void 0)),V&&C.call(S,V.value,V.key,j)};k.exports=g},{yallist:84}],46:[function(y,k,x){(function(p){(function(){let c=k.exports;c.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},c.codes={};for(let h in c.types){let s=c.types[h];c.codes[s]=h}c.CMD_SHIFT=4,c.CMD_MASK=240,c.DUP_MASK=8,c.QOS_MASK=3,c.QOS_SHIFT=1,c.RETAIN_MASK=1,c.VARBYTEINT_MASK=127,c.VARBYTEINT_FIN_MASK=128,c.VARBYTEINT_MAX=268435455,c.SESSIONPRESENT_MASK=1,c.SESSIONPRESENT_HEADER=p.from([c.SESSIONPRESENT_MASK]),c.CONNACK_HEADER=p.from([c.codes.connack<[0,1].map(i=>[0,1].map(r=>{let e=p.alloc(1);return e.writeUInt8(c.codes[h]<p.from([h])),c.EMPTY={pingreq:p.from([c.codes.pingreq<<4,0]),pingresp:p.from([c.codes.pingresp<<4,0]),disconnect:p.from([c.codes.disconnect<<4,0])}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],47:[function(y,k,x){(function(p){(function(){let c=y("./writeToStream"),m=y("events");function h(i,r){let e=new s;return c(i,e,r),e.concat()}class s extends m{constructor(){super(),this._array=new Array(20),this._i=0}write(r){return this._array[this._i++]=r,!0}concat(){let r=0,e=new Array(this._array.length),t=this._array,o=0,u;for(u=0;u>8,0),o.writeUInt8(t&255,1),o}function i(){for(let t=0;t<65536;t++)m[t]=s(t)}function r(t){let u=0,d=0,g=p.allocUnsafe(4);do u=t%128|0,t=t/128|0,t>0&&(u=u|128),g.writeUInt8(u,d++);while(t>0&&d<4);return t>0&&(d=0),h?g.subarray(0,d):g.slice(0,d)}function e(t){let o=p.allocUnsafe(4);return o.writeUInt32BE(t,0),o}k.exports={cache:m,generateCache:i,generateNumber:s,genBufVariableByteInt:r,generate4ByteBuffer:e}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],50:[function(y,k,x){class p{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}k.exports=p},{}],51:[function(y,k,x){let p=y("bl"),c=y("events"),m=y("./packet"),h=y("./constants"),s=y("debug")("mqtt-packet:parser");class i extends c{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof i?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new i().parser(e)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new m,this.error=null,this._list=p(),this._stateCounter=0}parse(e){for(this.error&&this._resetState(),this._list.append(e),s("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0);return this.packet.cmd=h.types[e>>h.CMD_SHIFT],this.packet.retain=(e&h.RETAIN_MASK)!==0,this.packet.qos=e>>h.QOS_SHIFT&h.QOS_MASK,this.packet.dup=(e&h.DUP_MASK)!==0,s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),s("_parseLength %d",e.value),!!e}_parsePayload(){s("_parsePayload: payload %O",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return s("_parsePayload complete result: %s",e),e}_parseConnect(){s("_parseConnect");let e,t,o,u,d={},g=this.packet,_=this._parseString();if(_===null)return this._emitError(new Error("Cannot parse protocolId"));if(_!=="MQTT"&&_!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=_,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(d.username=this._list.readUInt8(this._pos)&h.USERNAME_MASK,d.password=this._list.readUInt8(this._pos)&h.PASSWORD_MASK,d.will=this._list.readUInt8(this._pos)&h.WILL_FLAG_MASK,d.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&h.WILL_RETAIN_MASK)!==0,g.will.qos=(this._list.readUInt8(this._pos)&h.WILL_QOS_MASK)>>h.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&h.CLEAN_SESSION_MASK)!==0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.properties=v)}let f=this._parseString();if(f===null)return this._emitError(new Error("Packet too short"));if(g.clientId=f,s("_parseConnect: packet.clientId: %s",g.clientId),d.will){if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.will.properties=v)}if(e=this._parseString(),e===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=e,s("_parseConnect: packet.will.topic: %s",g.will.topic),t=this._parseBuffer(),t===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=t,s("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(d.username){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse username"));g.username=u,s("_parseConnect: packet.username: %s",g.username)}if(d.password){if(o=this._parseBuffer(),o===null)return this._emitError(new Error("Cannot parse password"));g.password=o}return this.settings=g,s("_parseConnect: complete"),g}_parseConnack(){s("_parseConnack");let e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&h.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),s("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){s("_parseSubscribe");let e=this.packet,t,o,u,d,g,_,f;if(e.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(e.properties=v)}for(;this._pos=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));o=this._parseByte(),u=o&h.SUBSCRIBE_OPTIONS_QOS_MASK,_=(o>>h.SUBSCRIBE_OPTIONS_NL_SHIFT&h.SUBSCRIBE_OPTIONS_NL_MASK)!==0,g=(o>>h.SUBSCRIBE_OPTIONS_RAP_SHIFT&h.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,d=o>>h.SUBSCRIBE_OPTIONS_RH_SHIFT&h.SUBSCRIBE_OPTIONS_RH_MASK,f={topic:t,qos:u},this.settings.protocolVersion===5?(f.nl=_,f.rap=g,f.rh=d):this.settings.bridgeMode&&(f.rh=0,f.rap=!0,f.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",f),e.subscriptions.push(f)}}}_parseSuback(){s("_parseSuback");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos2?(e.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){let e=this.packet;if(s("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();let t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),s("_parseAuth: result: true"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){let t=this._parseNum(),o=t+this._pos;if(t===-1||o>this._list.length||o>this.packet.length)return null;let u=this._list.toString("utf8",this._pos,o);return this._pos+=t,s("_parseString: result: %s",u),u}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),t=e+this._pos;if(e===-1||t>this._list.length||t>this.packet.length)return null;let o=this._list.slice(this._pos,t);return this._pos+=e,s("_parseBuffer: result: %o",o),o}_parseNum(){if(this._list.length-this._pos<2)return-1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){s("_parseVarByteNum");let t=4,o=0,u=1,d=0,g=!1,_,f=this._pos?this._pos:0;for(;o=o&&this._emitError(new Error("Invalid variable byte integer")),f&&(this._pos+=o),g=g?e?{bytes:o,value:d}:d:!1,s("_parseVarByteNum: result: %o",g),g}_parseByte(){let e;return this._pos=4)&&(b||q))w+=p.byteLength(b)+2;else{if(I<4)return M.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(q*1===0)return M.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof Q!="number"||Q<0||Q>65535||Q%1!==0)return M.emit("error",new Error("Invalid keepalive")),!1;if(w+=2,w+=1,I===5){var L=H(M,a);if(!L)return!1;w+=L.length}if(N){if(typeof N!="object")return M.emit("error",new Error("Invalid will")),!1;if(!N.topic||typeof N.topic!="string")return M.emit("error",new Error("Invalid will topic")),!1;if(w+=p.byteLength(N.topic)+2,w+=2,N.payload)if(N.payload.length>=0)typeof N.payload=="string"?w+=p.byteLength(N.payload):w+=N.payload.length;else return M.emit("error",new Error("Invalid will payload")),!1;var K={};if(I===5){if(K=H(M,N.properties),!K)return!1;w+=K.length}}let J=!1;if(l!=null)if(Z(l))J=!0,w+=p.byteLength(l)+2;else return M.emit("error",new Error("Invalid username")),!1;if(n!=null){if(!J)return M.emit("error",new Error("Username is required to use password")),!1;if(Z(n))w+=oe(n)+2;else return M.emit("error",new Error("Invalid password")),!1}M.write(c.CONNECT_HEADER),G(M,w),ee(M,O),te.bridgeMode&&(I+=128),M.write(I===131?c.VERSION131:I===132?c.VERSION132:I===4?c.VERSION4:I===5?c.VERSION5:c.VERSION3);let le=0;return le|=l!=null?c.USERNAME_MASK:0,le|=n!=null?c.PASSWORD_MASK:0,le|=N&&N.retain?c.WILL_RETAIN_MASK:0,le|=N&&N.qos?N.qos<0&&g(M,b),a?.write(),r("publish: payload: %o",Q),M.write(Q)}function j(F,M,Y){let te=Y?Y.protocolVersion:4,O=F||{},I=O.cmd||"puback",N=O.messageId,q=O.dup&&I==="pubrel"?c.DUP_MASK:0,Q=0,b=O.reasonCode,l=O.properties,n=te===5?3:2;if(I==="pubrel"&&(Q=1),typeof N!="number")return M.emit("error",new Error("Invalid messageId")),!1;let a=null;if(te===5&&typeof l=="object"){if(a=D(M,l,Y,n),!a)return!1;n+=a.length}return M.write(c.ACKS[I][Q][q][0]),G(M,n),g(M,N),te===5&&M.write(p.from([b])),a!==null&&a.write(),!0}function C(F,M,Y){r("subscribe: packet: ");let te=Y?Y.protocolVersion:4,O=F||{},I=O.dup?c.DUP_MASK:0,N=O.messageId,q=O.subscriptions,Q=O.properties,b=0;if(typeof N!="number")return M.emit("error",new Error("Invalid messageId")),!1;b+=2;let l=null;if(te===5){if(l=H(M,Q),!l)return!1;b+=l.length}if(typeof q=="object"&&q.length)for(let a=0;a2)return M.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}b+=p.byteLength(w)+2+1}else return M.emit("error",new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",c.SUBSCRIBE_HEADER),M.write(c.SUBSCRIBE_HEADER[1][I?1:0][0]),G(M,b),g(M,N),l!==null&&l.write();let n=!0;for(let a of q){let w=a.topic,L=a.qos,K=+a.nl,J=+a.rap,le=a.rh,he;E(M,w),he=c.SUBSCRIBE_OPTIONS_QOS[L],te===5&&(he|=K?c.SUBSCRIBE_OPTIONS_NL:0,he|=J?c.SUBSCRIBE_OPTIONS_RAP:0,he|=le?c.SUBSCRIBE_OPTIONS_RH[le]:0),n=M.write(p.from([he]))}return n}function P(F,M,Y){let te=Y?Y.protocolVersion:4,O=F||{},I=O.messageId,N=O.granted,q=O.properties,Q=0;if(typeof I!="number")return M.emit("error",new Error("Invalid messageId")),!1;if(Q+=2,typeof N=="object"&&N.length)for(let l=0;lc.VARBYTEINT_MAX)return F.emit("error",new Error(`Invalid variable byte integer: ${M}`)),!1;let Y=ie[M];return Y||(Y=u(M),M<16384&&(ie[M]=Y)),r("writeVarByteInt: writing to stream: %o",Y),F.write(Y)}function E(F,M){let Y=p.byteLength(M);return g(F,Y),r("writeString: %s",M),F.write(M,"utf8")}function T(F,M,Y){E(F,M),E(F,Y)}function U(F,M){return r("writeNumberCached: number: %d",M),r("writeNumberCached: %o",e[M]),F.write(e[M])}function z(F,M){let Y=t(M);return r("writeNumberGenerated: %o",Y),F.write(Y)}function re(F,M){let Y=d(M);return r("write4ByteNumber: %o",Y),F.write(Y)}function ee(F,M){typeof M=="string"?E(F,M):M?(g(F,M.length),F.write(M)):g(F,0)}function H(F,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){$(F,{},0)}};let Y=0;function te(I,N){let q=c.propertiesTypes[I],Q=0;switch(q){case"byte":{if(typeof N!="boolean")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=2;break}case"int8":{if(typeof N!="number"||N<0||N>255)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=2;break}case"binary":{if(N&&N===null)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=1+p.byteLength(N)+2;break}case"int16":{if(typeof N!="number"||N<0||N>65535)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=3;break}case"int32":{if(typeof N!="number"||N<0||N>4294967295)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=5;break}case"var":{if(typeof N!="number"||N<0||N>268435455)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=1+p.byteLength(u(N));break}case"string":{if(typeof N!="string")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=3+p.byteLength(N.toString());break}case"pair":{if(typeof N!="object")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=Object.getOwnPropertyNames(N).reduce((b,l)=>{let n=N[l];return Array.isArray(n)?b+=n.reduce((a,w)=>(a+=3+p.byteLength(l.toString())+2+p.byteLength(w.toString()),a),0):b+=3+p.byteLength(l.toString())+2+p.byteLength(N[l].toString()),b},0);break}default:return F.emit("error",new Error(`Invalid property ${I}: ${N}`)),!1}return Q}if(M)for(let I in M){let N=0,q=0,Q=M[I];if(Array.isArray(Q))for(let b=0;bI;){let q=O.shift();if(q&&M[q])delete M[q],N=H(F,M);else return!1}return N}function X(F,M,Y){switch(c.propertiesTypes[M]){case"byte":{F.write(p.from([c.properties[M]])),F.write(p.from([+Y]));break}case"int8":{F.write(p.from([c.properties[M]])),F.write(p.from([Y]));break}case"binary":{F.write(p.from([c.properties[M]])),ee(F,Y);break}case"int16":{F.write(p.from([c.properties[M]])),g(F,Y);break}case"int32":{F.write(p.from([c.properties[M]])),re(F,Y);break}case"var":{F.write(p.from([c.properties[M]])),G(F,Y);break}case"string":{F.write(p.from([c.properties[M]])),E(F,Y);break}case"pair":{Object.getOwnPropertyNames(Y).forEach(O=>{let I=Y[O];Array.isArray(I)?I.forEach(N=>{F.write(p.from([c.properties[M]])),T(F,O.toString(),N.toString())}):(F.write(p.from([c.properties[M]])),T(F,O.toString(),I.toString()))});break}default:return F.emit("error",new Error(`Invalid property ${M} value: ${Y}`)),!1}}function $(F,M,Y){G(F,Y);for(let te in M)if(Object.prototype.hasOwnProperty.call(M,te)&&M[te]!==null){let O=M[te];if(Array.isArray(O))for(let I=0;I0)return r(u);if(g==="number"&&isFinite(u))return d.long?t(u):e(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function r(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var g=parseFloat(d[1]),_=(d[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"yrs":case"yr":case"y":return g*i;case"weeks":case"week":case"w":return g*s;case"days":case"day":case"d":return g*h;case"hours":case"hour":case"hrs":case"hr":case"h":return g*m;case"minutes":case"minute":case"mins":case"min":case"m":return g*c;case"seconds":case"second":case"secs":case"sec":case"s":return g*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function e(u){var d=Math.abs(u);return d>=h?Math.round(u/h)+"d":d>=m?Math.round(u/m)+"h":d>=c?Math.round(u/c)+"m":d>=p?Math.round(u/p)+"s":u+"ms"}function t(u){var d=Math.abs(u);return d>=h?o(u,d,h,"day"):d>=m?o(u,d,m,"hour"):d>=c?o(u,d,c,"minute"):d>=p?o(u,d,p,"second"):u+" ms"}function o(u,d,g,_){var f=d>=g*1.5;return Math.round(u/g)+" "+_+(f?"s":"")}},{}],54:[function(y,k,x){let p=y("./lib/number-allocator.js");k.exports.NumberAllocator=p},{"./lib/number-allocator.js":55}],55:[function(y,k,x){"use strict";let p=y("js-sdsl").OrderedSet,c=y("debug")("number-allocator:trace"),m=y("debug")("number-allocator:error");function h(i,r){this.low=i,this.high=r}h.prototype.equals=function(i){return this.low===i.low&&this.high===i.high},h.prototype.compare=function(i){return this.lowe.compare(t)),c("Create"),this.clear()}s.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},s.prototype.alloc=function(){if(this.ss.size()===0)return c("alloc():empty"),null;let i=this.ss.begin(),r=i.pointer.low,e=i.pointer.high,t=r;return t+1<=e?this.ss.updateKeyByIterator(i,new h(r+1,e)):this.ss.eraseElementByPos(0),c("alloc():"+t),t},s.prototype.use=function(i){let r=new h(i,i),e=this.ss.lowerBound(r);if(!e.equals(this.ss.end())){let t=e.pointer.low,o=e.pointer.high;return e.pointer.equals(r)?(this.ss.eraseElementByIterator(e),c("use():"+i),!0):t>i?!1:t===i?(this.ss.updateKeyByIterator(e,new h(t+1,o)),c("use():"+i),!0):o===i?(this.ss.updateKeyByIterator(e,new h(t,o-1)),c("use():"+i),!0):(this.ss.updateKeyByIterator(e,new h(i+1,o)),this.ss.insert(new h(t,i-1)),c("use():"+i),!0)}return c("use():failed"),!1},s.prototype.free=function(i){if(ithis.max){m("free():"+i+" is out of range");return}let r=new h(i,i),e=this.ss.upperBound(r);if(e.equals(this.ss.end())){if(e.equals(this.ss.begin())){this.ss.insert(r);return}e.pre();let t=e.pointer.high;e.pointer.high+1===i?this.ss.updateKeyByIterator(e,new h(t,i)):this.ss.insert(r)}else if(e.equals(this.ss.begin()))if(i+1===e.pointer.low){let t=e.pointer.high;this.ss.updateKeyByIterator(e,new h(i,t))}else this.ss.insert(r);else{let t=e.pointer.low,o=e.pointer.high;e.pre();let u=e.pointer.low;e.pointer.high+1===i?i+1===t?(this.ss.eraseElementByIterator(e),this.ss.updateKeyByIterator(e,new h(u,o))):this.ss.updateKeyByIterator(e,new h(u,i)):i+1===t?(this.ss.eraseElementByIterator(e.next()),this.ss.insert(new h(i,o))):this.ss.insert(r)}c("free():"+i)},s.prototype.clear=function(){c("clear()"),this.ss.clear(),this.ss.insert(new h(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(let i of this.ss)console.log(i)},k.exports=s},{debug:20,"js-sdsl":42}],56:[function(y,k,x){var p=y("wrappy");k.exports=p(c),k.exports.strict=p(m),c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return m(this)},configurable:!0})});function c(h){var s=function(){return s.called?s.value:(s.called=!0,s.value=h.apply(this,arguments))};return s.called=!1,s}function m(h){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=h.apply(this,arguments)},i=h.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}},{wrappy:80}],57:[function(y,k,x){(function(p){(function(){"use strict";typeof p>"u"||!p.version||p.version.indexOf("v0.")===0||p.version.indexOf("v1.")===0&&p.version.indexOf("v1.8.")!==0?k.exports={nextTick:c}:k.exports=p;function c(m,h,s,i){if(typeof m!="function")throw new TypeError('"callback" argument must be a function');var r=arguments.length,e,t;switch(r){case 0:case 1:return p.nextTick(m);case 2:return p.nextTick(function(){m.call(null,h)});case 3:return p.nextTick(function(){m.call(null,h,s)});case 4:return p.nextTick(function(){m.call(null,h,s,i)});default:for(e=new Array(r-1),t=0;t2?"one of ".concat(t," ").concat(e.slice(0,o-1).join(", "),", or ")+e[o-1]:o===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function s(e,t,o){return e.substr(!o||o<0?0:+o,t.length)===t}function i(e,t,o){return(o===void 0||o>e.length)&&(o=e.length),e.substring(o-t.length,o)===t}function r(e,t,o){return typeof o!="number"&&(o=0),o+t.length>e.length?!1:e.indexOf(t,o)!==-1}m("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(e,t,o){var u;typeof t=="string"&&s(t,"not ")?(u="must not be",t=t.replace(/^not /,"")):u="must be";var d;if(i(e," argument"))d="The ".concat(e," ").concat(u," ").concat(h(t,"type"));else{var g=r(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(g," ").concat(u," ").concat(h(t,"type"))}return d+=". Received type ".concat(typeof o),d},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=c},{}],59:[function(y,k,x){(function(p){(function(){"use strict";var c=Object.keys||function(u){var d=[];for(var g in u)d.push(g);return d};k.exports=e;var m=y("./_stream_readable"),h=y("./_stream_writable");y("inherits")(e,m);for(var s=c(h.prototype),i=0;i0)if(typeof l!="string"&&!L.objectMode&&Object.getPrototypeOf(l)!==r.prototype&&(l=t(l)),a)L.endEmitted?B(b,new C):T(b,L,l,!0);else if(L.ended)B(b,new W);else{if(L.destroyed)return!1;L.reading=!1,L.decoder&&!n?(l=L.decoder.write(l),L.objectMode||l.length!==0?T(b,L,l,!1):$(b,L)):T(b,L,l,!1)}else a||(L.reading=!1,$(b,L))}return!L.ended&&(L.length=z?b=z:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function ee(b,l){return b<=0||l.length===0&&l.ended?0:l.objectMode?1:b!==b?l.flowing&&l.length?l.buffer.head.data.length:l.length:(b>l.highWaterMark&&(l.highWaterMark=re(b)),b<=l.length?b:l.ended?l.length:(l.needReadable=!0,0))}G.prototype.read=function(b){d("read",b),b=parseInt(b,10);var l=this._readableState,n=b;if(b!==0&&(l.emittedReadable=!1),b===0&&l.needReadable&&((l.highWaterMark!==0?l.length>=l.highWaterMark:l.length>0)||l.ended))return d("read: emitReadable",l.length,l.ended),l.length===0&&l.ended?N(this):D(this),null;if(b=ee(b,l),b===0&&l.ended)return l.length===0&&N(this),null;var a=l.needReadable;d("need readable",a),(l.length===0||l.length-b0?w=I(b,l):w=null,w===null?(l.needReadable=l.length<=l.highWaterMark,b=0):(l.length-=b,l.awaitDrain=0),l.length===0&&(l.ended||(l.needReadable=!0),n!==b&&l.ended&&N(this)),w!==null&&this.emit("data",w),w};function H(b,l){if(d("onEofChunk"),!l.ended){if(l.decoder){var n=l.decoder.end();n&&n.length&&(l.buffer.push(n),l.length+=l.objectMode?1:n.length)}l.ended=!0,l.sync?D(b):(l.needReadable=!1,l.emittedReadable||(l.emittedReadable=!0,X(b)))}}function D(b){var l=b._readableState;d("emitReadable",l.needReadable,l.emittedReadable),l.needReadable=!1,l.emittedReadable||(d("emitReadable",l.flowing),l.emittedReadable=!0,p.nextTick(X,b))}function X(b){var l=b._readableState;d("emitReadable_",l.destroyed,l.length,l.ended),!l.destroyed&&(l.length||l.ended)&&(b.emit("readable"),l.emittedReadable=!1),l.needReadable=!l.flowing&&!l.ended&&l.length<=l.highWaterMark,O(b)}function $(b,l){l.readingMore||(l.readingMore=!0,p.nextTick(oe,b,l))}function oe(b,l){for(;!l.reading&&!l.ended&&(l.length1&&Q(a.pipes,b)!==-1)&&!he&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++),n.pause())}function ce(xe){d("onerror",xe),ve(),b.removeListener("error",ce),s(b,"error")===0&&B(b,xe)}se(b,"error",ce);function we(){b.removeListener("finish",Se),ve()}b.once("close",we);function Se(){d("onfinish"),b.removeListener("close",we),ve()}b.once("finish",Se);function ve(){d("unpipe"),n.unpipe(b)}return b.emit("pipe",n),a.flowing||(d("pipe resume"),n.resume()),b};function Z(b){return function(){var n=b._readableState;d("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,n.awaitDrain===0&&s(b,"data")&&(n.flowing=!0,O(b))}}G.prototype.unpipe=function(b){var l=this._readableState,n={hasUnpiped:!1};if(l.pipesCount===0)return this;if(l.pipesCount===1)return b&&b!==l.pipes?this:(b||(b=l.pipes),l.pipes=null,l.pipesCount=0,l.flowing=!1,b&&b.emit("unpipe",this,n),this);if(!b){var a=l.pipes,w=l.pipesCount;l.pipes=null,l.pipesCount=0,l.flowing=!1;for(var L=0;L0,a.flowing!==!1&&this.resume()):b==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,d("on readable",a.length,a.reading),a.length?D(this):a.reading||p.nextTick(M,this)),n},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(b,l){var n=i.prototype.removeListener.call(this,b,l);return b==="readable"&&p.nextTick(F,this),n},G.prototype.removeAllListeners=function(b){var l=i.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&p.nextTick(F,this),l};function F(b){var l=b._readableState;l.readableListening=b.listenerCount("readable")>0,l.resumeScheduled&&!l.paused?l.flowing=!0:b.listenerCount("data")>0&&b.resume()}function M(b){d("readable nexttick read 0"),b.read(0)}G.prototype.resume=function(){var b=this._readableState;return b.flowing||(d("resume"),b.flowing=!b.readableListening,Y(this,b)),b.paused=!1,this};function Y(b,l){l.resumeScheduled||(l.resumeScheduled=!0,p.nextTick(te,b,l))}function te(b,l){d("resume",l.reading),l.reading||b.read(0),l.resumeScheduled=!1,b.emit("resume"),O(b),l.flowing&&!l.reading&&b.read(0)}G.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function O(b){var l=b._readableState;for(d("flow",l.flowing);l.flowing&&b.read()!==null;);}G.prototype.wrap=function(b){var l=this,n=this._readableState,a=!1;b.on("end",function(){if(d("wrapped end"),n.decoder&&!n.ended){var K=n.decoder.end();K&&K.length&&l.push(K)}l.push(null)}),b.on("data",function(K){if(d("wrapped data"),n.decoder&&(K=n.decoder.write(K)),!(n.objectMode&&K==null)&&!(!n.objectMode&&(!K||!K.length))){var J=l.push(K);J||(a=!0,b.pause())}});for(var w in b)this[w]===void 0&&typeof b[w]=="function"&&(this[w]=function(J){return function(){return b[J].apply(b,arguments)}}(w));for(var L=0;L=l.length?(l.decoder?n=l.buffer.join(""):l.buffer.length===1?n=l.buffer.first():n=l.buffer.concat(l.length),l.buffer.clear()):n=l.buffer.consume(b,l.decoder),n}function N(b){var l=b._readableState;d("endReadable",l.endEmitted),l.endEmitted||(l.ended=!0,p.nextTick(q,l,b))}function q(b,l){if(d("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,l.readable=!1,l.emit("end"),b.autoDestroy)){var n=l._writableState;(!n||n.autoDestroy&&n.finished)&&l.destroy()}}typeof Symbol=="function"&&(G.from=function(b,l){return V===void 0&&(V=y("./internal/streams/from")),V(G,b,l)});function Q(b,l){for(var n=0,a=b.length;n-1))throw new S(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T(O,I,N){return!O.objectMode&&O.decodeStrings!==!1&&typeof I=="string"&&(I=e.from(I,N)),I}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(O,I,N,q,Q,b){if(!N){var l=T(I,q,Q);q!==l&&(N=!0,Q="buffer",q=l)}var n=I.objectMode?1:q.length;I.length+=n;var a=I.length0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(f){var v={data:f,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var v=this.head,R=""+v.data;v=v.next;)R+=f+v.data;return R}},{key:"concat",value:function(f){if(this.length===0)return e.alloc(0);for(var v=e.allocUnsafe(f>>>0),R=this.head,A=0;R;)d(R.data,v,A),A+=R.data.length,R=R.next;return v}},{key:"consume",value:function(f,v){var R;return fW.length?W.length:f;if(j===W.length?A+=W:A+=W.slice(0,f),f-=j,f===0){j===W.length?(++R,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=W.slice(j));break}++R}return this.length-=R,A}},{key:"_getBuffer",value:function(f){var v=e.allocUnsafe(f),R=this.head,A=1;for(R.data.copy(v),f-=R.data.length;R=R.next;){var W=R.data,j=f>W.length?W.length:f;if(W.copy(v,v.length-f,0,j),f-=j,f===0){j===W.length?(++A,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=W.slice(j));break}++A}return this.length-=A,v}},{key:u,value:function(f,v){return o(this,c({},v,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],66:[function(y,k,x){(function(p){(function(){"use strict";function c(e,t){var o=this,u=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return u||d?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(i,this,e)):p.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(g){!t&&g?o._writableState?o._writableState.errorEmitted?p.nextTick(h,o):(o._writableState.errorEmitted=!0,p.nextTick(m,o,g)):p.nextTick(m,o,g):t?(p.nextTick(h,o),t(g)):p.nextTick(h,o)}),this)}function m(e,t){i(e,t),h(e)}function h(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(e,t){e.emit("error",t)}function r(e,t){var o=e._readableState,u=e._writableState;o&&o.autoDestroy||u&&u.autoDestroy?e.destroy(t):e.emit("error",t)}k.exports={destroy:c,undestroy:s,errorOrDestroy:r}}).call(this)}).call(this,y("_process"))},{_process:85}],67:[function(y,k,x){"use strict";var p=y("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function c(i){var r=!1;return function(){if(!r){r=!0;for(var e=arguments.length,t=new Array(e),o=0;o0;return e(W,C,P,function(S){R||(R=S),S&&A.forEach(t),!C&&(A.forEach(t),v(R))})});return _.reduce(o)}k.exports=d},{"../../../errors":58,"./end-of-stream":67}],70:[function(y,k,x){"use strict";var p=y("../../../errors").codes.ERR_INVALID_OPT_VALUE;function c(h,s,i){return h.highWaterMark!=null?h.highWaterMark:s?h[i]:null}function m(h,s,i,r){var e=c(s,r,i);if(e!=null){if(!(isFinite(e)&&Math.floor(e)===e)||e<0){var t=r?i:"highWaterMark";throw new p(t,e)}return Math.floor(e)}return h.objectMode?16:16*1024}k.exports={getHighWaterMark:m}},{"../../../errors":58}],71:[function(y,k,x){k.exports=y("events").EventEmitter},{events:4}],72:[function(y,k,x){x=k.exports=y("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=y("./lib/_stream_writable.js"),x.Duplex=y("./lib/_stream_duplex.js"),x.Transform=y("./lib/_stream_transform.js"),x.PassThrough=y("./lib/_stream_passthrough.js"),x.finished=y("./lib/internal/streams/end-of-stream.js"),x.pipeline=y("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":59,"./lib/_stream_passthrough.js":60,"./lib/_stream_readable.js":61,"./lib/_stream_transform.js":62,"./lib/_stream_writable.js":63,"./lib/internal/streams/end-of-stream.js":67,"./lib/internal/streams/pipeline.js":69}],73:[function(y,k,x){"use strict";function p(m,h,s){var i=this;this._callback=m,this._args=s,this._interval=setInterval(m,h,this._args),this.reschedule=function(r){r||(r=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,r,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}function c(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var m;if(arguments.length>0){m=new Array(arguments.length-2);for(var h=0;h>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function r(A,W,j){var C=W.length-1;if(C=0?(P>0&&(A.lastNeed=P-1),P):--C=0?(P>0&&(A.lastNeed=P-2),P):--C=0?(P>0&&(P===2?P=0:A.lastNeed=P-3),P):0))}function e(A,W,j){if((W[0]&192)!==128)return A.lastNeed=0,"\uFFFD";if(A.lastNeed>1&&W.length>1){if((W[1]&192)!==128)return A.lastNeed=1,"\uFFFD";if(A.lastNeed>2&&W.length>2&&(W[2]&192)!==128)return A.lastNeed=2,"\uFFFD"}}function t(A){var W=this.lastTotal-this.lastNeed,j=e(this,A,W);if(j!==void 0)return j;if(this.lastNeed<=A.length)return A.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,W,0,A.length),this.lastNeed-=A.length}function o(A,W){var j=r(this,A,W);if(!this.lastNeed)return A.toString("utf8",W);this.lastTotal=j;var C=A.length-(j-this.lastNeed);return A.copy(this.lastChar,0,C),A.toString("utf8",W,C)}function u(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+"\uFFFD":W}function d(A,W){if((A.length-W)%2===0){var j=A.toString("utf16le",W);if(j){var C=j.charCodeAt(j.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],j.slice(0,-1)}return j}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",W,A.length-1)}function g(A){var W=A&&A.length?this.write(A):"";if(this.lastNeed){var j=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,j)}return W}function _(A,W){var j=(A.length-W)%3;return j===0?A.toString("base64",W):(this.lastNeed=3-j,this.lastTotal=3,j===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",W,A.length-j))}function f(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function v(A){return A.toString(this.encoding)}function R(A){return A&&A.length?this.write(A):""}},{"safe-buffer":76}],79:[function(y,k,x){(function(p){(function(){k.exports=c;function c(h,s){if(m("noDeprecation"))return h;var i=!1;function r(){if(!i){if(m("throwDeprecation"))throw new Error(s);m("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return h.apply(this,arguments)}return r}function m(h){try{if(!p.localStorage)return!1}catch{return!1}var s=p.localStorage[h];return s==null?!1:String(s).toLowerCase()==="true"}}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],80:[function(y,k,x){k.exports=p;function p(c,m){if(c&&m)return p(c)(m);if(typeof c!="function")throw new TypeError("need wrapper function");return Object.keys(c).forEach(function(s){h[s]=c[s]}),h;function h(){for(var s=new Array(arguments.length),i=0;i0)for(var e=0,t=arguments.length;e1)e=r;else if(this.head)t=this.head.next,e=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;t!==null;o++)e=i(e,t.value,o),t=t.next;return e},p.prototype.reduceReverse=function(i,r){var e,t=this.tail;if(arguments.length>1)e=r;else if(this.tail)t=this.tail.prev,e=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;t!==null;o--)e=i(e,t.value,o),t=t.prev;return e},p.prototype.toArray=function(){for(var i=new Array(this.length),r=0,e=this.head;e!==null;r++)i[r]=e.value,e=e.next;return i},p.prototype.toArrayReverse=function(){for(var i=new Array(this.length),r=0,e=this.tail;e!==null;r++)i[r]=e.value,e=e.prev;return i},p.prototype.slice=function(i,r){r=r||this.length,r<0&&(r+=this.length),i=i||0,i<0&&(i+=this.length);var e=new p;if(rthis.length&&(r=this.length);for(var t=0,o=this.head;o!==null&&tthis.length&&(r=this.length);for(var t=this.length,o=this.tail;o!==null&&t>r;t--)o=o.prev;for(;o!==null&&t>i;t--,o=o.prev)e.push(o.value);return e},p.prototype.splice=function(i,r,...e){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var t=0,o=this.head;o!==null&&t1)for(var A=1;A= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=e-t,C=Math.floor,P=String.fromCharCode,S;function V(H){throw new RangeError(W[H])}function B(H,D){for(var X=H.length,$=[];X--;)$[X]=D(H[X]);return $}function ne(H,D){var X=H.split("@"),$="";X.length>1&&($=X[0]+"@",H=X[1]),H=H.replace(A,".");var oe=H.split("."),Z=B(oe,D).join(".");return $+Z}function se(H){for(var D=[],X=0,$=H.length,oe,Z;X<$;)oe=H.charCodeAt(X++),oe>=55296&&oe<=56319&&X<$?(Z=H.charCodeAt(X++),(Z&64512)==56320?D.push(((oe&1023)<<10)+(Z&1023)+65536):(D.push(oe),X--)):D.push(oe);return D}function ie(H){return B(H,function(D){var X="";return D>65535&&(D-=65536,X+=P(D>>>10&1023|55296),D=56320|D&1023),X+=P(D),X}).join("")}function G(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:e}function E(H,D){return H+22+75*(H<26)-((D!=0)<<5)}function T(H,D,X){var $=0;for(H=X?C(H/d):H>>1,H+=C(H/D);H>j*o>>1;$+=e)H=C(H/j);return C($+(j+1)*H/(H+u))}function U(H){var D=[],X=H.length,$,oe=0,Z=_,F=g,M,Y,te,O,I,N,q,Q,b;for(M=H.lastIndexOf(f),M<0&&(M=0),Y=0;Y=128&&V("not-basic"),D.push(H.charCodeAt(Y));for(te=M>0?M+1:0;te=X&&V("invalid-input"),q=G(H.charCodeAt(te++)),(q>=e||q>C((r-oe)/I))&&V("overflow"),oe+=q*I,Q=N<=F?t:N>=F+o?o:N-F,!(qC(r/b)&&V("overflow"),I*=b;$=D.length+1,F=T(oe-O,$,O==0),C(oe/$)>r-Z&&V("overflow"),Z+=C(oe/$),oe%=$,D.splice(oe++,0,Z)}return ie(D)}function z(H){var D,X,$,oe,Z,F,M,Y,te,O,I,N=[],q,Q,b,l;for(H=se(H),q=H.length,D=_,X=0,Z=g,F=0;F=D&&IC((r-X)/Q)&&V("overflow"),X+=(M-D)*Q,D=M,F=0;Fr&&V("overflow"),I==D){for(Y=X,te=e;O=te<=Z?t:te>=Z+o?o:te-Z,!(Y0&&o>t&&(o=t);for(var u=0;u=0?(_=d.substr(0,g),f=d.substr(g+1)):(_=d,f=""),v=decodeURIComponent(_),R=decodeURIComponent(f),p(r,v)?c(r[v])?r[v].push(R):r[v]=[r[v],R]:r[v]=R}return r};var c=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"}},{}],88:[function(y,k,x){"use strict";var p=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};k.exports=function(s,i,r,e){return i=i||"&",r=r||"=",s===null&&(s=void 0),typeof s=="object"?m(h(s),function(t){var o=encodeURIComponent(p(t))+r;return c(s[t])?m(s[t],function(u){return o+encodeURIComponent(p(u))}).join(i):o+encodeURIComponent(p(s[t]))}).join(i):e?encodeURIComponent(p(e))+r+encodeURIComponent(p(s)):""};var c=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function m(s,i){if(s.map)return s.map(i);for(var r=[],e=0;e",'"',"`"," ","\r",`
+`," "],e=["{","}","|","\\","^","`"].concat(r),t=["'"].concat(e),o=["%","/","?",";","#"].concat(t),u=["/","?","#"],d=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},R={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=y("querystring");function W(S,V,B){if(S&&c.isObject(S)&&S instanceof m)return S;var ne=new m;return ne.parse(S,V,B),ne}m.prototype.parse=function(S,V,B){if(!c.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var ne=S.indexOf("?"),se=ne!==-1&&ne127?Y+="x":Y+=M[te];if(!Y.match(g)){var I=Z.slice(0,H),N=Z.slice(H+1),q=M.match(_);q&&(I.push(q[1]),N.unshift(q[2])),N.length&&(E="/"+N.join(".")+E),this.hostname=I.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),oe||(this.hostname=p.toASCII(this.hostname));var Q=this.port?":"+this.port:"",b=this.hostname||"";this.host=b+Q,this.href+=this.host,oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),E[0]!=="/"&&(E="/"+E))}if(!f[z])for(var H=0,F=t.length;H0?B.host.split("@"):!1;Y&&(B.auth=Y.shift(),B.host=B.hostname=Y.shift())}return B.search=S.search,B.query=S.query,(!c.isNull(B.pathname)||!c.isNull(B.search))&&(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.href=B.format(),B}if(!Z.length)return B.pathname=null,B.search?B.path="/"+B.search:B.path=null,B.href=B.format(),B;for(var te=Z.slice(-1)[0],O=(B.host||S.host||Z.length>1)&&(te==="."||te==="..")||te==="",I=0,N=Z.length;N>=0;N--)te=Z[N],te==="."?Z.splice(N,1):te===".."?(Z.splice(N,1),I++):I&&(Z.splice(N,1),I--);if(!$&&!oe)for(;I--;I)Z.unshift("..");$&&Z[0]!==""&&(!Z[0]||Z[0].charAt(0)!=="/")&&Z.unshift(""),O&&Z.join("/").substr(-1)!=="/"&&Z.push("");var q=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";if(M){B.hostname=B.host=q?"":Z.length?Z.shift():"";var Y=B.host&&B.host.indexOf("@")>0?B.host.split("@"):!1;Y&&(B.auth=Y.shift(),B.host=B.hostname=Y.shift())}return $=$||B.host&&Z.length,$&&!q&&Z.unshift(""),Z.length?B.pathname=Z.join("/"):(B.pathname=null,B.path=null),(!c.isNull(B.pathname)||!c.isNull(B.search))&&(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.auth=S.auth||B.auth,B.slashes=B.slashes||S.slashes,B.href=B.format(),B},m.prototype.parseHost=function(){var S=this.host,V=s.exec(S);V&&(V=V[0],V!==":"&&(this.port=V.substr(1)),S=S.substr(0,S.length-V.length)),S&&(this.hostname=S)}},{"./util":91,punycode:86,querystring:89}],91:[function(y,k,x){"use strict";k.exports={isString:function(p){return typeof p=="string"},isObject:function(p){return typeof p=="object"&&p!==null},isNull:function(p){return p===null},isNullOrUndefined:function(p){return p==null}}},{}]},{},[17])(17)})});function Yr(ae,ue){if(ae&1&&(_e(0,"th",5),Te(1),ye()),ae&2){let pe=ue.$implicit;ge(),Re(pe.title)}}function Qr(ae,ue){if(ae&1&&(_e(0,"td",7),Te(1),ye()),ae&2){let pe=ue.$implicit,y=Ae().$implicit;ge(),Re(y[pe.key])}}function Gr(ae,ue){if(ae&1&&(_e(0,"tr"),Ee(1,Qr,2,1,"td",6),ye()),ae&2){let pe=Ae();ge(),be("ngForOf",pe.columns)}}var si=(()=>{let ue=class ue{constructor(){this.columns=[],this.data=[]}ngOnInit(){console.log(this.data)}};ue.\u0275fac=function(k){return new(k||ue)},ue.\u0275cmp=ke({type:ue,selectors:[["app-data-v-lj-table"]],inputs:{columns:"columns",data:"data"},standalone:!0,features:[Le],decls:7,vars:4,consts:[["nzBordered","","nzSize","small",3,"nzData","nzPageSize"],["dynamicTable",""],["style",`
+ background: rgb(8 22 48);
+ /* color: #bfceff !important; */
+ color: #75f9fd;
+ text-align: center;
+ border: 0.5px solid #ffffff !important;
+ `,"nzShowSort","true",4,"ngFor","ngForOf"],[2,"background","rgb(8 22 48)"],[4,"ngFor","ngForOf"],["nzShowSort","true",2,"background","rgb(8 22 48)","/* color","#bfceff !important",`*/
+ color`,"#75f9fd","text-align","center","border","0.5px solid #ffffff !important"],["style","text-align: center; color: #75f9fd; border: 0.5px solid #ffffff !important; transition: background 0.3s",4,"ngFor","ngForOf"],[2,"text-align","center","color","#75f9fd","border","0.5px solid #ffffff !important","transition","background 0.3s"]],template:function(k,x){if(k&1&&(_e(0,"nz-table",0,1)(2,"thead")(3,"tr"),Ee(4,Yr,2,1,"th",2),ye()(),_e(5,"tbody",3),Ee(6,Gr,2,1,"tr",4),ye()()),k&2){let p=Ne(1);be("nzData",x.data)("nzPageSize",5),ge(4),be("ngForOf",x.columns),ge(2),be("ngForOf",p.data)}},dependencies:[ze,qe,ht,it,ct,pt,ft,lt,Ve,et,rt,_t,at,st,nt,je,Xe,Ze,dt,yt,Ge,gt,ot,Qe,tt,Je,sr,ir,rr,nr,lr,or,ar,mt,He,We,ut,Ye,De,Ke,$e,Fe,Ue,tr],styles:[".ant-table-bordered[_ngcontent-%COMP%] .ant-table-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .ant-table-bordered[_ngcontent-%COMP%] .ant-table-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{border-color:#fff!important}.tableColor[_ngcontent-%COMP%] .ant-table-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{border-right:3px solid #2b3e71!important;border-bottom:1px solid #334474!important;transition:background .3s}.tableColor[_ngcontent-%COMP%] .ant-table-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{color:#bfceff!important;background-color:transparent!important;border-right:3px solid #2b3e71!important;border-bottom:1px solid #334474!important}"]});let ae=ue;return ae})();function $r(ae,ue){if(ae&1){let pe=jt();_e(0,"li",9)(1,"label",10),Wt("ngModelChange",function(k){let p=St(pe).$implicit;return xt(p.checked=k)})("ngModelChange",function(){St(pe);let k=Ae(2);return xt(k.onCheckChange())}),Te(2),ye()()}if(ae&2){let pe=ue.$implicit;ge(),be("ngModel",pe.checked),ge(),Re(pe.label)}}function Jr(ae,ue){if(ae&1&&(_e(0,"div",4),Dt(1,"a",5),_e(2,"nz-dropdown-menu",null,6)(4,"ul",7),Ee(5,$r,3,2,"li",8),ye()()()),ae&2){let pe=Ne(3),y=Ae();ge(),be("nzDropdownMenu",pe),ge(4),be("ngForOf",y.optionsList)}}var Xr=["*"],_i=(()=>{let ue=class ue{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new me,this.title=""}getCheckedItems(){return this.optionsList.filter(y=>y.checked)}onCheckChange(){let y=this.getCheckedItems();this.onCheckedItemsChange.emit(y)}};ue.\u0275fac=function(k){return new(k||ue)},ue.\u0275cmp=ke({type:ue,selectors:[["data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[Le],ngContentSelectors:Xr,decls:6,vars:2,consts:[[1,"card-content"],[1,"card-content-title"],[1,"card-content-l"],["class","card-content-r",4,"ngIf"],[1,"card-content-r"],["nz-dropdown","","nz-icon","","nzType","setting","nzTrigger","click","nzTheme","outline",3,"nzDropdownMenu"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",4,"ngFor","ngForOf"],["nz-menu-item",""],["nz-checkbox","",3,"ngModel","ngModelChange"]],template:function(k,x){k&1&&(Ht(),_e(0,"div",0)(1,"div",1)(2,"div",2),Te(3),ye(),Ee(4,Jr,6,2,"div",3),ye(),Vt(5),ye()),k&2&&(ge(3),Re(x.title),ge(),be("ngIf",x.showSetting))},dependencies:[De,qt,Fe,Ue,zt,Qe,Jt,$t,Xt,Zt,er,ze,Yt,Qt,qe,ht,it,ct,pt,ft,lt,Ve,et,rt,_t,at,st,nt,je,Kt,Xe,Ze,dt,yt,Ge,gt,ot,tt,Je,mt,He,We,ut,Ye,Ke,Gt,$e],styles:['.card-content[_ngcontent-%COMP%]{overflow:hidden;padding:1rem 1.5rem;background-image:url("./media/dashboard_card_bg-2QFDBQFD.jpg");background-position:top;background-size:cover;margin-bottom:.5rem}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%]{display:flex;margin-bottom:.5rem;font-size:18px;font-weight:600;color:#74fafb}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-l[_ngcontent-%COMP%]{align-self:flex-start;flex:1}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-r[_ngcontent-%COMP%]{align-self:flex-end}']});let ae=ue;return ae})();var Ti=Tt(It(),1),fr=Tt(It(),1);var Pe=function(ae){return ae[ae.CLOSED=0]="CLOSED",ae[ae.CONNECTING=1]="CONNECTING",ae[ae.CONNECTED=2]="CONNECTED",ae}(Pe||{});var Zr=new vt("NgxMqttServiceConfig"),ei=new vt("NgxMqttClientService");function bt(ae,...ue){if(!ue.length)return ae;let pe=ue.shift();if(At(ae)&&At(pe))for(let y in pe)At(pe[y])?(ae[y]||Object.assign(ae,{[y]:{}}),bt(ae[y],pe[y])):Object.assign(ae,{[y]:pe[y]});return bt(ae,...ue)}function At(ae){return ae&&typeof ae=="object"&&!Array.isArray(ae)}var Oi=(()=>{let ue=class ue{constructor(y,k){this.options=y,this.observables={},this.state=new Mt(Pe.CLOSED),this.messages=new wt,this._clientId=this._generateClientId(),this._connectTimeout=1e4,this._reconnectPeriod=1e4,this._onConnect=new me,this._onReconnect=new me,this._onClose=new me,this._onOffline=new me,this._onError=new me,this._onEnd=new me,this._onMessage=new me,this._onSuback=new me,this._onPacketsend=new me,this._onPacketreceive=new me,this._handleOnConnect=x=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(p=>{this.client.subscribe(p)}),this.state.next(Pe.CONNECTED),this._onConnect.emit(x)},this._handleOnReconnect=()=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(x=>{this.client.subscribe(x)}),this.state.next(Pe.CONNECTING),this._onReconnect.emit()},this._handleOnClose=()=>{this.state.next(Pe.CLOSED),this._onClose.emit()},this._handleOnOffline=()=>{this._onOffline.emit()},this._handleOnError=x=>{this._onError.emit(x),console.error(x)},this._handleOnEnd=()=>{this._onEnd.emit()},this._handleOnMessage=(x,p,c)=>{this._onMessage.emit(c),c.cmd==="publish"&&this.messages.next(c)},this._handleOnPacketsend=x=>{this._onPacketsend.emit(x)},this._handleOnPacketreceive=x=>{this._onPacketreceive.emit(x)},y.connectOnCreate!==!1&&this.connect({},k),this.state.subscribe()}get clientId(){return this._clientId}get onConnect(){return this._onConnect}get onReconnect(){return this._onReconnect}get onClose(){return this._onClose}get onOffline(){return this._onOffline}get onError(){return this._onError}get onEnd(){return this._onEnd}get onMessage(){return this._onMessage}get onPacketsend(){return this._onPacketsend}get onPacketreceive(){return this._onPacketreceive}get onSuback(){return this._onSuback}static filterMatchesTopic(y,k){if(y[0]==="#"&&k[0]==="$")return!1;let x=(y||"").split("/").reverse(),p=(k||"").split("/").reverse(),c=()=>{let m=x.pop(),h=p.pop();switch(m){case"#":return!0;case"+":return h?c():!1;default:return m===h&&(m===void 0?!0:c())}};return c()}connect(y,k){let x=bt(this.options||{},y),p=x.protocol||"ws",c=x.hostname||"localhost";x.url?this._url=x.url:(this._url=`${p}://${c}`,this._url+=x.port?`:${x.port}`:"",this._url+=x.path?`${x.path}`:""),this.state.next(Pe.CONNECTING);let m=bt({clientId:this._clientId,reconnectPeriod:this._reconnectPeriod,connectTimeout:this._connectTimeout},x);this.client&&this.client.end(!0),k?this.client=k:this.client=(0,fr.connect)(this._url,m),this._clientId=m.clientId,this.client.on("connect",this._handleOnConnect),this.client.on("reconnect",this._handleOnReconnect),this.client.on("close",this._handleOnClose),this.client.on("offline",this._handleOnOffline),this.client.on("error",this._handleOnError),this.client.stream.on("error",this._handleOnError),this.client.on("end",this._handleOnEnd),this.client.on("message",this._handleOnMessage),this.client.on("packetsend",this._handleOnPacketsend),this.client.on("packetreceive",this._handleOnPacketreceive)}disconnect(y=!0){if(!this.client)throw new Error("mqtt client not connected");this.client.end(y)}observeRetained(y,k={qos:1}){return this._generalObserve(y,()=>Ut(1),k)}observe(y,k={qos:1}){return this._generalObserve(y,()=>Lt(),k)}_generalObserve(y,k,x){if(!this.client)throw new Error("mqtt client not connected");if(!this.observables[y]){let p=new wt;this.observables[y]=Nt(()=>{let c=new Rt;return this.client.subscribe(y,x,(m,h)=>{h&&h.forEach(s=>{s.qos===128&&(delete this.observables[s.topic],this.client.unsubscribe(s.topic),p.error(`subscription for '${s.topic}' rejected!`)),this._onSuback.emit({filter:y,granted:s.qos!==128})})}),c.add(()=>{delete this.observables[y],this.client.unsubscribe(y)}),c},c=>Bt(p,this.messages)).pipe(kt(c=>ue.filterMatchesTopic(y,c.topic)),k(),Ot())}return this.observables[y]}publish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");return Pt.create(p=>{this.client.publish(y,k,x,c=>{c?p.error(c):(p.next(),p.complete())})})}unsafePublish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");this.client.publish(y,k,x,p=>{if(p)throw p})}_generateClientId(){return"client-"+Math.random().toString(36).substr(2,19)}};ue.\u0275fac=function(k){return new(k||ue)(Et(Zr),Et(ei))},ue.\u0275prov=Ft({token:ue,factory:ue.\u0275fac,providedIn:"root"});let ae=ue;return ae})();export{si as a,_i as b,Oi as c};
diff --git a/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js b/dist/himp.platform.angular/browser/chunk-MRNYEB3J.js
similarity index 99%
rename from dist/himp.platform.angular/browser/chunk-HCPW2OGS.js
rename to dist/himp.platform.angular/browser/chunk-MRNYEB3J.js
index c46c212..1368b03 100644
--- a/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js
+++ b/dist/himp.platform.angular/browser/chunk-MRNYEB3J.js
@@ -1,4 +1,4 @@
-import{$a as tn,B as Me,C as je,Ga as It,Ha as Yi,Ma as Ji,N as Ue,Na as Xi,O as ke,Oa as en,P as Fe,Q as $i,R as mt,S as Ne,U as Ae,V as ve,Y as ji,Z as Ui,_ as Wi,a as Li,ab as nn,bb as _t,c as Vi,cb as Oe,d as Ee,f as Ie,g as Ri,h as ut,j as ge,la as ft,lb as on,ma as ht,n as _e,na as qi,oa as gt,pa as Qi,qa as Gi,u as dt,ua as Zi,va as Ki,w as Bi,x as Hi,y as Pi}from"./chunk-OOUNO2UZ.js";import{a as A}from"./chunk-4FFPI7ZP.js";import{$b as te,$c as vi,A as Pt,Aa as Ye,Ab as ae,Ad as Ci,Bb as G,Bc as Dt,C as $t,Cb as Z,Cc as ui,D as xt,Da as Jt,Db as S,Dc as Tt,Ea as Xt,Eb as _,Ec as di,F as zt,Fa as Se,Fb as j,Fc as mi,Fe as E,Ga as Je,Gb as se,Ge as I,Ha as de,Hc as ot,He as lt,I as bt,Ib as ai,Ie as bi,If as Ai,J as q,Ja as De,Jb as T,Jc as U,Ka as s,Kb as Xe,Kc as rt,Ke as Si,L as jt,La as b,Lb as R,Le as Di,Lf as Oi,Ma as V,Me as Ti,N as pe,Na as me,Ne as wi,Oa as B,P as Ut,Pa as ne,Q as He,Qc as at,Ra as Te,S as Wt,Sa as ei,Sb as k,Sc as fi,T as qt,Ta as h,Ua as Q,Ub as et,Va as l,Vc as hi,Wa as ti,Wc as gi,Xa as D,Xb as tt,Xc as F,Ya as ii,Yb as K,Yc as _i,Zb as si,_a as St,_d as yi,a as yt,aa as ue,ba as be,bb as v,bc as we,be as xi,ca as Ge,cb as H,cc as it,cd as le,ce as wt,eb as P,ee as zi,fb as $,ga as Qt,gb as c,gf as Ei,ha as Ze,hb as p,hc as li,ia as J,ib as f,ic as fe,if as ct,j as Ht,ja as Gt,jb as ni,jf as Et,kb as oi,kf as Ii,l as qe,la as d,lb as ee,lf as Mi,ma as L,mb as w,na as C,nc as he,o as Qe,oa as X,p as xe,pa as Ke,pf as ki,qb as g,qf as pt,ra as Zt,rf as N,sa as x,sb as u,sc as ci,ta as z,tb as oe,tc as $e,tf as Fi,u as Y,ua as Kt,ub as re,uc as nt,va as Yt,w as ce,x as ze,xd as st,yb as ri,yc as pi,yf as Ni,zb as Pe}from"./chunk-VDRVUQCF.js";var rn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at]});let e=i;return e})();function On(e,i){if(e&1){let o=w();c(0,"li",7),g("click",function(){let r=x(o).$implicit,a=u();return z(a.onThemeChange(r.key))}),_(1),p()}if(e&2){let o=i.$implicit;s(),j(o.text)}}var Ln=new Gt("ALAIN_THEME_BTN_KEYS"),an=(()=>{let i=class i{constructor(){this.doc=d(te),this.platform=d(vi),this.renderer=d(De),this.configSrv=d(gi),this.directionality=d(le,{optional:!0}),this.cdr=d(V),this.destroy$=d(me),this.theme="default",this.isDev=tt(),this.types=[{key:"default",text:"Default Theme"},{key:"dark",text:"Dark Theme"},{key:"compact",text:"Compact Theme"}],this.devTips="When the dark.css file can't be found, you need to run it once: npm run theme",this.deployUrl="",this.themeChange=new B,this.dir="ltr",this.key=d(Ln,{optional:!0})??"site-theme"}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.initTheme()}initTheme(){this.platform.isBrowser&&(this.theme=localStorage.getItem(this.key)||"default",this.updateChartTheme(),this.onThemeChange(this.theme))}updateChartTheme(){this.configSrv.set("chart",{theme:this.theme==="dark"?"dark":""})}onThemeChange(t){if(!this.platform.isBrowser)return;this.theme=t,this.themeChange.emit(t),this.renderer.setAttribute(this.doc.body,"data-theme",t);let n=this.doc.getElementById(this.key);if(n&&n.remove(),localStorage.removeItem(this.key),t!=="default"){let r=this.doc.createElement("link");r.type="text/css",r.rel="stylesheet",r.id=this.key,r.href=`${this.deployUrl}assets/style.${t}.css`,localStorage.setItem(this.key,t),this.doc.body.append(r)}this.updateChartTheme()}ngOnDestroy(){let t=this.doc.getElementById(this.key);t!=null&&this.doc.body.removeChild(t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["theme-btn"]],hostVars:4,hostBindings:function(n,r){n&2&&D("theme-btn",!0)("theme-btn-rtl",r.dir==="rtl")},inputs:{types:"types",devTips:"devTips",deployUrl:"deployUrl"},outputs:{themeChange:"themeChange"},standalone:!0,features:[T],decls:10,vars:2,consts:[["nz-dropdown","","nzPlacement","topCenter",1,"ant-avatar","ant-avatar-circle","ant-avatar-icon",3,"nzDropdownMenu"],["nz-tooltip","","role","img","width","21","height","21","viewBox","0 0 21 21","fill","currentColor",1,"anticon",3,"nzTooltipTitle"],["fill-rule","evenodd"],["fill-rule","nonzero"],["d","M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click"],["nz-menu-item",""]],template:function(n,r){if(n&1&&(c(0,"div",0),Kt(),c(1,"svg",1)(2,"g",2)(3,"g",3),f(4,"path",4),p()()(),Yt(),c(5,"nz-dropdown-menu",null,5)(7,"ul",6),P(8,On,2,1,"li",8,H),p()()()),n&2){let a=S(6);l("nzDropdownMenu",r.types.length>0?a:null),s(),l("nzTooltipTitle",r.isDev?r.devTips:null),s(7),$(r.types)}},dependencies:[Ne,Ae,Fe,ke,Me],encapsulation:2,changeDetection:0});let e=i;return e})();var Xr=(()=>{let i=class i{constructor(){this.tokenService=d(A),this.links=[{title:"\u5E2E\u52A9",href:""},{title:"\u9690\u79C1",href:""},{title:"\u6761\u6B3E",href:""}]}ngOnInit(){this.tokenService.clear()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-passport"]],standalone:!0,features:[T],decls:7,vars:0,consts:[[1,"container"],[1,"wrap"],[1,"top"],[1,"desc"],[1,"footer"]],template:function(n,r){n&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),f(3,"div",3),p(),f(4,"router-outlet"),c(5,"div",4),_(6," \u4E0A\u6D77\u53D1\u7535\u8BBE\u5907\u6210\u5957\u8BBE\u8BA1\u7814\u7A76\u9662\u6709\u9650\u8D23\u4EFB\u516C\u53F8 "),p()()())},dependencies:[ot,rn,I],styles:["[_nghost-%COMP%] .container{display:flex;flex-direction:column;min-height:100%;background:#f0f2f5}[_nghost-%COMP%] .langs{width:100%;height:40px;line-height:44px;text-align:right}[_nghost-%COMP%] .langs .anticon{cursor:pointer;margin-top:24px;margin-right:24px;font-size:14px;vertical-align:top}[_nghost-%COMP%] .wrap{flex:1;padding:32px 0}[_nghost-%COMP%] .ant-form-item{display:flex;justify-content:space-between;margin-bottom:24px}[_nghost-%COMP%] .top{margin-top:10rem;text-align:center}[_nghost-%COMP%] .footer{position:fixed;bottom:.8rem;left:50%;transform:translate(-50%,-50%);color:#f0f2f5}[_nghost-%COMP%] .desc{margin-top:12px;margin-bottom:40px;font-size:14px;color:#00000073}[_nghost-%COMP%] .container{background-image:url(/assets/bg.jpg);background-repeat:no-repeat;background-size:cover}@media (min-width: 768px){[_nghost-%COMP%] .wrap{padding:32px 0 24px}}[data-theme=dark] [_nghost-%COMP%] .container{background:#141414}[data-theme=dark] [_nghost-%COMP%] .title{color:#ffffffd9}[data-theme=dark] [_nghost-%COMP%] .desc{color:#ffffff73}@media (min-width: 768px){[data-theme=dark] [_nghost-%COMP%] .container{background-image:none}}[data-theme=compact] [_nghost-%COMP%] .ant-form-item{margin-bottom:16px}"]});let e=i;return e})();var Rn=["host"];function Bn(e,i){e&1&&re(0)}var ln=["*"];function Hn(e,i){if(e&1&&f(0,"i",3),e&2){let o=u(2).$implicit;l("nzType",o.value)("nzTheme",o.theme)("nzSpin",o.spin)("nzTwotoneColor",o.twoToneColor)("nzIconfont",o.iconfont)("nzRotate",o.rotate)}}function Pn(e,i){if(e&1&&f(0,"i",4),e&2){let o=u(2).$implicit;l("nzIconfont",o.iconfont)}}function $n(e,i){if(e&1&&f(0,"img",5),e&2){let o=u(2).$implicit;l("src",o.value,Je)}}function jn(e,i){if(e&1&&f(0,"span",6),e&2){let o=u(2).$implicit;l("innerHTML",o.value,Se)}}function Un(e,i){if(e&1&&f(0,"i"),e&2){let o=u(2).$implicit;St("sidebar-nav__item-icon ",o.value,"")}}function Wn(e,i){if(e&1&&h(0,Hn,1,6)(1,Pn,1,1)(2,$n,1,1)(3,jn,1,1)(4,Un,1,3),e&2){let o=u().$implicit,t;v(0,(t=o.type)==="icon"?0:t==="iconfont"?1:t==="img"?2:t==="svg"?3:4)}}function qn(e,i){if(e&1&&h(0,Wn,5,1),e&2){let o=i.$implicit;v(0,o?0:-1)}}function Qn(e,i){}var Ce=e=>({$implicit:e});function Gn(e,i){if(e&1&&(c(0,"span",15),h(1,Qn,0,0,"ng-template",16),p()),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("nzTooltipTitle",o.text),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.icon))}}function Zn(e,i){}function Kn(e,i){if(e&1&&h(0,Zn,0,0,"ng-template",16),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(2,Ce,o.icon))}}function Yn(e,i){if(e&1&&h(0,Gn,2,5,"span",15)(1,Kn,1,4),e&2){let o=u(5);v(0,o.collapsed?0:1)}}var Jn=e=>({"sidebar-nav__item-disabled":e});function Xn(e,i){if(e&1){let o=w();c(0,"a",13),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.to(n))})("mouseenter",function(){x(o);let n=u(4);return z(n.closeSubMenu())}),h(1,Yn,2,1),f(2,"span",14),p()}if(e&2){let o=u(2).$implicit;l("ngClass",R(5,Jn,o.disabled)),Q("data-id",o._id),s(),v(1,o._needIcon?1:-1),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function eo(e,i){}function to(e,i){if(e&1){let o=w();c(0,"a",17),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.toggleOpen(n))})("mouseenter",function(n){x(o);let r=u(2).$implicit,a=u(2);return z(a.showSubMenu(n,r))}),h(1,eo,0,0,"ng-template",16),f(2,"span",14)(3,"i",18),p()}if(e&2){let o=u(2).$implicit;u(2);let t=S(1);s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(4,Ce,o.icon)),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function io(e,i){if(e&1&&f(0,"nz-badge",11),e&2){let o=u(2).$implicit;l("nzCount",o.badge)("nzDot",o.badgeDot)("nzOverflowCount",9)}}function no(e,i){}function oo(e,i){if(e&1&&(c(0,"ul"),h(1,no,0,0,"ng-template",16),p()),e&2){let o=u(2).$implicit;u(2);let t=S(3);St("sidebar-nav sidebar-nav__sub sidebar-nav__depth",o._depth,""),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(5,Ce,o.children))}}function ro(e,i){if(e&1&&(c(0,"li",8),h(1,Xn,3,7,"a",9)(2,to,4,6,"a",10)(3,io,1,3,"nz-badge",11)(4,oo,2,7,"ul",12),p()),e&2){let o=u().$implicit;D("sidebar-nav__selected",o._selected)("sidebar-nav__open",o.open),s(),v(1,o.children.length===0?1:-1),s(),v(2,o.children.length>0?2:-1),s(),v(3,o.badge?3:-1),s(),v(4,o.children.length>0?4:-1)}}function ao(e,i){if(e&1&&h(0,ro,5,8,"li",7),e&2){let o=i.$implicit;v(0,o._hidden!==!0?0:-1)}}function so(e,i){if(e&1&&P(0,ao,1,1,null,null,H),e&2){let o=i.$implicit;$(o)}}function lo(e,i){if(e&1&&(c(0,"li",20),f(1,"span",21),p()),e&2){let o=u().$implicit;s(),l("innerHTML",o._text,Se)}}function co(e,i){}function po(e,i){if(e&1&&h(0,lo,2,1,"li",19)(1,co,0,0,"ng-template",16),e&2){let o=i.$implicit;u();let t=S(3);v(0,o.group?0:-1),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.children))}}function uo(e,i){e&1&&ee(0)}function mo(e,i){if(e&1&&(c(0,"li"),h(1,uo,1,0,"ng-container",6),p()),e&2){let o=i.$implicit;D("hidden-mobile",o.hidden==="mobile")("hidden-pc",o.hidden==="pc"),s(),l("ngTemplateOutlet",o.host)}}function fo(e,i){if(e&1&&P(0,mo,2,5,"li",7,H),e&2){let o=i.$implicit;$(o)}}function ho(e,i){e&1&&ee(0)}function go(e,i){if(e&1&&h(0,ho,1,0,"ng-container",6),e&2){let o=u();l("ngTemplateOutlet",o.opt.logo)}}function _o(e,i){if(e&1&&(c(0,"a",8),f(1,"img",9)(2,"img",10),p()),e&2){let o=u();l("routerLink",o.opt.logoLink),s(),Q("src",o.opt.logoExpanded,Je)("alt",o.app.name),s(),Q("src",o.opt.logoCollapsed,Je)("alt",o.app.name)}}function vo(e,i){if(e&1){let o=w();c(0,"li")(1,"div",11),g("click",function(){x(o);let n=u();return z(n.toggleCollapsed())}),f(2,"span",12),p()()}if(e&2){let o=u();s(2),l("nzType",o.collapsedIcon)}}function Co(e,i){}function yo(e,i){e&1&&ee(0)}function xo(e,i){if(e&1&&(c(0,"div",13),h(1,yo,1,0,"ng-container",6),p()),e&2){let o=u();s(),l("ngTemplateOutlet",o.middle[0].host)}}function zo(e,i){}function bo(e,i){e&1&&f(0,"div",5)}function So(e,i){if(e&1&&f(0,"layout-default-header",1),e&2){let o=u();l("items",o.headerItems)}}function Do(e,i){e&1&&ee(0)}function To(e,i){e&1&&ee(0)}function wo(e,i){e&1&&f(0,"layout-default-nav")}function Eo(e,i){e&1&&ee(0)}function Io(e,i){if(e&1&&h(0,Eo,1,0,"ng-container",4),e&2){let o=u(3);l("ngTemplateOutlet",o.asideBottom)}}function Mo(e,i){if(e&1){let o=w();c(0,"div",11),g("click",function(){x(o);let n=u(3);return z(n.toggleCollapsed())}),f(1,"span",12),p()}if(e&2){let o=u(3);s(),l("nzType",o.collapsedIcon)}}function ko(e,i){if(e&1&&(c(0,"div",10),h(1,Io,1,1,"ng-container")(2,Mo,2,1),p()),e&2){let o=u(2);s(),v(1,o.asideBottom?1:2)}}function Fo(e,i){if(e&1&&(c(0,"div",6)(1,"div",7)(2,"div",8),h(3,Do,1,0,"ng-container",4)(4,To,1,0,"ng-container",4)(5,wo,1,0,"layout-default-nav"),p(),h(6,ko,3,1,"div",9),p()()),e&2){let o=u();s(3),l("ngTemplateOutlet",o.asideUser),s(),l("ngTemplateOutlet",o.nav),s(),v(5,o.nav?-1:5),s(),v(6,o.opt.showSiderCollapse?6:-1)}}function No(e,i){e&1&&ee(0)}var Nt=(()=>{let i=class i{constructor(){this.hidden="none",this.direction="right"}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header-item"]],viewQuery:function(n,r){if(n&1&&ae(Rn,7),n&2){let a;G(a=Z())&&(r.host=a.first)}},inputs:{hidden:"hidden",direction:"direction"},ngContentSelectors:ln,decls:2,vars:0,consts:[["host",""]],template:function(n,r){n&1&&(oe(),h(0,Bn,1,0,"ng-template",null,0,k))},encapsulation:2});let e=i;return e})(),Mt={logoExpanded:"./assets/logo-full.svg",logoCollapsed:"./assets/logo.svg",logoLink:"/",showHeaderCollapse:!0,showSiderCollapse:!1,hideAside:!1,hideHeader:!1},cn=(()=>{let i=class i{constructor(){this.settings=d(N),this._options$=new xe(Mt),this._options=Mt}get options(){return this._options}get options$(){return this._options$.asObservable()}get collapsedIcon(){let t=this.settings.layout.collapsed,n=t?"unfold":"fold";return this.settings.layout.direction==="rtl"&&(n=t?"fold":"unfold"),`menu-${n}`}notify(){this._options$.next(this._options)}setOptions(t){this._options=yt(yt({},Mt),t),this.notify()}toggleCollapsed(t){this.settings.setLayout("collapsed",t??!this.settings.layout.collapsed),this.notify()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=Ze({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),kt="sidebar-nav__floating-show",Ft="sidebar-nav__floating",Ao=(()=>{let i=class i{constructor(){this.doc=d(te),this.win=d(Bi),this.router=d(U),this.render=d(De),this.menuSrv=d(pt),this.settings=d(N),this.cdr=d(V),this.ngZone=d(ne),this.sanitizer=d(pi),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.dir="ltr",this.list=[],this.disabledAcl=!1,this.autoCloseUnderPad=!0,this.recursivePath=!0,this.hideEmptyChildren=!0,this.maxLevelIcon=3,this.select=new B}set openStrictly(t){this.menuSrv.openStrictly=t}get collapsed(){return this.settings.layout.collapsed}getLinkNode(t){return t=t.nodeName==="A"?t:t.parentNode,t.nodeName!=="A"?null:t}floatingClickHandle(t){t.stopPropagation();let n=this.getLinkNode(t.target);if(n==null)return!1;let r=+n.dataset.id;if(isNaN(r))return!1;let a;return this.menuSrv.visit(this.list,m=>{!a&&m._id===r&&(a=m)}),this.to(a),this.hideAll(),t.preventDefault(),!1}clearFloating(){this.floatingEl&&(this.floatingEl.removeEventListener("click",this.floatingClickHandle.bind(this)),this.floatingEl.hasOwnProperty("remove")?this.floatingEl.remove():this.floatingEl.parentNode&&this.floatingEl.parentNode.removeChild(this.floatingEl))}genFloating(){this.clearFloating(),this.floatingEl=this.render.createElement("div"),this.floatingEl.classList.add(`${Ft}-container`),this.floatingEl.addEventListener("click",this.floatingClickHandle.bind(this),!1),this.bodyEl.appendChild(this.floatingEl)}genSubNode(t,n){let r=`_sidebar-nav-${n._id}`,m=(n.badge?t.nextElementSibling.nextElementSibling:t.nextElementSibling).cloneNode(!0);return m.id=r,m.classList.add(Ft),m.addEventListener("mouseleave",()=>{m.classList.remove(kt)},!1),this.floatingEl.appendChild(m),m}hideAll(){let t=this.floatingEl.querySelectorAll(`.${Ft}`);for(let n=0;nthis.router.navigateByUrl(t.link))}}toggleOpen(t){this.menuSrv.toggleOpen(t)}_click(){this.isPad&&this.collapsed&&(this.openAside(!1),this.hideAll())}closeSubMenu(){this.collapsed&&this.hideAll()}openByUrl(t){let{menuSrv:n,recursivePath:r}=this;this.menuSrv.open(n.find({url:t,recursive:r}))}ngOnInit(){let{doc:t,router:n,menuSrv:r,settings:a,cdr:m}=this;this.bodyEl=t.querySelector("body"),r.change.pipe(F(this.destroy$)).subscribe(y=>{r.visit(y,(M,Bt,An)=>{M._text=this.sanitizer.bypassSecurityTrustHtml(M.text),M._needIcon=An<=this.maxLevelIcon&&!!M.icon,M._aclResult||(this.disabledAcl?M.disabled=!0:M._hidden=!0);let Be=M.icon;Be&&Be.type==="svg"&&typeof Be.value=="string"&&(Be.value=this.sanitizer.bypassSecurityTrustHtml(Be.value))}),this.hideEmptyChildren&&this.fixHide(y),this.list=y.filter(M=>M._hidden!==!0),m.detectChanges()}),n.events.pipe(F(this.destroy$)).subscribe(y=>{y instanceof Dt&&(this.openByUrl(y.urlAfterRedirects),this.underPad(),this.cdr.detectChanges())}),a.notify.pipe(F(this.destroy$),q(y=>y.type==="layout"&&y.name==="collapsed")).subscribe(()=>this.clearFloating()),this.underPad(),this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(y=>{this.dir=y,this.cdr.detectChanges()}),this.openByUrl(n.url),this.ngZone.runOutsideAngular(()=>this.genFloating())}fixHide(t){let n=r=>{for(let a of r)a.children&&a.children.length>0&&(n(a.children),a._hidden||(a._hidden=a.children.every(m=>m._hidden)))};n(t)}ngOnDestroy(){this.clearFloating()}get isPad(){return this.doc.defaultView.innerWidth<768}underPad(){this.autoCloseUnderPad&&this.isPad&&!this.collapsed&&setTimeout(()=>this.openAside(!0))}openAside(t){this.settings.setLayout("collapsed",t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-nav"]],hostVars:2,hostBindings:function(n,r){n&1&&g("click",function(){return r._click()})("click",function(){return r.closeSubMenu()},!1,Xt),n&2&&D("d-block",!0)},inputs:{disabledAcl:[L.HasDecoratorInputTransform,"disabledAcl","disabledAcl",K],autoCloseUnderPad:[L.HasDecoratorInputTransform,"autoCloseUnderPad","autoCloseUnderPad",K],recursivePath:[L.HasDecoratorInputTransform,"recursivePath","recursivePath",K],hideEmptyChildren:[L.HasDecoratorInputTransform,"hideEmptyChildren","hideEmptyChildren",K],openStrictly:[L.HasDecoratorInputTransform,"openStrictly","openStrictly",K],maxLevelIcon:[L.HasDecoratorInputTransform,"maxLevelIcon","maxLevelIcon",si]},outputs:{select:"select"},features:[Te],decls:7,vars:0,consts:[["icon",""],["tree",""],[1,"sidebar-nav"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzType","nzTheme","nzSpin","nzTwotoneColor","nzIconfont","nzRotate"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzIconfont"],[1,"sidebar-nav__item-icon","sidebar-nav__item-img",3,"src"],[1,"sidebar-nav__item-icon","sidebar-nav__item-svg",3,"innerHTML"],["class","sidebar-nav__item",3,"sidebar-nav__selected","sidebar-nav__open"],[1,"sidebar-nav__item"],["class","sidebar-nav__item-link",3,"ngClass"],["class","sidebar-nav__item-link"],["nzStandalone","",3,"nzCount","nzDot","nzOverflowCount"],[3,"class"],[1,"sidebar-nav__item-link",3,"ngClass","click","mouseenter"],[1,"sidebar-nav__item-text",3,"innerHTML"],["nz-tooltip","","nzTooltipPlacement","right",3,"nzTooltipTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"sidebar-nav__item-link",3,"click","mouseenter"],[1,"sidebar-nav__sub-arrow"],["class","sidebar-nav__item sidebar-nav__group-title"],[1,"sidebar-nav__item","sidebar-nav__group-title"],[3,"innerHTML"]],template:function(n,r){n&1&&(h(0,qn,1,1,"ng-template",null,0,k)(2,so,2,0,"ng-template",null,1,k),c(4,"ul",2),P(5,po,2,5,null,16,H),p()),n&2&&(s(5),$(r.list))},dependencies:[we,fe,Me,E,Hi],encapsulation:2,changeDetection:0});let e=i;return Y([Ue()],e.prototype,"showSubMenu",null),e})(),Oo=(()=>{let i=class i{constructor(){this.settings=d(N),this.srv=d(cn),this.cdr=d(V),this.destroy$=d(me),this.left=[],this.middle=[],this.right=[]}get opt(){return this.srv.options}get app(){return this.settings.app}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}refresh(){let t=this.items.toArray();this.left=t.filter(n=>n.direction==="left"),this.middle=t.filter(n=>n.direction==="middle"),this.right=t.filter(n=>n.direction==="right"),this.cdr.detectChanges()}ngAfterViewInit(){this.items.changes.pipe(F(this.destroy$)).subscribe(()=>this.refresh()),this.srv.options$.pipe(F(this.destroy$)).subscribe(()=>this.cdr.detectChanges()),this.refresh()}toggleCollapsed(){this.srv.toggleCollapsed()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header"]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__header",!0)},inputs:{items:"items"},decls:12,vars:13,consts:[["render",""],[1,"alain-default__header-logo"],[1,"alain-default__nav-wrap"],[1,"alain-default__nav"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","alain-default__nav alain-default__nav-middle"],[4,"ngTemplateOutlet"],[3,"hidden-mobile","hidden-pc"],[1,"alain-default__header-logo-link",3,"routerLink"],[1,"alain-default__header-logo-expanded"],[1,"alain-default__header-logo-collapsed"],[1,"alain-default__nav-item","alain-default__nav-item--collapse",3,"click"],["nz-icon","",3,"nzType"],[1,"alain-default__nav","alain-default__nav-middle"]],template:function(n,r){if(n&1&&(h(0,fo,2,0,"ng-template",null,0,k),c(2,"div",1),h(3,go,1,1,"ng-container")(4,_o,3,5),p(),c(5,"div",2)(6,"ul",3),h(7,vo,3,1,"li")(8,Co,0,0,"ng-template",4),p(),h(9,xo,2,1,"div",5),c(10,"ul",3),h(11,zo,0,0,"ng-template",4),p()()),n&2){let a=S(1);s(2),ti("width",r.opt.logoFixWidth,"px"),s(),v(3,r.opt.logo?3:4),s(4),v(7,!r.opt.hideAside&&r.opt.showHeaderCollapse?7:-1),s(),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(9,Ce,r.left)),s(),v(9,r.middle.length>0?9:-1),s(2),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(11,Ce,r.right))}},dependencies:[fe,rt,E],encapsulation:2,changeDetection:0});let e=i;return e})(),pn=(()=>{let i=class i{get opt(){return this.srv.options}set options(t){this.srv.setOptions(t)}get showFetching(){return this.fetchingStrictly?this.fetching:this.isFetching}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}toggleCollapsed(){this.srv.toggleCollapsed()}constructor(t,n,r,a,m,y,M){this.msgSrv=n,this.settings=r,this.el=a,this.renderer=m,this.doc=y,this.srv=M,this.asideUser=null,this.asideBottom=null,this.nav=null,this.content=null,this.fetchingStrictly=!1,this.fetching=!1,this.isFetching=!1,t.events.pipe(F(),q(()=>!this.fetchingStrictly)).subscribe(Bt=>this.processEv(Bt)),this.srv.options$.pipe(F()).subscribe(()=>this.setClass()),this.settings.notify.pipe(F()).subscribe(()=>this.setClass())}processEv(t){if(!this.isFetching&&t instanceof di&&(this.isFetching=!0),t instanceof Tt||t instanceof ui){this.isFetching=!1;let n=this.customError===null?null:this.customError??`Could not load ${t.url} route`;n&&t instanceof Tt&&this.msgSrv.error(n,{nzDuration:1e3*3});return}(t instanceof Dt||t instanceof mi)&&this.isFetching&&setTimeout(()=>{this.isFetching=!1},100)}setClass(){let{el:t,doc:n,renderer:r,settings:a}=this,m=a.layout;Oi(t.nativeElement,r,{"alain-default":!0,"alain-default__fixed":m.fixed,"alain-default__collapsed":m.collapsed,"alain-default__hide-aside":this.opt.hideAside,"alain-default__hide-header":this.opt.hideHeader}),n.body.classList[m.colorWeak?"add":"remove"]("color-weak")}};i.\u0275fac=function(n){return new(n||i)(b(U),b(Ee),b(N),b(de),b(De),b(te),b(cn))},i.\u0275cmp=C({type:i,selectors:[["layout-default"]],contentQueries:function(n,r,a){if(n&1&&Pe(a,Nt,4),n&2){let m;G(m=Z())&&(r.headerItems=m)}},inputs:{options:"options",asideUser:"asideUser",asideBottom:"asideBottom",nav:"nav",content:"content",customError:"customError",fetchingStrictly:[L.HasDecoratorInputTransform,"fetchingStrictly","fetchingStrictly",K],fetching:[L.HasDecoratorInputTransform,"fetching","fetching",K]},exportAs:["layoutDefault"],features:[Te],ngContentSelectors:ln,decls:6,vars:4,consts:[["class","alain-default__progress-bar"],[3,"items"],["class","alain-default__aside"],[1,"alain-default__content"],[4,"ngTemplateOutlet"],[1,"alain-default__progress-bar"],[1,"alain-default__aside"],[1,"alain-default__aside-wrap"],[1,"alain-default__aside-inner"],["class","alain-default__aside-link"],[1,"alain-default__aside-link"],[1,"alain-default__aside-link-collapsed",3,"click"],["nz-icon","",3,"nzType"]],template:function(n,r){n&1&&(oe(),h(0,bo,1,0,"div",0)(1,So,1,1,"layout-default-header",1)(2,Fo,7,4,"div",2),c(3,"section",3),h(4,No,1,0,"ng-container",4),re(5),p()),n&2&&(v(0,r.showFetching?0:-1),s(),v(1,r.opt.hideHeader?-1:1),s(),v(2,r.opt.hideAside?-1:2),s(2),l("ngTemplateOutlet",r.content))},dependencies:[fe,E,Ao,Oo],encapsulation:2});let e=i;return e})(),un=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275dir=Ke({type:i,selectors:[["","layout-default-header-item-trigger",""]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__nav-item",!0)}});let e=i;return e})();var dn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at,je,I,Oe,ve,Vi,Pi]});let e=i;return e})();var Ot=()=>({standalone:!0});function Ro(e,i){if(e&1){let o=w();c(0,"input",1),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Bo(e,i){if(e&1){let o=w();c(0,"input",2),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Ho(e,i){if(e&1){let o=w();c(0,"nz-input-number",3),g("ngModelChange",function(n){x(o);let r=u();return z(r.pxVal=n)})("ngModelChange",function(n){x(o);let r=u();return z(r.pxChange(n))}),p()}if(e&2){let o=u();l("ngModel",o.pxVal)("nzMin",o.i.min)("nzMax",o.i.max)("nzStep",o.i.step||2)("nzFormatter",o.format)}}function Po(e,i){if(e&1){let o=w();c(0,"nz-switch",4),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function $o(e,i){}function jo(e,i){e&1&&h(0,$o,0,0,"ng-template",5)}function Uo(e,i){e&1&&f(0,"i",19)}var Wo=e=>({"background-color":e});function qo(e,i){if(e&1){let o=w();c(0,"span",18),g("click",function(){let r=x(o).$implicit,a=u(2);return z(a.changeColor(r.color))}),h(1,Uo,1,0,"i",19),p()}if(e&2){let o=i.$implicit,t=u(2);ii(R(4,Wo,o.color)),l("nzTooltipTitle",o.key),s(),v(1,t.color===o.color?1:-1)}}function Qo(e,i){if(e&1){let o=w();c(0,"div",4)(1,"div",5)(2,"h3",6),_(3,"\u4E3B\u9898\u8272"),p(),P(4,qo,2,6,"span",20,H),p(),f(6,"nz-divider"),c(7,"div",7)(8,"h3",6),_(9,"\u8BBE\u7F6E"),p(),c(10,"nz-tabset")(11,"nz-tab",8)(12,"div",7),f(13,"setting-drawer-item",9)(14,"setting-drawer-item",9)(15,"setting-drawer-item",9),p()(),c(16,"nz-tab",10),f(17,"setting-drawer-item",9)(18,"setting-drawer-item",9)(19,"setting-drawer-item",9)(20,"setting-drawer-item",9),p(),c(21,"nz-tab",11),f(22,"setting-drawer-item",9)(23,"setting-drawer-item",9)(24,"setting-drawer-item",9)(25,"setting-drawer-item",9),p(),c(26,"nz-tab",12),f(27,"setting-drawer-item",9)(28,"setting-drawer-item",9)(29,"setting-drawer-item",9)(30,"setting-drawer-item",9)(31,"setting-drawer-item",9)(32,"setting-drawer-item",9),p()()(),f(33,"nz-divider"),c(34,"div",7)(35,"div",13),_(36," \u56FA\u5B9A\u5934\u548C\u4FA7\u8FB9\u680F "),c(37,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.fixed=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("fixed",n.layout.fixed))}),p()(),c(38,"div",13),_(39," \u8272\u5F31\u6A21\u5F0F "),c(40,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.colorWeak=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("colorWeak",n.layout.colorWeak))}),p()()(),f(41,"nz-divider"),c(42,"button",15),g("click",function(){x(o);let n=u();return z(n.apply())}),_(43,"\u9884\u89C8"),p(),c(44,"button",16),g("click",function(){x(o);let n=u();return z(n.reset())}),_(45,"\u91CD\u7F6E"),p(),c(46,"button",16),g("click",function(){x(o);let n=u();return z(n.copyVar())}),_(47,"\u62F7\u8D1D"),p(),f(48,"nz-alert",17),p()}if(e&2){let o=u();s(4),$(o.colors),s(9),l("data",o.data["alain-default-header-hg"]),s(),l("data",o.data["alain-default-header-bg"]),s(),l("data",o.data["alain-default-header-padding"]),s(2),l("data",o.data["alain-default-aside-wd"]),s(),l("data",o.data["alain-default-aside-bg"]),s(),l("data",o.data["alain-default-aside-collapsed-wd"]),s(),l("data",o.data["alain-default-aside-nav-padding-top-bottom"]),s(2),l("data",o.data["alain-default-content-bg"]),s(),l("data",o.data["alain-default-content-heading-bg"]),s(),l("data",o.data["alain-default-content-heading-border"]),s(),l("data",o.data["alain-default-content-padding"]),s(2),l("data",o.data["form-state-visual-feedback-enabled"]),s(),l("data",o.data["preserve-white-spaces-enabled"]),s(),l("data",o.data["nz-table-img-radius"]),s(),l("data",o.data["nz-table-img-margin-right"]),s(),l("data",o.data["nz-table-img-max-width"]),s(),l("data",o.data["nz-table-img-max-height"]),s(5),l("ngModel",o.layout.fixed),s(3),l("ngModel",o.layout.colorWeak)}}var Go=e=>({"setting-drawer__handle-opened":e}),Zo=(()=>{let i=class i{constructor(){this.i={},this.pxVal=0,this.format=t=>`${t} px`}set data(t){this.i=t,t.type==="px"&&(this.pxVal=+t.value.replace("px",""))}pxChange(t){this.i.value=`${t}px`}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["setting-drawer-item"]],hostVars:2,hostBindings:function(n,r){n&2&&D("setting-drawer__body-item",!0)},inputs:{data:"data"},decls:9,vars:3,consts:[[1,"pl-sm","text-grey"],["nz-input","","type","color",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],["nz-input","",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],[3,"ngModel","nzMin","nzMax","nzStep","nzFormatter","ngModelChange"],["nzSize","small",3,"ngModel","ngModelOptions","ngModelChange"],["nzDrawerContent",""]],template:function(n,r){if(n&1&&(c(0,"span"),_(1),c(2,"span",0),_(3),p()(),h(4,Ro,1,3)(5,Bo,1,3)(6,Ho,1,5)(7,Po,1,3)(8,jo,1,0)),n&2){let a;s(),se(" ",r.i.label," "),s(2),j(r.i.tip),s(),v(4,(a=r.i.type)==="color"?4:a==="input"?5:a==="px"?6:a==="switch"?7:8)}},dependencies:[ut,ge,_e,Et,It,ft,Qi],encapsulation:2});let e=i;return e})(),At="alain-default-vars",Ko=[{key:"dust",color:"#F5222D"},{key:"volcano",color:"#FA541C"},{key:"sunset",color:"#FAAD14"},{key:"cyan",color:"#13C2C2"},{key:"green",color:"#52C41A"},{key:"daybreak",color:"#1890ff"},{key:"geekblue",color:"#2F54EB"},{key:"purple",color:"#722ED1"},{key:"black",color:"#001529"}],vt={"primary-color":{label:"\u4E3B\u989C\u8272",type:"color",default:"#1890ff"},"alain-default-header-hg":{label:"\u9AD8",type:"px",default:"64px",max:300,min:24},"alain-default-header-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-header-padding":{label:"\u9876\u90E8\u5DE6\u53F3\u5185\u8FB9\u8DDD",type:"px",default:"16px"},"alain-default-aside-wd":{label:"\u5BBD\u5EA6",type:"px",default:"200px"},"alain-default-aside-bg":{label:"\u80CC\u666F",type:"color",default:"#ffffff"},"alain-default-aside-collapsed-wd":{label:"\u6536\u7F29\u5BBD\u5EA6",type:"px",default:"64px"},"alain-default-aside-nav-padding-top-bottom":{label:"\u9879\u4E0A\u4E0B\u5185\u8FB9\u8DDD",type:"px",default:"8px",step:8},"alain-default-aside-nav-fs":{label:"\u83DC\u5355\u5B57\u53F7",type:"px",default:"14px",min:14,max:30},"alain-default-aside-collapsed-nav-fs":{label:"\u6536\u7F29\u83DC\u5355\u5B57\u53F7",type:"px",default:"24px",min:24,max:32},"alain-default-aside-nav-item-height":{label:"\u83DC\u5355\u9879\u9AD8\u5EA6",type:"px",default:"38px",min:24,max:64},"alain-default-aside-nav-text-color":{label:"\u83DC\u5355\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.65)",rgba:!0},"alain-default-aside-nav-text-hover-color":{label:"\u83DC\u5355\u6587\u672C\u60AC\u505C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-group-text-color":{label:"\u83DC\u5355\u5206\u7EC4\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.43)",rgba:!0},"alain-default-aside-nav-selected-text-color":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u6587\u672C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-selected-bg":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u80CC\u666F\u989C\u8272",type:"color",default:"#fcfcfc"},"alain-default-content-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"#f5f7fa"},"alain-default-content-heading-bg":{label:"\u6807\u9898\u80CC\u666F\u8272",type:"color",default:"#fafbfc"},"alain-default-content-heading-border":{label:"\u6807\u9898\u5E95\u90E8\u8FB9\u6846\u8272",type:"color",default:"#efe3e5"},"alain-default-content-padding":{label:"\u5185\u8FB9\u8DDD",type:"px",default:"24px",min:0,max:128,step:8},"form-state-visual-feedback-enabled":{label:"\u5F00\u542F\u8868\u5355\u5143\u7D20\u7684\u89C6\u89C9\u53CD\u9988",type:"switch",default:!0},"preserve-white-spaces-enabled":{label:"\u5F00\u542F preserveWhitespaces",type:"switch",default:!0},"nz-table-img-radius":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u5706\u89D2",type:"px",default:"4px",min:0,max:128},"nz-table-img-margin-right":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u53F3\u5916\u8FB9\u8DDD",type:"px",default:"4px",min:0,max:128},"nz-table-img-max-width":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u5BBD\u5EA6",type:"px",default:"32px",min:8,max:128},"nz-table-img-max-height":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u9AD8\u5EA6",type:"px",default:"32px",min:8,max:128}},hn=(()=>{let i=class i{get layout(){return this.settingSrv.layout}constructor(){this.cdr=d(V),this.msg=d(Ee),this.settingSrv=d(N),this.lazy=d(hi),this.ngZone=d(ne),this.doc=d(te),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.autoApplyColor=!0,this.compilingText="Compiling...",this.devTips="When the color can't be switched, you need to run it once: npm run color-less",this.lessJs="https://cdn.jsdelivr.net/npm/less",this.loadedLess=!1,this.dir="ltr",this.isDev=tt(),this.collapse=!1,this.data={},this.colors=Ko,this.color=this.cachedData["@primary-color"]||this.DEFAULT_PRIMARY,this.resetData(this.cachedData,!1)}get cachedData(){return this.settingSrv.layout[At]||{}}get DEFAULT_PRIMARY(){return vt["primary-color"].default}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.autoApplyColor&&this.color!==this.DEFAULT_PRIMARY&&(this.changeColor(this.color),this.runLess())}loadLess(){return Ht(this,null,function*(){return this.loadedLess?Promise.resolve():this.lazy.loadStyle("./assets/color.less",{rel:"stylesheet/less"}).then(()=>{let t=this.doc.createElement("script");t.innerHTML=`
+import{B as Me,C as je,Ha as It,Ia as Yi,N as Ue,Na as Ji,O as ke,Oa as Xi,P as Fe,Pa as en,Q as $i,R as mt,S as Ne,U as Ae,V as ve,Y as ji,Z as Ui,_ as Wi,a as Li,ab as tn,bb as nn,c as Vi,cb as _t,d as Ee,db as Oe,f as Ie,g as Ri,h as ut,j as ge,ma as ft,mb as on,n as _e,na as ht,oa as qi,pa as gt,qa as Qi,ra as Gi,u as dt,va as Zi,w as Bi,wa as Ki,x as Hi,y as Pi}from"./chunk-WD6SV3WH.js";import{a as A}from"./chunk-4FFPI7ZP.js";import{$b as te,$c as vi,A as Pt,Aa as Ye,Ab as ae,Ad as Ci,Bb as G,Bc as Dt,C as $t,Cb as Z,Cc as ui,D as xt,Da as Jt,Db as S,Dc as Tt,Ea as Xt,Eb as _,Ec as di,F as zt,Fa as Se,Fb as j,Fc as mi,Fe as E,Ga as Je,Gb as se,Ge as I,Ha as de,Hc as ot,He as lt,I as bt,Ib as ai,Ie as bi,If as Ai,J as q,Ja as De,Jb as T,Jc as U,Ka as s,Kb as Xe,Kc as rt,Ke as Si,L as jt,La as b,Lb as R,Le as Di,Lf as Oi,Ma as V,Me as Ti,N as pe,Na as me,Ne as wi,Oa as B,P as Ut,Pa as ne,Q as He,Qc as at,Ra as Te,S as Wt,Sa as ei,Sb as k,Sc as fi,T as qt,Ta as h,Ua as Q,Ub as et,Va as l,Vc as hi,Wa as ti,Wc as gi,Xa as D,Xb as tt,Xc as F,Ya as ii,Yb as K,Yc as _i,Zb as si,_a as St,_d as yi,a as yt,aa as ue,ba as be,bb as v,bc as we,be as xi,ca as Ge,cb as H,cc as it,cd as le,ce as wt,eb as P,ee as zi,fb as $,ga as Qt,gb as c,gf as Ei,ha as Ze,hb as p,hc as li,ia as J,ib as f,ic as fe,if as ct,j as Ht,ja as Gt,jb as ni,jf as Et,kb as oi,kf as Ii,l as qe,la as d,lb as ee,lf as Mi,ma as L,mb as w,na as C,nc as he,o as Qe,oa as X,p as xe,pa as Ke,pf as ki,qb as g,qf as pt,ra as Zt,rf as N,sa as x,sb as u,sc as ci,ta as z,tb as oe,tc as $e,tf as Fi,u as Y,ua as Kt,ub as re,uc as nt,va as Yt,w as ce,x as ze,xd as st,yb as ri,yc as pi,yf as Ni,zb as Pe}from"./chunk-VDRVUQCF.js";var rn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at]});let e=i;return e})();function On(e,i){if(e&1){let o=w();c(0,"li",7),g("click",function(){let r=x(o).$implicit,a=u();return z(a.onThemeChange(r.key))}),_(1),p()}if(e&2){let o=i.$implicit;s(),j(o.text)}}var Ln=new Gt("ALAIN_THEME_BTN_KEYS"),an=(()=>{let i=class i{constructor(){this.doc=d(te),this.platform=d(vi),this.renderer=d(De),this.configSrv=d(gi),this.directionality=d(le,{optional:!0}),this.cdr=d(V),this.destroy$=d(me),this.theme="default",this.isDev=tt(),this.types=[{key:"default",text:"Default Theme"},{key:"dark",text:"Dark Theme"},{key:"compact",text:"Compact Theme"}],this.devTips="When the dark.css file can't be found, you need to run it once: npm run theme",this.deployUrl="",this.themeChange=new B,this.dir="ltr",this.key=d(Ln,{optional:!0})??"site-theme"}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.initTheme()}initTheme(){this.platform.isBrowser&&(this.theme=localStorage.getItem(this.key)||"default",this.updateChartTheme(),this.onThemeChange(this.theme))}updateChartTheme(){this.configSrv.set("chart",{theme:this.theme==="dark"?"dark":""})}onThemeChange(t){if(!this.platform.isBrowser)return;this.theme=t,this.themeChange.emit(t),this.renderer.setAttribute(this.doc.body,"data-theme",t);let n=this.doc.getElementById(this.key);if(n&&n.remove(),localStorage.removeItem(this.key),t!=="default"){let r=this.doc.createElement("link");r.type="text/css",r.rel="stylesheet",r.id=this.key,r.href=`${this.deployUrl}assets/style.${t}.css`,localStorage.setItem(this.key,t),this.doc.body.append(r)}this.updateChartTheme()}ngOnDestroy(){let t=this.doc.getElementById(this.key);t!=null&&this.doc.body.removeChild(t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["theme-btn"]],hostVars:4,hostBindings:function(n,r){n&2&&D("theme-btn",!0)("theme-btn-rtl",r.dir==="rtl")},inputs:{types:"types",devTips:"devTips",deployUrl:"deployUrl"},outputs:{themeChange:"themeChange"},standalone:!0,features:[T],decls:10,vars:2,consts:[["nz-dropdown","","nzPlacement","topCenter",1,"ant-avatar","ant-avatar-circle","ant-avatar-icon",3,"nzDropdownMenu"],["nz-tooltip","","role","img","width","21","height","21","viewBox","0 0 21 21","fill","currentColor",1,"anticon",3,"nzTooltipTitle"],["fill-rule","evenodd"],["fill-rule","nonzero"],["d","M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click"],["nz-menu-item",""]],template:function(n,r){if(n&1&&(c(0,"div",0),Kt(),c(1,"svg",1)(2,"g",2)(3,"g",3),f(4,"path",4),p()()(),Yt(),c(5,"nz-dropdown-menu",null,5)(7,"ul",6),P(8,On,2,1,"li",8,H),p()()()),n&2){let a=S(6);l("nzDropdownMenu",r.types.length>0?a:null),s(),l("nzTooltipTitle",r.isDev?r.devTips:null),s(7),$(r.types)}},dependencies:[Ne,Ae,Fe,ke,Me],encapsulation:2,changeDetection:0});let e=i;return e})();var Xr=(()=>{let i=class i{constructor(){this.tokenService=d(A),this.links=[{title:"\u5E2E\u52A9",href:""},{title:"\u9690\u79C1",href:""},{title:"\u6761\u6B3E",href:""}]}ngOnInit(){this.tokenService.clear()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-passport"]],standalone:!0,features:[T],decls:7,vars:0,consts:[[1,"container"],[1,"wrap"],[1,"top"],[1,"desc"],[1,"footer"]],template:function(n,r){n&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),f(3,"div",3),p(),f(4,"router-outlet"),c(5,"div",4),_(6," \u4E0A\u6D77\u53D1\u7535\u8BBE\u5907\u6210\u5957\u8BBE\u8BA1\u7814\u7A76\u9662\u6709\u9650\u8D23\u4EFB\u516C\u53F8 "),p()()())},dependencies:[ot,rn,I],styles:["[_nghost-%COMP%] .container{display:flex;flex-direction:column;min-height:100%;background:#f0f2f5}[_nghost-%COMP%] .langs{width:100%;height:40px;line-height:44px;text-align:right}[_nghost-%COMP%] .langs .anticon{cursor:pointer;margin-top:24px;margin-right:24px;font-size:14px;vertical-align:top}[_nghost-%COMP%] .wrap{flex:1;padding:32px 0}[_nghost-%COMP%] .ant-form-item{display:flex;justify-content:space-between;margin-bottom:24px}[_nghost-%COMP%] .top{margin-top:10rem;text-align:center}[_nghost-%COMP%] .footer{position:fixed;bottom:.8rem;left:50%;transform:translate(-50%,-50%);color:#f0f2f5}[_nghost-%COMP%] .desc{margin-top:12px;margin-bottom:40px;font-size:14px;color:#00000073}[_nghost-%COMP%] .container{background-image:url(/assets/bg.jpg);background-repeat:no-repeat;background-size:cover}@media (min-width: 768px){[_nghost-%COMP%] .wrap{padding:32px 0 24px}}[data-theme=dark] [_nghost-%COMP%] .container{background:#141414}[data-theme=dark] [_nghost-%COMP%] .title{color:#ffffffd9}[data-theme=dark] [_nghost-%COMP%] .desc{color:#ffffff73}@media (min-width: 768px){[data-theme=dark] [_nghost-%COMP%] .container{background-image:none}}[data-theme=compact] [_nghost-%COMP%] .ant-form-item{margin-bottom:16px}"]});let e=i;return e})();var Rn=["host"];function Bn(e,i){e&1&&re(0)}var ln=["*"];function Hn(e,i){if(e&1&&f(0,"i",3),e&2){let o=u(2).$implicit;l("nzType",o.value)("nzTheme",o.theme)("nzSpin",o.spin)("nzTwotoneColor",o.twoToneColor)("nzIconfont",o.iconfont)("nzRotate",o.rotate)}}function Pn(e,i){if(e&1&&f(0,"i",4),e&2){let o=u(2).$implicit;l("nzIconfont",o.iconfont)}}function $n(e,i){if(e&1&&f(0,"img",5),e&2){let o=u(2).$implicit;l("src",o.value,Je)}}function jn(e,i){if(e&1&&f(0,"span",6),e&2){let o=u(2).$implicit;l("innerHTML",o.value,Se)}}function Un(e,i){if(e&1&&f(0,"i"),e&2){let o=u(2).$implicit;St("sidebar-nav__item-icon ",o.value,"")}}function Wn(e,i){if(e&1&&h(0,Hn,1,6)(1,Pn,1,1)(2,$n,1,1)(3,jn,1,1)(4,Un,1,3),e&2){let o=u().$implicit,t;v(0,(t=o.type)==="icon"?0:t==="iconfont"?1:t==="img"?2:t==="svg"?3:4)}}function qn(e,i){if(e&1&&h(0,Wn,5,1),e&2){let o=i.$implicit;v(0,o?0:-1)}}function Qn(e,i){}var Ce=e=>({$implicit:e});function Gn(e,i){if(e&1&&(c(0,"span",15),h(1,Qn,0,0,"ng-template",16),p()),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("nzTooltipTitle",o.text),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.icon))}}function Zn(e,i){}function Kn(e,i){if(e&1&&h(0,Zn,0,0,"ng-template",16),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(2,Ce,o.icon))}}function Yn(e,i){if(e&1&&h(0,Gn,2,5,"span",15)(1,Kn,1,4),e&2){let o=u(5);v(0,o.collapsed?0:1)}}var Jn=e=>({"sidebar-nav__item-disabled":e});function Xn(e,i){if(e&1){let o=w();c(0,"a",13),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.to(n))})("mouseenter",function(){x(o);let n=u(4);return z(n.closeSubMenu())}),h(1,Yn,2,1),f(2,"span",14),p()}if(e&2){let o=u(2).$implicit;l("ngClass",R(5,Jn,o.disabled)),Q("data-id",o._id),s(),v(1,o._needIcon?1:-1),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function eo(e,i){}function to(e,i){if(e&1){let o=w();c(0,"a",17),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.toggleOpen(n))})("mouseenter",function(n){x(o);let r=u(2).$implicit,a=u(2);return z(a.showSubMenu(n,r))}),h(1,eo,0,0,"ng-template",16),f(2,"span",14)(3,"i",18),p()}if(e&2){let o=u(2).$implicit;u(2);let t=S(1);s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(4,Ce,o.icon)),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function io(e,i){if(e&1&&f(0,"nz-badge",11),e&2){let o=u(2).$implicit;l("nzCount",o.badge)("nzDot",o.badgeDot)("nzOverflowCount",9)}}function no(e,i){}function oo(e,i){if(e&1&&(c(0,"ul"),h(1,no,0,0,"ng-template",16),p()),e&2){let o=u(2).$implicit;u(2);let t=S(3);St("sidebar-nav sidebar-nav__sub sidebar-nav__depth",o._depth,""),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(5,Ce,o.children))}}function ro(e,i){if(e&1&&(c(0,"li",8),h(1,Xn,3,7,"a",9)(2,to,4,6,"a",10)(3,io,1,3,"nz-badge",11)(4,oo,2,7,"ul",12),p()),e&2){let o=u().$implicit;D("sidebar-nav__selected",o._selected)("sidebar-nav__open",o.open),s(),v(1,o.children.length===0?1:-1),s(),v(2,o.children.length>0?2:-1),s(),v(3,o.badge?3:-1),s(),v(4,o.children.length>0?4:-1)}}function ao(e,i){if(e&1&&h(0,ro,5,8,"li",7),e&2){let o=i.$implicit;v(0,o._hidden!==!0?0:-1)}}function so(e,i){if(e&1&&P(0,ao,1,1,null,null,H),e&2){let o=i.$implicit;$(o)}}function lo(e,i){if(e&1&&(c(0,"li",20),f(1,"span",21),p()),e&2){let o=u().$implicit;s(),l("innerHTML",o._text,Se)}}function co(e,i){}function po(e,i){if(e&1&&h(0,lo,2,1,"li",19)(1,co,0,0,"ng-template",16),e&2){let o=i.$implicit;u();let t=S(3);v(0,o.group?0:-1),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.children))}}function uo(e,i){e&1&&ee(0)}function mo(e,i){if(e&1&&(c(0,"li"),h(1,uo,1,0,"ng-container",6),p()),e&2){let o=i.$implicit;D("hidden-mobile",o.hidden==="mobile")("hidden-pc",o.hidden==="pc"),s(),l("ngTemplateOutlet",o.host)}}function fo(e,i){if(e&1&&P(0,mo,2,5,"li",7,H),e&2){let o=i.$implicit;$(o)}}function ho(e,i){e&1&&ee(0)}function go(e,i){if(e&1&&h(0,ho,1,0,"ng-container",6),e&2){let o=u();l("ngTemplateOutlet",o.opt.logo)}}function _o(e,i){if(e&1&&(c(0,"a",8),f(1,"img",9)(2,"img",10),p()),e&2){let o=u();l("routerLink",o.opt.logoLink),s(),Q("src",o.opt.logoExpanded,Je)("alt",o.app.name),s(),Q("src",o.opt.logoCollapsed,Je)("alt",o.app.name)}}function vo(e,i){if(e&1){let o=w();c(0,"li")(1,"div",11),g("click",function(){x(o);let n=u();return z(n.toggleCollapsed())}),f(2,"span",12),p()()}if(e&2){let o=u();s(2),l("nzType",o.collapsedIcon)}}function Co(e,i){}function yo(e,i){e&1&&ee(0)}function xo(e,i){if(e&1&&(c(0,"div",13),h(1,yo,1,0,"ng-container",6),p()),e&2){let o=u();s(),l("ngTemplateOutlet",o.middle[0].host)}}function zo(e,i){}function bo(e,i){e&1&&f(0,"div",5)}function So(e,i){if(e&1&&f(0,"layout-default-header",1),e&2){let o=u();l("items",o.headerItems)}}function Do(e,i){e&1&&ee(0)}function To(e,i){e&1&&ee(0)}function wo(e,i){e&1&&f(0,"layout-default-nav")}function Eo(e,i){e&1&&ee(0)}function Io(e,i){if(e&1&&h(0,Eo,1,0,"ng-container",4),e&2){let o=u(3);l("ngTemplateOutlet",o.asideBottom)}}function Mo(e,i){if(e&1){let o=w();c(0,"div",11),g("click",function(){x(o);let n=u(3);return z(n.toggleCollapsed())}),f(1,"span",12),p()}if(e&2){let o=u(3);s(),l("nzType",o.collapsedIcon)}}function ko(e,i){if(e&1&&(c(0,"div",10),h(1,Io,1,1,"ng-container")(2,Mo,2,1),p()),e&2){let o=u(2);s(),v(1,o.asideBottom?1:2)}}function Fo(e,i){if(e&1&&(c(0,"div",6)(1,"div",7)(2,"div",8),h(3,Do,1,0,"ng-container",4)(4,To,1,0,"ng-container",4)(5,wo,1,0,"layout-default-nav"),p(),h(6,ko,3,1,"div",9),p()()),e&2){let o=u();s(3),l("ngTemplateOutlet",o.asideUser),s(),l("ngTemplateOutlet",o.nav),s(),v(5,o.nav?-1:5),s(),v(6,o.opt.showSiderCollapse?6:-1)}}function No(e,i){e&1&&ee(0)}var Nt=(()=>{let i=class i{constructor(){this.hidden="none",this.direction="right"}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header-item"]],viewQuery:function(n,r){if(n&1&&ae(Rn,7),n&2){let a;G(a=Z())&&(r.host=a.first)}},inputs:{hidden:"hidden",direction:"direction"},ngContentSelectors:ln,decls:2,vars:0,consts:[["host",""]],template:function(n,r){n&1&&(oe(),h(0,Bn,1,0,"ng-template",null,0,k))},encapsulation:2});let e=i;return e})(),Mt={logoExpanded:"./assets/logo-full.svg",logoCollapsed:"./assets/logo.svg",logoLink:"/",showHeaderCollapse:!0,showSiderCollapse:!1,hideAside:!1,hideHeader:!1},cn=(()=>{let i=class i{constructor(){this.settings=d(N),this._options$=new xe(Mt),this._options=Mt}get options(){return this._options}get options$(){return this._options$.asObservable()}get collapsedIcon(){let t=this.settings.layout.collapsed,n=t?"unfold":"fold";return this.settings.layout.direction==="rtl"&&(n=t?"fold":"unfold"),`menu-${n}`}notify(){this._options$.next(this._options)}setOptions(t){this._options=yt(yt({},Mt),t),this.notify()}toggleCollapsed(t){this.settings.setLayout("collapsed",t??!this.settings.layout.collapsed),this.notify()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=Ze({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),kt="sidebar-nav__floating-show",Ft="sidebar-nav__floating",Ao=(()=>{let i=class i{constructor(){this.doc=d(te),this.win=d(Bi),this.router=d(U),this.render=d(De),this.menuSrv=d(pt),this.settings=d(N),this.cdr=d(V),this.ngZone=d(ne),this.sanitizer=d(pi),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.dir="ltr",this.list=[],this.disabledAcl=!1,this.autoCloseUnderPad=!0,this.recursivePath=!0,this.hideEmptyChildren=!0,this.maxLevelIcon=3,this.select=new B}set openStrictly(t){this.menuSrv.openStrictly=t}get collapsed(){return this.settings.layout.collapsed}getLinkNode(t){return t=t.nodeName==="A"?t:t.parentNode,t.nodeName!=="A"?null:t}floatingClickHandle(t){t.stopPropagation();let n=this.getLinkNode(t.target);if(n==null)return!1;let r=+n.dataset.id;if(isNaN(r))return!1;let a;return this.menuSrv.visit(this.list,m=>{!a&&m._id===r&&(a=m)}),this.to(a),this.hideAll(),t.preventDefault(),!1}clearFloating(){this.floatingEl&&(this.floatingEl.removeEventListener("click",this.floatingClickHandle.bind(this)),this.floatingEl.hasOwnProperty("remove")?this.floatingEl.remove():this.floatingEl.parentNode&&this.floatingEl.parentNode.removeChild(this.floatingEl))}genFloating(){this.clearFloating(),this.floatingEl=this.render.createElement("div"),this.floatingEl.classList.add(`${Ft}-container`),this.floatingEl.addEventListener("click",this.floatingClickHandle.bind(this),!1),this.bodyEl.appendChild(this.floatingEl)}genSubNode(t,n){let r=`_sidebar-nav-${n._id}`,m=(n.badge?t.nextElementSibling.nextElementSibling:t.nextElementSibling).cloneNode(!0);return m.id=r,m.classList.add(Ft),m.addEventListener("mouseleave",()=>{m.classList.remove(kt)},!1),this.floatingEl.appendChild(m),m}hideAll(){let t=this.floatingEl.querySelectorAll(`.${Ft}`);for(let n=0;nthis.router.navigateByUrl(t.link))}}toggleOpen(t){this.menuSrv.toggleOpen(t)}_click(){this.isPad&&this.collapsed&&(this.openAside(!1),this.hideAll())}closeSubMenu(){this.collapsed&&this.hideAll()}openByUrl(t){let{menuSrv:n,recursivePath:r}=this;this.menuSrv.open(n.find({url:t,recursive:r}))}ngOnInit(){let{doc:t,router:n,menuSrv:r,settings:a,cdr:m}=this;this.bodyEl=t.querySelector("body"),r.change.pipe(F(this.destroy$)).subscribe(y=>{r.visit(y,(M,Bt,An)=>{M._text=this.sanitizer.bypassSecurityTrustHtml(M.text),M._needIcon=An<=this.maxLevelIcon&&!!M.icon,M._aclResult||(this.disabledAcl?M.disabled=!0:M._hidden=!0);let Be=M.icon;Be&&Be.type==="svg"&&typeof Be.value=="string"&&(Be.value=this.sanitizer.bypassSecurityTrustHtml(Be.value))}),this.hideEmptyChildren&&this.fixHide(y),this.list=y.filter(M=>M._hidden!==!0),m.detectChanges()}),n.events.pipe(F(this.destroy$)).subscribe(y=>{y instanceof Dt&&(this.openByUrl(y.urlAfterRedirects),this.underPad(),this.cdr.detectChanges())}),a.notify.pipe(F(this.destroy$),q(y=>y.type==="layout"&&y.name==="collapsed")).subscribe(()=>this.clearFloating()),this.underPad(),this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(y=>{this.dir=y,this.cdr.detectChanges()}),this.openByUrl(n.url),this.ngZone.runOutsideAngular(()=>this.genFloating())}fixHide(t){let n=r=>{for(let a of r)a.children&&a.children.length>0&&(n(a.children),a._hidden||(a._hidden=a.children.every(m=>m._hidden)))};n(t)}ngOnDestroy(){this.clearFloating()}get isPad(){return this.doc.defaultView.innerWidth<768}underPad(){this.autoCloseUnderPad&&this.isPad&&!this.collapsed&&setTimeout(()=>this.openAside(!0))}openAside(t){this.settings.setLayout("collapsed",t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-nav"]],hostVars:2,hostBindings:function(n,r){n&1&&g("click",function(){return r._click()})("click",function(){return r.closeSubMenu()},!1,Xt),n&2&&D("d-block",!0)},inputs:{disabledAcl:[L.HasDecoratorInputTransform,"disabledAcl","disabledAcl",K],autoCloseUnderPad:[L.HasDecoratorInputTransform,"autoCloseUnderPad","autoCloseUnderPad",K],recursivePath:[L.HasDecoratorInputTransform,"recursivePath","recursivePath",K],hideEmptyChildren:[L.HasDecoratorInputTransform,"hideEmptyChildren","hideEmptyChildren",K],openStrictly:[L.HasDecoratorInputTransform,"openStrictly","openStrictly",K],maxLevelIcon:[L.HasDecoratorInputTransform,"maxLevelIcon","maxLevelIcon",si]},outputs:{select:"select"},features:[Te],decls:7,vars:0,consts:[["icon",""],["tree",""],[1,"sidebar-nav"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzType","nzTheme","nzSpin","nzTwotoneColor","nzIconfont","nzRotate"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzIconfont"],[1,"sidebar-nav__item-icon","sidebar-nav__item-img",3,"src"],[1,"sidebar-nav__item-icon","sidebar-nav__item-svg",3,"innerHTML"],["class","sidebar-nav__item",3,"sidebar-nav__selected","sidebar-nav__open"],[1,"sidebar-nav__item"],["class","sidebar-nav__item-link",3,"ngClass"],["class","sidebar-nav__item-link"],["nzStandalone","",3,"nzCount","nzDot","nzOverflowCount"],[3,"class"],[1,"sidebar-nav__item-link",3,"ngClass","click","mouseenter"],[1,"sidebar-nav__item-text",3,"innerHTML"],["nz-tooltip","","nzTooltipPlacement","right",3,"nzTooltipTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"sidebar-nav__item-link",3,"click","mouseenter"],[1,"sidebar-nav__sub-arrow"],["class","sidebar-nav__item sidebar-nav__group-title"],[1,"sidebar-nav__item","sidebar-nav__group-title"],[3,"innerHTML"]],template:function(n,r){n&1&&(h(0,qn,1,1,"ng-template",null,0,k)(2,so,2,0,"ng-template",null,1,k),c(4,"ul",2),P(5,po,2,5,null,16,H),p()),n&2&&(s(5),$(r.list))},dependencies:[we,fe,Me,E,Hi],encapsulation:2,changeDetection:0});let e=i;return Y([Ue()],e.prototype,"showSubMenu",null),e})(),Oo=(()=>{let i=class i{constructor(){this.settings=d(N),this.srv=d(cn),this.cdr=d(V),this.destroy$=d(me),this.left=[],this.middle=[],this.right=[]}get opt(){return this.srv.options}get app(){return this.settings.app}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}refresh(){let t=this.items.toArray();this.left=t.filter(n=>n.direction==="left"),this.middle=t.filter(n=>n.direction==="middle"),this.right=t.filter(n=>n.direction==="right"),this.cdr.detectChanges()}ngAfterViewInit(){this.items.changes.pipe(F(this.destroy$)).subscribe(()=>this.refresh()),this.srv.options$.pipe(F(this.destroy$)).subscribe(()=>this.cdr.detectChanges()),this.refresh()}toggleCollapsed(){this.srv.toggleCollapsed()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header"]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__header",!0)},inputs:{items:"items"},decls:12,vars:13,consts:[["render",""],[1,"alain-default__header-logo"],[1,"alain-default__nav-wrap"],[1,"alain-default__nav"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","alain-default__nav alain-default__nav-middle"],[4,"ngTemplateOutlet"],[3,"hidden-mobile","hidden-pc"],[1,"alain-default__header-logo-link",3,"routerLink"],[1,"alain-default__header-logo-expanded"],[1,"alain-default__header-logo-collapsed"],[1,"alain-default__nav-item","alain-default__nav-item--collapse",3,"click"],["nz-icon","",3,"nzType"],[1,"alain-default__nav","alain-default__nav-middle"]],template:function(n,r){if(n&1&&(h(0,fo,2,0,"ng-template",null,0,k),c(2,"div",1),h(3,go,1,1,"ng-container")(4,_o,3,5),p(),c(5,"div",2)(6,"ul",3),h(7,vo,3,1,"li")(8,Co,0,0,"ng-template",4),p(),h(9,xo,2,1,"div",5),c(10,"ul",3),h(11,zo,0,0,"ng-template",4),p()()),n&2){let a=S(1);s(2),ti("width",r.opt.logoFixWidth,"px"),s(),v(3,r.opt.logo?3:4),s(4),v(7,!r.opt.hideAside&&r.opt.showHeaderCollapse?7:-1),s(),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(9,Ce,r.left)),s(),v(9,r.middle.length>0?9:-1),s(2),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(11,Ce,r.right))}},dependencies:[fe,rt,E],encapsulation:2,changeDetection:0});let e=i;return e})(),pn=(()=>{let i=class i{get opt(){return this.srv.options}set options(t){this.srv.setOptions(t)}get showFetching(){return this.fetchingStrictly?this.fetching:this.isFetching}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}toggleCollapsed(){this.srv.toggleCollapsed()}constructor(t,n,r,a,m,y,M){this.msgSrv=n,this.settings=r,this.el=a,this.renderer=m,this.doc=y,this.srv=M,this.asideUser=null,this.asideBottom=null,this.nav=null,this.content=null,this.fetchingStrictly=!1,this.fetching=!1,this.isFetching=!1,t.events.pipe(F(),q(()=>!this.fetchingStrictly)).subscribe(Bt=>this.processEv(Bt)),this.srv.options$.pipe(F()).subscribe(()=>this.setClass()),this.settings.notify.pipe(F()).subscribe(()=>this.setClass())}processEv(t){if(!this.isFetching&&t instanceof di&&(this.isFetching=!0),t instanceof Tt||t instanceof ui){this.isFetching=!1;let n=this.customError===null?null:this.customError??`Could not load ${t.url} route`;n&&t instanceof Tt&&this.msgSrv.error(n,{nzDuration:1e3*3});return}(t instanceof Dt||t instanceof mi)&&this.isFetching&&setTimeout(()=>{this.isFetching=!1},100)}setClass(){let{el:t,doc:n,renderer:r,settings:a}=this,m=a.layout;Oi(t.nativeElement,r,{"alain-default":!0,"alain-default__fixed":m.fixed,"alain-default__collapsed":m.collapsed,"alain-default__hide-aside":this.opt.hideAside,"alain-default__hide-header":this.opt.hideHeader}),n.body.classList[m.colorWeak?"add":"remove"]("color-weak")}};i.\u0275fac=function(n){return new(n||i)(b(U),b(Ee),b(N),b(de),b(De),b(te),b(cn))},i.\u0275cmp=C({type:i,selectors:[["layout-default"]],contentQueries:function(n,r,a){if(n&1&&Pe(a,Nt,4),n&2){let m;G(m=Z())&&(r.headerItems=m)}},inputs:{options:"options",asideUser:"asideUser",asideBottom:"asideBottom",nav:"nav",content:"content",customError:"customError",fetchingStrictly:[L.HasDecoratorInputTransform,"fetchingStrictly","fetchingStrictly",K],fetching:[L.HasDecoratorInputTransform,"fetching","fetching",K]},exportAs:["layoutDefault"],features:[Te],ngContentSelectors:ln,decls:6,vars:4,consts:[["class","alain-default__progress-bar"],[3,"items"],["class","alain-default__aside"],[1,"alain-default__content"],[4,"ngTemplateOutlet"],[1,"alain-default__progress-bar"],[1,"alain-default__aside"],[1,"alain-default__aside-wrap"],[1,"alain-default__aside-inner"],["class","alain-default__aside-link"],[1,"alain-default__aside-link"],[1,"alain-default__aside-link-collapsed",3,"click"],["nz-icon","",3,"nzType"]],template:function(n,r){n&1&&(oe(),h(0,bo,1,0,"div",0)(1,So,1,1,"layout-default-header",1)(2,Fo,7,4,"div",2),c(3,"section",3),h(4,No,1,0,"ng-container",4),re(5),p()),n&2&&(v(0,r.showFetching?0:-1),s(),v(1,r.opt.hideHeader?-1:1),s(),v(2,r.opt.hideAside?-1:2),s(2),l("ngTemplateOutlet",r.content))},dependencies:[fe,E,Ao,Oo],encapsulation:2});let e=i;return e})(),un=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275dir=Ke({type:i,selectors:[["","layout-default-header-item-trigger",""]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__nav-item",!0)}});let e=i;return e})();var dn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at,je,I,Oe,ve,Vi,Pi]});let e=i;return e})();var Ot=()=>({standalone:!0});function Ro(e,i){if(e&1){let o=w();c(0,"input",1),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Bo(e,i){if(e&1){let o=w();c(0,"input",2),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Ho(e,i){if(e&1){let o=w();c(0,"nz-input-number",3),g("ngModelChange",function(n){x(o);let r=u();return z(r.pxVal=n)})("ngModelChange",function(n){x(o);let r=u();return z(r.pxChange(n))}),p()}if(e&2){let o=u();l("ngModel",o.pxVal)("nzMin",o.i.min)("nzMax",o.i.max)("nzStep",o.i.step||2)("nzFormatter",o.format)}}function Po(e,i){if(e&1){let o=w();c(0,"nz-switch",4),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function $o(e,i){}function jo(e,i){e&1&&h(0,$o,0,0,"ng-template",5)}function Uo(e,i){e&1&&f(0,"i",19)}var Wo=e=>({"background-color":e});function qo(e,i){if(e&1){let o=w();c(0,"span",18),g("click",function(){let r=x(o).$implicit,a=u(2);return z(a.changeColor(r.color))}),h(1,Uo,1,0,"i",19),p()}if(e&2){let o=i.$implicit,t=u(2);ii(R(4,Wo,o.color)),l("nzTooltipTitle",o.key),s(),v(1,t.color===o.color?1:-1)}}function Qo(e,i){if(e&1){let o=w();c(0,"div",4)(1,"div",5)(2,"h3",6),_(3,"\u4E3B\u9898\u8272"),p(),P(4,qo,2,6,"span",20,H),p(),f(6,"nz-divider"),c(7,"div",7)(8,"h3",6),_(9,"\u8BBE\u7F6E"),p(),c(10,"nz-tabset")(11,"nz-tab",8)(12,"div",7),f(13,"setting-drawer-item",9)(14,"setting-drawer-item",9)(15,"setting-drawer-item",9),p()(),c(16,"nz-tab",10),f(17,"setting-drawer-item",9)(18,"setting-drawer-item",9)(19,"setting-drawer-item",9)(20,"setting-drawer-item",9),p(),c(21,"nz-tab",11),f(22,"setting-drawer-item",9)(23,"setting-drawer-item",9)(24,"setting-drawer-item",9)(25,"setting-drawer-item",9),p(),c(26,"nz-tab",12),f(27,"setting-drawer-item",9)(28,"setting-drawer-item",9)(29,"setting-drawer-item",9)(30,"setting-drawer-item",9)(31,"setting-drawer-item",9)(32,"setting-drawer-item",9),p()()(),f(33,"nz-divider"),c(34,"div",7)(35,"div",13),_(36," \u56FA\u5B9A\u5934\u548C\u4FA7\u8FB9\u680F "),c(37,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.fixed=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("fixed",n.layout.fixed))}),p()(),c(38,"div",13),_(39," \u8272\u5F31\u6A21\u5F0F "),c(40,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.colorWeak=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("colorWeak",n.layout.colorWeak))}),p()()(),f(41,"nz-divider"),c(42,"button",15),g("click",function(){x(o);let n=u();return z(n.apply())}),_(43,"\u9884\u89C8"),p(),c(44,"button",16),g("click",function(){x(o);let n=u();return z(n.reset())}),_(45,"\u91CD\u7F6E"),p(),c(46,"button",16),g("click",function(){x(o);let n=u();return z(n.copyVar())}),_(47,"\u62F7\u8D1D"),p(),f(48,"nz-alert",17),p()}if(e&2){let o=u();s(4),$(o.colors),s(9),l("data",o.data["alain-default-header-hg"]),s(),l("data",o.data["alain-default-header-bg"]),s(),l("data",o.data["alain-default-header-padding"]),s(2),l("data",o.data["alain-default-aside-wd"]),s(),l("data",o.data["alain-default-aside-bg"]),s(),l("data",o.data["alain-default-aside-collapsed-wd"]),s(),l("data",o.data["alain-default-aside-nav-padding-top-bottom"]),s(2),l("data",o.data["alain-default-content-bg"]),s(),l("data",o.data["alain-default-content-heading-bg"]),s(),l("data",o.data["alain-default-content-heading-border"]),s(),l("data",o.data["alain-default-content-padding"]),s(2),l("data",o.data["form-state-visual-feedback-enabled"]),s(),l("data",o.data["preserve-white-spaces-enabled"]),s(),l("data",o.data["nz-table-img-radius"]),s(),l("data",o.data["nz-table-img-margin-right"]),s(),l("data",o.data["nz-table-img-max-width"]),s(),l("data",o.data["nz-table-img-max-height"]),s(5),l("ngModel",o.layout.fixed),s(3),l("ngModel",o.layout.colorWeak)}}var Go=e=>({"setting-drawer__handle-opened":e}),Zo=(()=>{let i=class i{constructor(){this.i={},this.pxVal=0,this.format=t=>`${t} px`}set data(t){this.i=t,t.type==="px"&&(this.pxVal=+t.value.replace("px",""))}pxChange(t){this.i.value=`${t}px`}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["setting-drawer-item"]],hostVars:2,hostBindings:function(n,r){n&2&&D("setting-drawer__body-item",!0)},inputs:{data:"data"},decls:9,vars:3,consts:[[1,"pl-sm","text-grey"],["nz-input","","type","color",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],["nz-input","",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],[3,"ngModel","nzMin","nzMax","nzStep","nzFormatter","ngModelChange"],["nzSize","small",3,"ngModel","ngModelOptions","ngModelChange"],["nzDrawerContent",""]],template:function(n,r){if(n&1&&(c(0,"span"),_(1),c(2,"span",0),_(3),p()(),h(4,Ro,1,3)(5,Bo,1,3)(6,Ho,1,5)(7,Po,1,3)(8,jo,1,0)),n&2){let a;s(),se(" ",r.i.label," "),s(2),j(r.i.tip),s(),v(4,(a=r.i.type)==="color"?4:a==="input"?5:a==="px"?6:a==="switch"?7:8)}},dependencies:[ut,ge,_e,Et,It,ft,Qi],encapsulation:2});let e=i;return e})(),At="alain-default-vars",Ko=[{key:"dust",color:"#F5222D"},{key:"volcano",color:"#FA541C"},{key:"sunset",color:"#FAAD14"},{key:"cyan",color:"#13C2C2"},{key:"green",color:"#52C41A"},{key:"daybreak",color:"#1890ff"},{key:"geekblue",color:"#2F54EB"},{key:"purple",color:"#722ED1"},{key:"black",color:"#001529"}],vt={"primary-color":{label:"\u4E3B\u989C\u8272",type:"color",default:"#1890ff"},"alain-default-header-hg":{label:"\u9AD8",type:"px",default:"64px",max:300,min:24},"alain-default-header-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-header-padding":{label:"\u9876\u90E8\u5DE6\u53F3\u5185\u8FB9\u8DDD",type:"px",default:"16px"},"alain-default-aside-wd":{label:"\u5BBD\u5EA6",type:"px",default:"200px"},"alain-default-aside-bg":{label:"\u80CC\u666F",type:"color",default:"#ffffff"},"alain-default-aside-collapsed-wd":{label:"\u6536\u7F29\u5BBD\u5EA6",type:"px",default:"64px"},"alain-default-aside-nav-padding-top-bottom":{label:"\u9879\u4E0A\u4E0B\u5185\u8FB9\u8DDD",type:"px",default:"8px",step:8},"alain-default-aside-nav-fs":{label:"\u83DC\u5355\u5B57\u53F7",type:"px",default:"14px",min:14,max:30},"alain-default-aside-collapsed-nav-fs":{label:"\u6536\u7F29\u83DC\u5355\u5B57\u53F7",type:"px",default:"24px",min:24,max:32},"alain-default-aside-nav-item-height":{label:"\u83DC\u5355\u9879\u9AD8\u5EA6",type:"px",default:"38px",min:24,max:64},"alain-default-aside-nav-text-color":{label:"\u83DC\u5355\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.65)",rgba:!0},"alain-default-aside-nav-text-hover-color":{label:"\u83DC\u5355\u6587\u672C\u60AC\u505C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-group-text-color":{label:"\u83DC\u5355\u5206\u7EC4\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.43)",rgba:!0},"alain-default-aside-nav-selected-text-color":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u6587\u672C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-selected-bg":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u80CC\u666F\u989C\u8272",type:"color",default:"#fcfcfc"},"alain-default-content-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"#f5f7fa"},"alain-default-content-heading-bg":{label:"\u6807\u9898\u80CC\u666F\u8272",type:"color",default:"#fafbfc"},"alain-default-content-heading-border":{label:"\u6807\u9898\u5E95\u90E8\u8FB9\u6846\u8272",type:"color",default:"#efe3e5"},"alain-default-content-padding":{label:"\u5185\u8FB9\u8DDD",type:"px",default:"24px",min:0,max:128,step:8},"form-state-visual-feedback-enabled":{label:"\u5F00\u542F\u8868\u5355\u5143\u7D20\u7684\u89C6\u89C9\u53CD\u9988",type:"switch",default:!0},"preserve-white-spaces-enabled":{label:"\u5F00\u542F preserveWhitespaces",type:"switch",default:!0},"nz-table-img-radius":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u5706\u89D2",type:"px",default:"4px",min:0,max:128},"nz-table-img-margin-right":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u53F3\u5916\u8FB9\u8DDD",type:"px",default:"4px",min:0,max:128},"nz-table-img-max-width":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u5BBD\u5EA6",type:"px",default:"32px",min:8,max:128},"nz-table-img-max-height":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u9AD8\u5EA6",type:"px",default:"32px",min:8,max:128}},hn=(()=>{let i=class i{get layout(){return this.settingSrv.layout}constructor(){this.cdr=d(V),this.msg=d(Ee),this.settingSrv=d(N),this.lazy=d(hi),this.ngZone=d(ne),this.doc=d(te),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.autoApplyColor=!0,this.compilingText="Compiling...",this.devTips="When the color can't be switched, you need to run it once: npm run color-less",this.lessJs="https://cdn.jsdelivr.net/npm/less",this.loadedLess=!1,this.dir="ltr",this.isDev=tt(),this.collapse=!1,this.data={},this.colors=Ko,this.color=this.cachedData["@primary-color"]||this.DEFAULT_PRIMARY,this.resetData(this.cachedData,!1)}get cachedData(){return this.settingSrv.layout[At]||{}}get DEFAULT_PRIMARY(){return vt["primary-color"].default}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.autoApplyColor&&this.color!==this.DEFAULT_PRIMARY&&(this.changeColor(this.color),this.runLess())}loadLess(){return Ht(this,null,function*(){return this.loadedLess?Promise.resolve():this.lazy.loadStyle("./assets/color.less",{rel:"stylesheet/less"}).then(()=>{let t=this.doc.createElement("script");t.innerHTML=`
window.less = {
async: true,
env: 'production',
diff --git a/dist/himp.platform.angular/browser/chunk-GNH673QO.js b/dist/himp.platform.angular/browser/chunk-MU3AQSF6.js
similarity index 99%
rename from dist/himp.platform.angular/browser/chunk-GNH673QO.js
rename to dist/himp.platform.angular/browser/chunk-MU3AQSF6.js
index 6b05368..d72d711 100644
--- a/dist/himp.platform.angular/browser/chunk-GNH673QO.js
+++ b/dist/himp.platform.angular/browser/chunk-MU3AQSF6.js
@@ -1,4 +1,4 @@
-import{a as zn}from"./chunk-2TNVIQ4O.js";import{A as ae,Aa as Vs,Ba as Me,C as le,Da as mt,Fa as Se,Ga as Ps,Ha as Ce,Ia as Sn,Ja as Ge,Ka as Ne,Oa as ve,Qa as Ae,Ra as De,Ta as be,Ua as ct,V as ue,Va as ft,Wa as we,Xa as Is,Y as Ai,Ya as Ys,Z as Li,Za as Rs,_ as de,_a as Te,ab as xe,ca as me,cb as ke,d as bs,da as br,e as ne,ea as wr,eb as Ee,f as Dr,fa as Tr,ga as xr,gb as Fe,h as nt,ha as kr,hb as Vr,i as Ni,ia as Er,ib as Oe,j as st,ja as Fr,jb as As,k as ot,ka as ce,kb as Dt,l as Mn,la as dt,lb as $e,ma as Es,n as ws,na as Fs,o as at,oa as fe,p as lt,pa as Os,q as ut,qa as pe,r as Ts,ra as Or,s as xs,sa as he,t as Je,ta as _e,u as se,ua as Wi,v as oe,va as ge,wa as Re,xa as ye,z as ks}from"./chunk-OOUNO2UZ.js";import{Ab as q,Bb as j,Cb as Q,Db as P,Eb as C,Fb as Z,Fe as Ds,Gb as zr,Ge as ee,He,Ie as Be,Jb as X,Ka as y,Kb as We,Ke as Ue,Lb as rt,Le as te,Mf as Ie,Nf as ze,Sb as B,Ta as O,Va as M,Zc as Cr,a as gi,b as Pi,c as Cs,cc as yi,dc as Ri,f as ed,ff as Nr,gb as p,gf as Mi,h as td,ha as vs,hb as f,hf as ie,ib as b,j as Qe,jb as Ii,jf as Ze,ka as Sr,kb as Yi,kf as Ke,la as v,lf as re,mb as L,na as J,qb as T,rf as vr,sa as k,sb as w,ta as E,vf as Pe,xf as K,z as Ns}from"./chunk-VDRVUQCF.js";var Ws=ed((vn,Hi)=>{"use strict";(function(c,l){typeof vn=="object"&&typeof Hi<"u"?Hi.exports=l():typeof define=="function"&&define.amd?define(l):c.moment=l()})(vn,function(){"use strict";var c;function l(){return c.apply(null,arguments)}function m(e){c=e}function n(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function o(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(a(e,t))return!1;return!0}function _(e){return e===void 0}function N(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function W(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function St(e,t){var i=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(i=0;i{"use strict";(function(c,l){typeof vn=="object"&&typeof Hi<"u"?Hi.exports=l():typeof define=="function"&&define.amd?define(l):c.moment=l()})(vn,function(){"use strict";var c;function l(){return c.apply(null,arguments)}function m(e){c=e}function n(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function o(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(a(e,t))return!1;return!0}function _(e){return e===void 0}function N(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function W(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function St(e,t){var i=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(i=0;i=0;return(u?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var qr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,er=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,jr={},bi={};function D(e,t,i,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(bi[e]=s),t&&(bi[t[0]]=function(){return Nt(s.apply(this,arguments),t[1],t[2])}),i&&(bi[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function no(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function so(e){var t=e.match(qr),i,r;for(i=0,r=t.length;i=0&&er.test(e);)e=e.replace(er,r),er.lastIndex=0,i-=1;return e}var oo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ao(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(qr).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var lo="Invalid date";function uo(){return this._invalidDate}var mo="%d",co=/\d{1,2}/;function fo(e){return this._ordinal.replace("%d",e)}var po={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ho(e,t,i,r){var s=this._relativeTime[i];return Ct(s)?s(e,t,i,r):s.replace(/%d/i,e)}function _o(e,t){var i=this._relativeTime[e>0?"future":"past"];return Ct(i)?i(t):i.replace(/%s/i,t)}var Fn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function tt(e){return typeof e=="string"?Fn[e]||Fn[e.toLowerCase()]:void 0}function Qr(e){var t={},i,r;for(r in e)a(e,r)&&(i=tt(r),i&&(t[i]=e[r]));return t}var go={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function yo(e){var t=[],i;for(i in e)a(e,i)&&t.push({unit:i,priority:go[i]});return t.sort(function(r,s){return r.priority-s.priority}),t}var On=/\d/,Xe=/\d\d/,Vn=/\d{3}/,Zr=/\d{4}/,ir=/[+-]?\d{6}/,U=/\d\d?/,Pn=/\d\d\d\d?/,In=/\d\d\d\d\d\d?/,rr=/\d{1,3}/,Kr=/\d{1,4}/,nr=/[+-]?\d{1,6}/,wi=/\d+/,sr=/[+-]?\d+/,Mo=/Z|[+-]\d\d:?\d\d/gi,or=/Z|[+-]\d\d(?::?\d\d)?/gi,So=/[+-]?\d+(\.\d{1,3})?/,Ui=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ti=/^[1-9]\d?/,Jr=/^([1-9]\d|\d)/,ar;ar={};function z(e,t,i){ar[e]=Ct(t)?t:function(r,s){return r&&i?i:t}}function zo(e,t){return a(ar,e)?ar[e](t._strict,t._locale):new RegExp(Co(e))}function Co(e){return ni(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,i,r,s,u){return i||r||s||u}))}function ni(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function it(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,i=0;return t!==0&&isFinite(t)&&(i=it(t)),i}var Xr={};function H(e,t){var i,r=t,s;for(typeof e=="string"&&(e=[e]),N(t)&&(r=function(u,h){h[t]=V(u)}),s=e.length,i=0;i68?1900:2e3)};var Yn=xi("FullYear",!0);function bo(){return lr(this.year())}function xi(e,t){return function(i){return i!=null?(Rn(this,e,i),l.updateOffset(this,t),this):qi(this,e)}}function qi(e,t){if(!e.isValid())return NaN;var i=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return r?i.getUTCSeconds():i.getSeconds();case"Minutes":return r?i.getUTCMinutes():i.getMinutes();case"Hours":return r?i.getUTCHours():i.getHours();case"Date":return r?i.getUTCDate():i.getDate();case"Day":return r?i.getUTCDay():i.getDay();case"Month":return r?i.getUTCMonth():i.getMonth();case"FullYear":return r?i.getUTCFullYear():i.getFullYear();default:return NaN}}function Rn(e,t,i){var r,s,u,h,S;if(!(!e.isValid()||isNaN(i))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(i):r.setMilliseconds(i));case"Seconds":return void(s?r.setUTCSeconds(i):r.setSeconds(i));case"Minutes":return void(s?r.setUTCMinutes(i):r.setMinutes(i));case"Hours":return void(s?r.setUTCHours(i):r.setHours(i));case"Date":return void(s?r.setUTCDate(i):r.setDate(i));case"FullYear":break;default:return}u=i,h=e.month(),S=e.date(),S=S===29&&h===1&&!lr(u)?28:S,s?r.setUTCFullYear(u,h,S):r.setFullYear(u,h,S)}}function wo(e){return e=tt(e),Ct(this[e])?this[e]():this}function To(e,t){if(typeof e=="object"){e=Qr(e);var i=yo(e),r,s=i.length;for(r=0;r=0?(S=new Date(e+400,t,i,r,s,u,h),isFinite(S.getFullYear())&&S.setFullYear(e)):S=new Date(e,t,i,r,s,u,h),S}function ji(e){var t,i;return e<100&&e>=0?(i=Array.prototype.slice.call(arguments),i[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ur(e,t,i){var r=7+t-i,s=(7+ji(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Un(e,t,i,r,s){var u=(7+i-r)%7,h=ur(e,r,s),S=1+7*(t-1)+u+h,x,I;return S<=0?(x=e-1,I=$i(x)+S):S>$i(e)?(x=e+1,I=S-$i(e)):(x=e,I=S),{year:x,dayOfYear:I}}function Qi(e,t,i){var r=ur(e.year(),t,i),s=Math.floor((e.dayOfYear()-r-1)/7)+1,u,h;return s<1?(h=e.year()-1,u=s+ai(h,t,i)):s>ai(e.year(),t,i)?(u=s-ai(e.year(),t,i),h=e.year()+1):(h=e.year(),u=s),{week:u,year:h}}function ai(e,t,i){var r=ur(e,t,i),s=ur(e+1,t,i);return($i(e)-r+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),z("w",U,Ti),z("ww",U,Xe),z("W",U,Ti),z("WW",U,Xe),Gi(["w","ww","W","WW"],function(e,t,i,r){t[r.substr(0,1)]=V(e)});function Wo(e){return Qi(e,this._week.dow,this._week.doy).week}var Ho={dow:0,doy:6};function Bo(){return this._week.dow}function Uo(){return this._week.doy}function Go(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function $o(e){var t=Qi(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),z("d",U),z("e",U),z("E",U),z("dd",function(e,t){return t.weekdaysMinRegex(e)}),z("ddd",function(e,t){return t.weekdaysShortRegex(e)}),z("dddd",function(e,t){return t.weekdaysRegex(e)}),Gi(["dd","ddd","dddd"],function(e,t,i,r){var s=i._locale.weekdaysParse(e,r,i._strict);s!=null?t.d=s:F(i).invalidWeekday=e}),Gi(["d","e","E"],function(e,t,i,r){t[r]=V(e)});function qo(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function jo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function tn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Qo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Zo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ko=Ui,Jo=Ui,Xo=Ui;function ea(e,t){var i=n(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?tn(i,this._week.dow):e?i[e.day()]:i}function ta(e){return e===!0?tn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ia(e){return e===!0?tn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ra(e,t,i){var r,s,u,h=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)u=zt([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(u,"").toLocaleLowerCase();return i?t==="dddd"?(s=Ve.call(this._weekdaysParse,h),s!==-1?s:null):t==="ddd"?(s=Ve.call(this._shortWeekdaysParse,h),s!==-1?s:null):(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null):t==="dddd"?(s=Ve.call(this._weekdaysParse,h),s!==-1||(s=Ve.call(this._shortWeekdaysParse,h),s!==-1)?s:(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null)):t==="ddd"?(s=Ve.call(this._shortWeekdaysParse,h),s!==-1||(s=Ve.call(this._weekdaysParse,h),s!==-1)?s:(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null)):(s=Ve.call(this._minWeekdaysParse,h),s!==-1||(s=Ve.call(this._weekdaysParse,h),s!==-1)?s:(s=Ve.call(this._shortWeekdaysParse,h),s!==-1?s:null))}function na(e,t,i){var r,s,u;if(this._weekdaysParseExact)return ra.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=zt([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(u="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(u.replace(".",""),"i")),i&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(i&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(i&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!i&&this._weekdaysParse[r].test(e))return r}}function sa(e){if(!this.isValid())return e!=null?this:NaN;var t=qi(this,"Day");return e!=null?(e=qo(e,this.localeData()),this.add(e-t,"d")):t}function oa(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function aa(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=jo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function la(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ko),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ua(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function da(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xo),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rn(){function e(je,ci){return ci.length-je.length}var t=[],i=[],r=[],s=[],u,h,S,x,I;for(u=0;u<7;u++)h=zt([2e3,1]).day(u),S=ni(this.weekdaysMin(h,"")),x=ni(this.weekdaysShort(h,"")),I=ni(this.weekdays(h,"")),t.push(S),i.push(x),r.push(I),s.push(S),s.push(x),s.push(I);t.sort(e),i.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function nn(){return this.hours()%12||12}function ma(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,nn),D("k",["kk",2],0,ma),D("hmm",0,0,function(){return""+nn.apply(this)+Nt(this.minutes(),2)}),D("hmmss",0,0,function(){return""+nn.apply(this)+Nt(this.minutes(),2)+Nt(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+Nt(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+Nt(this.minutes(),2)+Nt(this.seconds(),2)});function $n(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$n("a",!0),$n("A",!1);function qn(e,t){return t._meridiemParse}z("a",qn),z("A",qn),z("H",U,Jr),z("h",U,Ti),z("k",U,Ti),z("HH",U,Xe),z("hh",U,Xe),z("kk",U,Xe),z("hmm",Pn),z("hmmss",In),z("Hmm",Pn),z("Hmmss",In),H(["H","HH"],Ye),H(["k","kk"],function(e,t,i){var r=V(e);t[Ye]=r===24?0:r}),H(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),H(["h","hh"],function(e,t,i){t[Ye]=V(e),F(i).bigHour=!0}),H("hmm",function(e,t,i){var r=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r)),F(i).bigHour=!0}),H("hmmss",function(e,t,i){var r=e.length-4,s=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r,2)),t[oi]=V(e.substr(s)),F(i).bigHour=!0}),H("Hmm",function(e,t,i){var r=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r))}),H("Hmmss",function(e,t,i){var r=e.length-4,s=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r,2)),t[oi]=V(e.substr(s))});function ca(e){return(e+"").toLowerCase().charAt(0)==="p"}var fa=/[ap]\.?m?\.?/i,pa=xi("Hours",!0);function ha(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}var jn={calendar:io,longDateFormat:oo,invalidDate:lo,ordinal:mo,dayOfMonthOrdinalParse:co,relativeTime:po,months:ko,monthsShort:An,week:Ho,weekdays:Qo,weekdaysMin:Zo,weekdaysShort:Gn,meridiemParse:fa},$={},Zi={},Ki;function _a(e,t){var i,r=Math.min(e.length,t.length);for(i=0;i0;){if(s=dr(u.slice(0,i).join("-")),s)return s;if(r&&r.length>=i&&_a(u,r)>=i-1)break;i--}t++}return Ki}function ya(e){return!!(e&&e.match("^[^/\\\\]*$"))}function dr(e){var t=null,i;if($[e]===void 0&&typeof Hi<"u"&&Hi&&Hi.exports&&ya(e))try{t=Ki._abbr,i=Cs,i("./locale/"+e),pi(t)}catch{$[e]=null}return $[e]}function pi(e,t){var i;return e&&(_(t)?i=li(e):i=sn(e,t),i?Ki=i:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ki._abbr}function sn(e,t){if(t!==null){var i,r=jn;if(t.abbr=e,$[e]!=null)kn("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=$[e]._config;else if(t.parentLocale!=null)if($[t.parentLocale]!=null)r=$[t.parentLocale]._config;else if(i=dr(t.parentLocale),i!=null)r=i._config;else return Zi[t.parentLocale]||(Zi[t.parentLocale]=[]),Zi[t.parentLocale].push({name:e,config:t}),null;return $[e]=new Gr(Ur(r,t)),Zi[e]&&Zi[e].forEach(function(s){sn(s.name,s.config)}),pi(e),$[e]}else return delete $[e],null}function Ma(e,t){if(t!=null){var i,r,s=jn;$[e]!=null&&$[e].parentLocale!=null?$[e].set(Ur($[e]._config,t)):(r=dr(e),r!=null&&(s=r._config),t=Ur(s,t),r==null&&(t.abbr=e),i=new Gr(t),i.parentLocale=$[e],$[e]=i),pi(e)}else $[e]!=null&&($[e].parentLocale!=null?($[e]=$[e].parentLocale,e===pi()&&pi(e)):$[e]!=null&&delete $[e]);return $[e]}function li(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ki;if(!n(e)){if(t=dr(e),t)return t;e=[e]}return ga(e)}function Sa(){return $r($)}function on(e){var t,i=e._a;return i&&F(e).overflow===-2&&(t=i[si]<0||i[si]>11?si:i[vt]<1||i[vt]>en(i[Le],i[si])?vt:i[Ye]<0||i[Ye]>24||i[Ye]===24&&(i[ht]!==0||i[oi]!==0||i[Si]!==0)?Ye:i[ht]<0||i[ht]>59?ht:i[oi]<0||i[oi]>59?oi:i[Si]<0||i[Si]>999?Si:-1,F(e)._overflowDayOfYear&&(tvt)&&(t=vt),F(e)._overflowWeeks&&t===-1&&(t=vo),F(e)._overflowWeekday&&t===-1&&(t=Do),F(e).overflow=t),e}var za=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ca=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Na=/Z|[+-]\d\d(?::?\d\d)?/,mr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],an=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],va=/^\/?Date\((-?\d+)/i,Da=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ba={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Zn(e){var t,i,r=e._i,s=za.exec(r)||Ca.exec(r),u,h,S,x,I=mr.length,je=an.length;if(s){for(F(e).iso=!0,t=0,i=I;t$i(h)||e._dayOfYear===0)&&(F(e)._overflowDayOfYear=!0),i=ji(h,0,e._dayOfYear),e._a[si]=i.getUTCMonth(),e._a[vt]=i.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ye]===24&&e._a[ht]===0&&e._a[oi]===0&&e._a[Si]===0&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?ji:Lo).apply(null,r),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(F(e).weekdayMismatch=!0)}}function Va(e){var t,i,r,s,u,h,S,x,I;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(u=1,h=4,i=ki(t.GG,e._a[Le],Qi(G(),1,4).year),r=ki(t.W,1),s=ki(t.E,1),(s<1||s>7)&&(x=!0)):(u=e._locale._week.dow,h=e._locale._week.doy,I=Qi(G(),u,h),i=ki(t.gg,e._a[Le],I.year),r=ki(t.w,I.week),t.d!=null?(s=t.d,(s<0||s>6)&&(x=!0)):t.e!=null?(s=t.e+u,(t.e<0||t.e>6)&&(x=!0)):s=u),r<1||r>ai(i,u,h)?F(e)._overflowWeeks=!0:x!=null?F(e)._overflowWeekday=!0:(S=Un(i,r,s,u,h),e._a[Le]=S.year,e._dayOfYear=S.dayOfYear)}l.ISO_8601=function(){},l.RFC_2822=function(){};function un(e){if(e._f===l.ISO_8601){Zn(e);return}if(e._f===l.RFC_2822){Kn(e);return}e._a=[],F(e).empty=!0;var t=""+e._i,i,r,s,u,h,S=t.length,x=0,I,je;for(s=En(e._f,e._locale).match(qr)||[],je=s.length,i=0;i0&&F(e).unusedInput.push(h),t=t.slice(t.indexOf(r)+r.length),x+=r.length),bi[u]?(r?F(e).empty=!1:F(e).unusedTokens.push(u),No(u,r,e)):e._strict&&!r&&F(e).unusedTokens.push(u);F(e).charsLeftOver=S-x,t.length>0&&F(e).unusedInput.push(t),e._a[Ye]<=12&&F(e).bigHour===!0&&e._a[Ye]>0&&(F(e).bigHour=void 0),F(e).parsedDateParts=e._a.slice(0),F(e).meridiem=e._meridiem,e._a[Ye]=Pa(e._locale,e._a[Ye],e._meridiem),I=F(e).era,I!==null&&(e._a[Le]=e._locale.erasConvertYear(I,e._a[Le])),ln(e),on(e)}function Pa(e,t,i){var r;return i==null?t:e.meridiemHour!=null?e.meridiemHour(t,i):(e.isPM!=null&&(r=e.isPM(i),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ia(e){var t,i,r,s,u,h,S=!1,x=e._f.length;if(x===0){F(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:Xi()});function es(e,t){var i,r;if(t.length===1&&n(t[0])&&(t=t[0]),!t.length)return G();for(i=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rl(){if(!_(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Br(e,this),e=Jn(e),e._a?(t=e._isUTC?zt(e._a):G(e._a),this._isDSTShifted=this.isValid()&&ja(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function nl(){return this.isValid()?!this._isUTC:!1}function sl(){return this.isValid()?this._isUTC:!1}function is(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ol=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,al=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function _t(e,t){var i=e,r=null,s,u,h;return fr(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:N(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(r=ol.exec(e))?(s=r[1]==="-"?-1:1,i={y:0,d:V(r[vt])*s,h:V(r[Ye])*s,m:V(r[ht])*s,s:V(r[oi])*s,ms:V(dn(r[Si]*1e3))*s}):(r=al.exec(e))?(s=r[1]==="-"?-1:1,i={y:zi(r[2],s),M:zi(r[3],s),w:zi(r[4],s),d:zi(r[5],s),h:zi(r[6],s),m:zi(r[7],s),s:zi(r[8],s)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(h=ll(G(i.from),G(i.to)),i={},i.ms=h.milliseconds,i.M=h.months),u=new cr(i),fr(e)&&a(e,"_locale")&&(u._locale=e._locale),fr(e)&&a(e,"_isValid")&&(u._isValid=e._isValid),u}_t.fn=cr.prototype,_t.invalid=qa;function zi(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function rs(e,t){var i={};return i.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function ll(e,t){var i;return e.isValid()&&t.isValid()?(t=cn(t,e),e.isBefore(t)?i=rs(e,t):(i=rs(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ns(e,t){return function(i,r){var s,u;return r!==null&&!isNaN(+r)&&(kn(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=i,i=r,r=u),s=_t(i,r),ss(this,s,e),this}}function ss(e,t,i,r){var s=t._milliseconds,u=dn(t._days),h=dn(t._months);e.isValid()&&(r=r??!0,h&&Wn(e,qi(e,"Month")+h*i),u&&Rn(e,"Date",qi(e,"Date")+u*i),s&&e._d.setTime(e._d.valueOf()+s*i),r&&l.updateOffset(e,u||h))}var ul=ns(1,"add"),dl=ns(-1,"subtract");function os(e){return typeof e=="string"||e instanceof String}function ml(e){return pt(e)||W(e)||os(e)||N(e)||fl(e)||cl(e)||e===null||e===void 0}function cl(e){var t=o(e)&&!d(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,u,h=r.length;for(s=0;si.valueOf():i.valueOf()9999?tr(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ct(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",tr(i,"Z")):tr(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wl(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",i,r,s,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),i="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",u=t+'[")]',this.format(i+r+s+u)}function Tl(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=tr(this,e);return this.localeData().postformat(t)}function xl(e,t){return this.isValid()&&(pt(e)&&e.isValid()||G(e).isValid())?_t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kl(e){return this.from(G(),e)}function El(e,t){return this.isValid()&&(pt(e)&&e.isValid()||G(e).isValid())?_t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fl(e){return this.to(G(),e)}function as(e){var t;return e===void 0?this._locale._abbr:(t=li(e),t!=null&&(this._locale=t),this)}var ls=et("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function us(){return this._locale}var hr=1e3,Ei=60*hr,_r=60*Ei,ds=(365*400+97)*24*_r;function Fi(e,t){return(e%t+t)%t}function ms(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-ds:new Date(e,t,i).valueOf()}function cs(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-ds:Date.UTC(e,t,i)}function Ol(e){var t,i;if(e=tt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?cs:ms,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Fi(t+(this._isUTC?0:this.utcOffset()*Ei),_r);break;case"minute":t=this._d.valueOf(),t-=Fi(t,Ei);break;case"second":t=this._d.valueOf(),t-=Fi(t,hr);break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Vl(e){var t,i;if(e=tt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?cs:ms,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_r-Fi(t+(this._isUTC?0:this.utcOffset()*Ei),_r)-1;break;case"minute":t=this._d.valueOf(),t+=Ei-Fi(t,Ei)-1;break;case"second":t=this._d.valueOf(),t+=hr-Fi(t,hr)-1;break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Pl(){return this._d.valueOf()-(this._offset||0)*6e4}function Il(){return Math.floor(this.valueOf()/1e3)}function Yl(){return new Date(this.valueOf())}function Rl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Al(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ll(){return this.isValid()?this.toISOString():null}function Wl(){return Wr(this)}function Hl(){return fi({},F(this))}function Bl(){return F(this).overflow}function Ul(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),z("N",pn),z("NN",pn),z("NNN",pn),z("NNNN",tu),z("NNNNN",iu),H(["N","NN","NNN","NNNN","NNNNN"],function(e,t,i,r){var s=i._locale.erasParse(e,r,i._strict);s?F(i).era=s:F(i).invalidEra=e}),z("y",wi),z("yy",wi),z("yyy",wi),z("yyyy",wi),z("yo",ru),H(["y","yy","yyy","yyyy"],Le),H(["yo"],function(e,t,i,r){var s;i._locale._eraYearOrdinalRegex&&(s=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[Le]=i._locale.eraYearOrdinalParse(e,s):t[Le]=parseInt(e,10)});function Gl(e,t){var i,r,s,u=this._eras||li("en")._eras;for(i=0,r=u.length;i=0)return u[r]}function ql(e,t){var i=e.since<=e.until?1:-1;return t===void 0?l(e.since).year():l(e.since).year()+(t-e.offset)*i}function jl(){var e,t,i,r=this.localeData().eras();for(e=0,t=r.length;eu&&(t=u),du.call(this,e,t,i,r,s))}function du(e,t,i,r,s){var u=Un(e,t,i,r,s),h=ji(u.year,0,u.dayOfYear);return this.year(h.getUTCFullYear()),this.month(h.getUTCMonth()),this.date(h.getUTCDate()),this}D("Q",0,"Qo","quarter"),z("Q",On),H("Q",function(e,t){t[si]=(V(e)-1)*3});function mu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),z("D",U,Ti),z("DD",U,Xe),z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),H(["D","DD"],vt),H("Do",function(e,t){t[vt]=V(e.match(U)[0])});var ps=xi("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),z("DDD",rr),z("DDDD",Vn),H(["DDD","DDDD"],function(e,t,i){i._dayOfYear=V(e)});function cu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}D("m",["mm",2],0,"minute"),z("m",U,Jr),z("mm",U,Xe),H(["m","mm"],ht);var fu=xi("Minutes",!1);D("s",["ss",2],0,"second"),z("s",U,Jr),z("ss",U,Xe),H(["s","ss"],oi);var pu=xi("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),z("S",rr,On),z("SS",rr,Xe),z("SSS",rr,Vn);var hi,hs;for(hi="SSSS";hi.length<=9;hi+="S")z(hi,wi);function hu(e,t){t[Si]=V(("0."+e)*1e3)}for(hi="S";hi.length<=9;hi+="S")H(hi,hu);hs=xi("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function _u(){return this._isUTC?"UTC":""}function gu(){return this._isUTC?"Coordinated Universal Time":""}var g=Bi.prototype;g.add=ul,g.calendar=_l,g.clone=gl,g.diff=vl,g.endOf=Vl,g.format=Tl,g.from=xl,g.fromNow=kl,g.to=El,g.toNow=Fl,g.get=wo,g.invalidAt=Bl,g.isAfter=yl,g.isBefore=Ml,g.isBetween=Sl,g.isSame=zl,g.isSameOrAfter=Cl,g.isSameOrBefore=Nl,g.isValid=Wl,g.lang=ls,g.locale=as,g.localeData=us,g.max=Wa,g.min=La,g.parsingFlags=Hl,g.set=To,g.startOf=Ol,g.subtract=dl,g.toArray=Rl,g.toObject=Al,g.toDate=Yl,g.toISOString=bl,g.inspect=wl,typeof Symbol<"u"&&Symbol.for!=null&&(g[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),g.toJSON=Ll,g.toString=Dl,g.unix=Il,g.valueOf=Pl,g.creationData=Ul,g.eraName=jl,g.eraNarrow=Ql,g.eraAbbr=Zl,g.eraYear=Kl,g.year=Yn,g.isLeapYear=bo,g.weekYear=nu,g.isoWeekYear=su,g.quarter=g.quarters=mu,g.month=Hn,g.daysInMonth=Yo,g.week=g.weeks=Go,g.isoWeek=g.isoWeeks=$o,g.weeksInYear=lu,g.weeksInWeekYear=uu,g.isoWeeksInYear=ou,g.isoWeeksInISOWeekYear=au,g.date=ps,g.day=g.days=sa,g.weekday=oa,g.isoWeekday=aa,g.dayOfYear=cu,g.hour=g.hours=pa,g.minute=g.minutes=fu,g.second=g.seconds=pu,g.millisecond=g.milliseconds=hs,g.utcOffset=Za,g.utc=Ja,g.local=Xa,g.parseZone=el,g.hasAlignedHourOffset=tl,g.isDST=il,g.isLocal=nl,g.isUtcOffset=sl,g.isUtc=is,g.isUTC=is,g.zoneAbbr=_u,g.zoneName=gu,g.dates=et("dates accessor is deprecated. Use date instead.",ps),g.months=et("months accessor is deprecated. Use month instead",Hn),g.years=et("years accessor is deprecated. Use year instead",Yn),g.zone=et("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ka),g.isDSTShifted=et("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rl);function yu(e){return G(e*1e3)}function Mu(){return G.apply(null,arguments).parseZone()}function _s(e){return e}var R=Gr.prototype;R.calendar=ro,R.longDateFormat=ao,R.invalidDate=uo,R.ordinal=fo,R.preparse=_s,R.postformat=_s,R.relativeTime=ho,R.pastFuture=_o,R.set=to,R.eras=Gl,R.erasParse=$l,R.erasConvertYear=ql,R.erasAbbrRegex=Xl,R.erasNameRegex=Jl,R.erasNarrowRegex=eu,R.months=Oo,R.monthsShort=Vo,R.monthsParse=Io,R.monthsRegex=Ao,R.monthsShortRegex=Ro,R.week=Wo,R.firstDayOfYear=Uo,R.firstDayOfWeek=Bo,R.weekdays=ea,R.weekdaysMin=ia,R.weekdaysShort=ta,R.weekdaysParse=na,R.weekdaysRegex=la,R.weekdaysShortRegex=ua,R.weekdaysMinRegex=da,R.isPM=ca,R.meridiem=ha;function yr(e,t,i,r){var s=li(),u=zt().set(r,t);return s[i](u,e)}function gs(e,t,i){if(N(e)&&(t=e,e=void 0),e=e||"",t!=null)return yr(e,t,i,"month");var r,s=[];for(r=0;r<12;r++)s[r]=yr(e,r,i,"month");return s}function _n(e,t,i,r){typeof e=="boolean"?(N(t)&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,N(t)&&(i=t,t=void 0),t=t||"");var s=li(),u=e?s._week.dow:0,h,S=[];if(i!=null)return yr(t,(i+u)%7,r,"day");for(h=0;h<7;h++)S[h]=yr(t,(h+u)%7,r,"day");return S}function Su(e,t){return gs(e,t,"months")}function zu(e,t){return gs(e,t,"monthsShort")}function Cu(e,t,i){return _n(e,t,i,"weekdays")}function Nu(e,t,i){return _n(e,t,i,"weekdaysShort")}function vu(e,t,i){return _n(e,t,i,"weekdaysMin")}pi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=V(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+i}}),l.lang=et("moment.lang is deprecated. Use moment.locale instead.",pi),l.langData=et("moment.langData is deprecated. Use moment.localeData instead.",li);var ui=Math.abs;function Du(){var e=this._data;return this._milliseconds=ui(this._milliseconds),this._days=ui(this._days),this._months=ui(this._months),e.milliseconds=ui(e.milliseconds),e.seconds=ui(e.seconds),e.minutes=ui(e.minutes),e.hours=ui(e.hours),e.months=ui(e.months),e.years=ui(e.years),this}function ys(e,t,i,r){var s=_t(t,i);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function bu(e,t){return ys(this,e,t,1)}function wu(e,t){return ys(this,e,t,-1)}function Ms(e){return e<0?Math.floor(e):Math.ceil(e)}function Tu(){var e=this._milliseconds,t=this._days,i=this._months,r=this._data,s,u,h,S,x;return e>=0&&t>=0&&i>=0||e<=0&&t<=0&&i<=0||(e+=Ms(gn(i)+t)*864e5,t=0,i=0),r.milliseconds=e%1e3,s=it(e/1e3),r.seconds=s%60,u=it(s/60),r.minutes=u%60,h=it(u/60),r.hours=h%24,t+=it(h/24),x=it(Ss(t)),i+=x,t-=Ms(gn(x)),S=it(i/12),i%=12,r.days=t,r.months=i,r.years=S,this}function Ss(e){return e*4800/146097}function gn(e){return e*146097/4800}function xu(e){if(!this.isValid())return NaN;var t,i,r=this._milliseconds;if(e=tt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,i=this._months+Ss(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(gn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function di(e){return function(){return this.as(e)}}var zs=di("ms"),ku=di("s"),Eu=di("m"),Fu=di("h"),Ou=di("d"),Vu=di("w"),Pu=di("M"),Iu=di("Q"),Yu=di("y"),Ru=zs;function Au(){return _t(this)}function Lu(e){return e=tt(e),this.isValid()?this[e+"s"]():NaN}function Ci(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wu=Ci("milliseconds"),Hu=Ci("seconds"),Bu=Ci("minutes"),Uu=Ci("hours"),Gu=Ci("days"),$u=Ci("months"),qu=Ci("years");function ju(){return it(this.days()/7)}var mi=Math.round,Oi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qu(e,t,i,r,s){return s.relativeTime(t||1,!!i,e,r)}function Zu(e,t,i,r){var s=_t(e).abs(),u=mi(s.as("s")),h=mi(s.as("m")),S=mi(s.as("h")),x=mi(s.as("d")),I=mi(s.as("M")),je=mi(s.as("w")),ci=mi(s.as("y")),_i=u<=i.ss&&["s",u]||u0,_i[4]=r,Qu.apply(null,_i)}function Ku(e){return e===void 0?mi:typeof e=="function"?(mi=e,!0):!1}function Ju(e,t){return Oi[e]===void 0?!1:t===void 0?Oi[e]:(Oi[e]=t,e==="s"&&(Oi.ss=t-1),!0)}function Xu(e,t){if(!this.isValid())return this.localeData().invalidDate();var i=!1,r=Oi,s,u;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(i=e),typeof t=="object"&&(r=Object.assign({},Oi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),u=Zu(this,!i,r,s),i&&(u=s.pastFuture(+this,u)),s.postformat(u)}var yn=Math.abs;function Vi(e){return(e>0)-(e<0)||+e}function Mr(){if(!this.isValid())return this.localeData().invalidDate();var e=yn(this._milliseconds)/1e3,t=yn(this._days),i=yn(this._months),r,s,u,h,S=this.asSeconds(),x,I,je,ci;return S?(r=it(e/60),s=it(r/60),e%=60,r%=60,u=it(i/12),i%=12,h=e?e.toFixed(3).replace(/\.?0+$/,""):"",x=S<0?"-":"",I=Vi(this._months)!==Vi(S)?"-":"",je=Vi(this._days)!==Vi(S)?"-":"",ci=Vi(this._milliseconds)!==Vi(S)?"-":"",x+"P"+(u?I+u+"Y":"")+(i?I+i+"M":"")+(t?je+t+"D":"")+(s||r||e?"T":"")+(s?ci+s+"H":"")+(r?ci+r+"M":"")+(e?ci+h+"S":"")):"P0D"}var Y=cr.prototype;Y.isValid=$a,Y.abs=Du,Y.add=bu,Y.subtract=wu,Y.as=xu,Y.asMilliseconds=zs,Y.asSeconds=ku,Y.asMinutes=Eu,Y.asHours=Fu,Y.asDays=Ou,Y.asWeeks=Vu,Y.asMonths=Pu,Y.asQuarters=Iu,Y.asYears=Yu,Y.valueOf=Ru,Y._bubble=Tu,Y.clone=Au,Y.get=Lu,Y.milliseconds=Wu,Y.seconds=Hu,Y.minutes=Bu,Y.hours=Uu,Y.days=Gu,Y.weeks=ju,Y.months=$u,Y.years=qu,Y.humanize=Xu,Y.toISOString=Mr,Y.toString=Mr,Y.toJSON=Mr,Y.locale=as,Y.localeData=us,Y.toIsoString=et("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mr),Y.lang=ls,D("X",0,0,"unix"),D("x",0,0,"valueOf"),z("x",sr),z("X",So),H("X",function(e,t,i){i._d=new Date(parseFloat(e)*1e3)}),H("x",function(e,t,i){i._d=new Date(V(e))});return l.version="2.30.1",m(G),l.fn=g,l.min=Ha,l.max=Ba,l.now=Ua,l.utc=zt,l.unix=yu,l.months=Su,l.isDate=W,l.locale=pi,l.invalid=Xi,l.duration=_t,l.isMoment=pt,l.weekdays=Cu,l.parseZone=Mu,l.localeData=li,l.isDuration=fr,l.monthsShort=zu,l.weekdaysMin=vu,l.defineLocale=sn,l.updateLocale=Ma,l.locales=Sa,l.weekdaysShort=Nu,l.normalizeUnits=tt,l.relativeTimeRounding=Ku,l.relativeTimeThreshold=Ju,l.calendarFormat=hl,l.prototype=g,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l})});function id(c,l){if(c&1){let m=L();p(0,"button",5),T("click",function(){k(m);let o=w();return E(o.get())}),C(1,"\u5237\u65B0"),f()}}function rd(c,l){if(c&1){let m=L();p(0,"tr")(1,"td",7),T("nzExpandChange",function(o){k(m);let a=w().$implicit;return E(a.expand=o)})("nzExpandChange",function(o){k(m);let a=w().$implicit,d=w().$implicit,_=w();return E(_.collapse(_.mapOfExpandedData[d.id],a,o))}),C(2),f(),p(3,"td"),C(4),f(),p(5,"td"),C(6),f(),p(7,"td"),C(8),f()()}if(c&2){let m=w().$implicit;y(),M("nzIndentSize",m.level*20)("nzShowExpand",!!m.children&&m.children.length!=0)("nzExpand",m.expand),y(),zr(" ",m.text," "),y(2),Z(m.menuCode),y(2),Z(m.srtno),y(2),Z(m.icon)}}function nd(c,l){if(c&1&&(Ii(0),O(1,rd,9,7,"tr",6),Yi()),c&2){let m=l.$implicit;y(),M("ngIf",m.parent&&m.parent.expand||!m.parent)}}function sd(c,l){if(c&1&&(Ii(0),O(1,nd,2,1,"ng-container",4),Yi()),c&2){let m=l.$implicit,n=w();y(),M("ngForOf",n.mapOfExpandedData[m.id])}}var Ls=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.url="/api/main/menu",this.menuList=[],this.mapOfExpandedData={}}ngOnInit(){this.getMenuList()}getMenuList(){this.http.get(this.url).subscribe(n=>{this.menuList=n,this.menuList.forEach(o=>{this.mapOfExpandedData[o.id]=this.convertTreeToList(o)})})}get(){this.getMenuList()}convertTreeToList(n){let o=[],a=[],d={};for(o.push(Pi(gi({},n),{level:0,expand:!1}));o.length!==0;){let _=o.pop();if(this.visitNode(_,d,a),_.children)for(let N=_.children.length-1;N>=0;N--)o.push(Pi(gi({},_.children[N]),{level:_.level+1,expand:!1,parent:_}))}return a}visitNode(n,o,a){o[n.id]||(o[n.id]=!0,a.push(n))}collapse(n,o,a){if(!a)if(o.children)o.children.forEach(d=>{let _=n.find(N=>N.id===d.id);_.expand=!1,this.collapse(n,_,!1)});else return}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-menu-manage"]],standalone:!0,features:[X],decls:18,vars:4,consts:[[3,"action"],["phActionTpl",""],["nzTableLayout","fixed",3,"nzData","nzSize"],["expandTable",""],[4,"ngFor","ngForOf"],["nz-button","","nzType","primary",3,"click"],[4,"ngIf"],[3,"nzIndentSize","nzShowExpand","nzExpand","nzExpandChange"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,id,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"nz-table",2,3)(6,"thead")(7,"tr")(8,"th"),C(9,"\u83DC\u5355\u540D\u79F0"),f(),p(10,"th"),C(11,"\u83DC\u5355\u4EE3\u7801"),f(),p(12,"th"),C(13,"\u6392\u5E8F\u53F7"),f(),p(14,"th"),C(15,"\u56FE\u6807"),f()()(),p(16,"tbody"),O(17,sd,2,1,"ng-container",4),f()()()),o&2){let d=P(2),_=P(5);M("action",d),y(4),M("nzData",a.menuList)("nzSize","small"),y(13),M("ngForOf",_.data)}},dependencies:[$e,yi,Ri,Ae,Ue,He,Be,Ie,xr,br,Tr,wr,Fr,kr,Er,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Cn={C0001:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u6570\u636E\u5417\uFF1F",C0002:"\u786E\u5B9A\u8981\u628A\u8FD9\u6761\u6570\u636E\u65E0\u6548\u5417\uFF1F",C0003:"\u4FDD\u5B58\u6210\u529F",C0004:"\u786E\u5B9A\u8981\u4F5C\u5E9F\u8BE5\u836F\u54C1\u53CA\u836F\u54C1\u76EE\u5F55\u4FE1\u606F\u5417\uFF1F",C0005:"\u786E\u5B9A\u8981\u542F\u7528\u8BE5\u836F\u54C1\u4FE1\u606F\u5417\uFF1F",C0006:"\u5220\u9664\u6210\u529F",C0007:"\u786E\u5B9A\u8981\u8FDB\u884C\u5BA1\u6838\u64CD\u4F5C\u5417\uFF1F",E0001:"\u8BF7\u8F93\u5165{0}",E0002:"{0}\u7684\u6700\u5927\u957F\u5EA6\u662F{1}",E0003:"{0}\u7684\u683C\u5F0F\u4E0D\u6B63\u786E",E0004:"\u8BF7\u8F93\u5165\u6570\u5B57",E0005:"\u8BF7\u8F93\u5165{0}",E0006:"{0}\u7684\u6700\u5C0F\u957F\u5EA6\u662F{1}",E0007:"",I0001:"",W0001:""},Nn=class{constructor(){this.devMode=!1}getMessage(l,m){let n=this.replaceMessage(l,m);return this.devMode?`${n}(${l})`:n}replaceMessage(l,m){let n=Cn[l]||l;return m&&m.forEach((o,a)=>{let d=new RegExp(`\\{${a}\\}`,"g");n=n.replace(d,o)}),n}convertToXML(){if(document.implementation&&document.implementation.createDocument){let l=document.implementation.createDocument("","",null),m=l.createElement("MessageList");for(let n in Cn){let o=l.createElement("Message"),a=l.createElement("Id");a.textContent=n;let d=l.createElement("Text");d.textContent=Cn[n],o.appendChild(a),o.appendChild(d),m.appendChild(o)}return m}return null}},Mt=new Nn;var Dn=td(Ws()),Ir=class{static dateFormat(l,m){return l?(0,Dn.default)(l).format(m):null}static convertDate(l,m,n){if(l){let o=(0,Dn.default)(n&&m?l.substring(0,m.length):l,m);if(o.isValid())return o.toDate()}return null}static calAge(l,m){let n;if(typeof l=="string"?n=this.convertDate(l,m):n=l,n){let o=new Date,a=o.getFullYear()-n.getFullYear();return(o.getMonth()Ir.isNull(o.value)?{}:zn.idCard(o)===null?null:{idcard:{errorTip:Mt.getMessage(l,n)}}}static maxLength(l,m,...n){let o=n.length===0?[l.toString()]:n;return a=>Ni.maxLength(l)(a)===null?null:{maxlength:{errorTip:Mt.getMessage(m,o)}}}static minLength(l,m,...n){let o=n.length===0?[l.toString()]:n;return a=>Ni.minLength(l)(a)===null?null:{minLength:{errorTip:Mt.getMessage(m,o)}}}static required(l,...m){let n=m.length===0?[]:m;return o=>Ni.required(o)===null?null:{required:{errorTip:Mt.getMessage(l,n)}}}static email(l,...m){let n=m.length===0?[]:m;return o=>Ni.required(o)!==null?{required:{errorTip:Mt.getMessage(l,n)}}:Ni.email(o)!==null?{email:{errorTip:Mt.getMessage(l,n)}}:null}static mobile(l,...m){let n=m.length===0?[]:m;return o=>!o.value||zn.mobile(o)===null?null:{mobile:{errorTip:Mt.getMessage(l,n)}}}static pattern(l,m,...n){let o=n.length===0?[]:n;return a=>(l.lastIndex=0,Ni.pattern(l)(a)===null?null:{pattern:{errorTip:Mt.getMessage(m,o)}})}static other(l){return m=>l(m)}};var qe=(()=>{let l=class l{constructor(n,o,a){this.http=n,this.modalService=o,this.message=a,this.drawerWidth=550,this.deptmentServiceUrl=""}hasError(...n){return this.hasErrorBase(n)}hasErrorBase(n){let o=!1;return n&&n.forEach(a=>{if(a instanceof Mn)for(let d in a.controls){let _=a.controls[d];_ instanceof Mn?o=this.hasErrorBase([_])||o:_ instanceof xs?_.controls.forEach(N=>{N.markAsDirty(),N.updateValueAndValidity(),o=N.invalid||o}):(_.markAsDirty(),_.updateValueAndValidity(),o=_.invalid||o)}else if(a instanceof Sn){let d=a.root.properties;if(d)for(let _ in d){let N=d[_];N instanceof Sn&&(N.updateValueAndValidity(),o=N.valid||o)}}}),o}getMessage(n,...o){return this.getMessageBase(n,o)}getMessageBase(n,o){return Mt.getMessage(n,o)}showMessage(n){this.message.info(this.getMessage(n.messageId))}showConfirm(n){this.modalService.create({nzTitle:n.title,nzContent:n.message,nzClosable:!1,nzBodyStyle:{"font-size":"1.5rem"},nzOnOk:()=>{n.okCallback&&n.okCallback()},nzOnCancel:()=>{n.cancelCallback&&n.cancelCallback()}})}showModal(n){let o=600;switch(n.widthClass){case"xxl":o=1200;break;case"xl":o=1e3;break;case"lg":o=800;break;case"sm":o=600;break;case"xs":o=400;break}return this.modalService.create({nzTitle:n.title,nzContent:n.component,nzData:n.componentParams,nzClosable:!0,nzWidth:o,nzOnOk:n.okCallBack,nzFooter:n.footer,nzStyle:n.style})}post(n,o,a){return Qe(this,null,function*(){switch(o){case"put":return this.http.put(n,a).subscribe(d=>{});case"post":return this.http.post(n,a).subscribe(d=>{});case"get":return this.http.get(n,a).subscribe(d=>{});case"delete":return this.http.delete(n,a).subscribe(d=>{})}})}};l.\u0275fac=function(o){return new(o||l)(Sr(K),Sr(Mi),Sr(bs))},l.\u0275prov=vs({token:l,factory:l.\u0275fac,providedIn:"root"});let c=l;return c})();var od=["sf"],ad=["st"];function ld(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function ud(c,l){c&1&&(p(0,"se",15),b(1,"input",16),f())}function dd(c,l){c&1&&(p(0,"se",17),b(1,"input",18),f())}function md(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),O(3,ud,2,0,"se",13)(4,dd,2,0,"se",14),f()),c&2){let m=w();M("formGroup",m.form),y(3),M("ngIf",m.isNew()),y(),M("ngIf",m.isNew())}}function cd(c,l){if(c&1){let m=L();p(0,"div",19)(1,"button",20),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var fd=()=>({front:!1}),Hs="\u65B0\u5EFA\u79DF\u6237",pd="\u7F16\u8F91\u79DF\u6237",Bs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.url="/api/multi-tenancy/tenants",this.drawerVisible=!1,this.defaultCheckedKeys=[],this.pageIndex=1,this.pageSize=10,this.total=0,this.filter="",this.title="",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>this.edit(n.id)},{text:"\u5220\u9664",pop:!0,click:n=>this.delete(n.id)}]},{title:"\u79DF\u6237\u540D\u79F0",index:"name"},{title:"\u79DF\u6237ID",index:"id"}],this.form=this.fb.group({id:[],name:["",A.required("E0001","\u79DF\u6237\u540D\u79F0")],adminEmailAddress:[,A.other(n=>this.isNew()?A.required("E0001","\u7BA1\u7406\u5458\u90AE\u7BB1")(n):null)],adminPassword:[,A.other(n=>this.isNew()?A.required("E0001","\u7BA1\u7406\u5458\u5BC6\u7801")(n):null)]})}ngOnInit(){this.getTenantList(this.pageIndex,this.pageSize,this.filter)}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getTenantList(this.pageIndex,this.pageSize,this.filter)}getTenantList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.tenantList=_.items,this.total=_.totalCount})}add(){this.title=Hs,this.drawerVisible=!0}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue(),o=this.form.getRawValue().id;o?this.http.put(`${this.url}/${o}`,n).subscribe(a=>Qe(this,null,function*(){this.drawerVisible=!1,this.form.reset(),this.baseService.showMessage({messageId:"C0003"}),this.st.reload()})):this.http.post(this.url,n).subscribe(a=>Qe(this,null,function*(){this.drawerVisible=!1,this.form.reset(),this.baseService.showMessage({messageId:"C0003"}),this.st.reload()}))}edit(n){this.title=pd,this.http.get(`${this.url}/${n}`).subscribe(o=>{this.form.patchValue(Object.assign(o,{})),this.drawerVisible=!0,this.st.reload()})}delete(n){this.http.delete(`${this.url}/${n}`).subscribe(o=>{this.st.reload()})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getTenantList(this.pageIndex,this.pageSize,this.filter))}isNew(){return this.title==Hs}close(){this.drawerVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-tenant-manage"]],viewQuery:function(o,a){if(o&1&&(q(od,5),q(ad,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u79DF\u6237\u540D\u79F0","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u79DF\u6237\u540D\u79F0"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required","",4,"ngIf"],["label","\u7BA1\u7406\u5458\u5BC6\u7801","autoErrorTip","","required","",4,"ngIf"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","adminEmailAddress","placeholder","\u7BA1\u7406\u5458\u90AE\u7BB1"],["label","\u7BA1\u7406\u5458\u5BC6\u7801","autoErrorTip","","required",""],["nz-input","","type","password","formControlName","adminPassword","placeholder","\u7BA1\u7406\u5458\u5BC6\u7801"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,ld,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,md,5,3,"form",7)(10,cd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.tenantList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,fd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.drawerVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,Ri,at,nt,st,ot,lt,ut,Ge,Ae,Re,ct,ft,mt,Ue,He,Be,dt,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var hd=["tree"],Rr=(()=>{let l=class l{constructor(){this.http=v(K),this.role=v(Nr),this.defaultCheckedKeys=[],this.defaultSelectedKeys=[],this.defaultExpandedKeys=[],this.nodes=[],this.permissions=[]}ngOnInit(){let n=`/api/permission-management/permissions?providerName=R&providerKey=${this.role}`;this.http.get(n).subscribe(o=>{console.log(o),this.nodes=[...o.groups.map(a=>({title:a.displayName,key:a.name,children:a.permissions.filter(d=>!d.parentName).map(d=>({title:d.displayName,key:d.name,children:a.permissions.filter(_=>_.parentName==d.name).map(_=>({title:_.displayName,key:_.name,isLeaf:!0}))}))}))],o.groups.forEach(a=>{a.permissions.forEach(d=>{d.isGranted==!0&&d.parentName!=null?this.defaultCheckedKeys.push(d.name):d.isGranted==!0&&d.parentName==null&&a.permissions.findIndex(N=>N.parentName==d.name&&N.isGranted==!1)==-1&&this.defaultCheckedKeys.push(d.name)})}),this.defaultCheckedKeys=[...this.defaultCheckedKeys]})}nzEvent(n){if(n.eventName=="check"){this.permissions=[];var o=[];n.checkedKeys?.forEach(a=>{a.level!=0&&o.push(a.key),a.children&&a.children.forEach(d=>{o.push(d.key),d.children&&d.children.forEach(_=>{o.push(_.key)})})}),o.forEach(a=>{this.defaultCheckedKeys.includes(a)||this.permissions.push({name:a,isGranted:!0})}),this.defaultCheckedKeys.forEach(a=>{o.includes(a)||this.permissions.push({name:a,isGranted:!1})})}}getPermissions(){let n=this.tree.getCheckedNodeList(),o=this.tree.getHalfCheckedNodeList();this.permissions=[];let a=[];return n.forEach(d=>{d.level!=0&&a.push(d.key),d.children&&d.children.forEach(_=>{a.push(_.key),_.children&&_.children.forEach(N=>{a.push(N.key)})})}),o.forEach(d=>{d.level!=0&&a.push(d.key)}),a.forEach(d=>{this.defaultCheckedKeys.includes(d)||this.permissions.push({name:d,isGranted:!0})}),this.defaultCheckedKeys.forEach(d=>{a.includes(d)||this.permissions.push({name:d,isGranted:!1})}),this.permissions}aaa(){console.log(this.tree.getCheckedNodeList()),console.log(this.tree.getHalfCheckedNodeList())}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-perms-setting"]],viewQuery:function(o,a){if(o&1&&q(hd,5),o&2){let d;j(d=Q())&&(a.tree=d.first)}},standalone:!0,features:[X],decls:3,vars:4,consts:[["nzCheckable","","nzMultiple","",3,"nzData","nzCheckedKeys","nzExpandedKeys","nzSelectedKeys","nzCheckBoxChange"],["tree",""]],template:function(o,a){o&1&&(p(0,"nz-card")(1,"nz-tree",0,1),T("nzCheckBoxChange",function(_){return a.nzEvent(_)}),f()()),o&2&&(y(),M("nzData",a.nodes)("nzCheckedKeys",a.defaultCheckedKeys)("nzExpandedKeys",a.defaultExpandedKeys)("nzSelectedKeys",a.defaultSelectedKeys))},dependencies:[$e,Vr,Ie,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var gd=["sf"],yd=["tree"],Md=["st"];function Sd(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}if(c&2){let m=w();M("acl",m.newAcl)}}function zd(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"label",14),f(),p(5,"se",15),b(6,"label",16),f()()),c&2){let m=w();M("formGroup",m.form)}}function Cd(c,l){if(c&1){let m=L();p(0,"div",17)(1,"button",18),T("click",function(){k(m);let o=w();return E(o.submit())}),C(2,"\u786E\u5B9A"),f()()}}var Nd=()=>({front:!1}),Us=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.newAcl={ability:["AbpIdentity.Roles.Create"]},this.url="/api/identity/roles",this.drawerVisible=!1,this.defaultCheckedKeys=[],this.pageIndex=1,this.pageSize=10,this.total=0,this.filter="",this.title="",this.form=this.fb.group({id:[],name:["",A.required("E0001","\u89D2\u8272\u540D\u79F0")],isDefault:[!1],isPublic:[!0]}),this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u6743\u9650",acl:{ability:["SettingSys.RolePermission"]},click:n=>this.permissionEdit(n.name)},{text:"\u7F16\u8F91",acl:{ability:["AbpIdentity.Roles.Update"]},iif:n=>!n.isStatic,click:n=>this.edit(n.id)},{text:"\u5220\u9664",acl:{ability:["AbpIdentity.Roles.Delete"]},iif:n=>!n.isStatic,click:n=>this.delete(n.id)}]},{title:"\u89D2\u8272\u540D\u79F0",index:"name"},{title:"\u9ED8\u8BA4",index:"isDefault",type:"yn"},{title:"\u516C\u5171",index:"isPublic",type:"yn"}]}ngOnInit(){this.getRoleList(this.pageIndex,this.pageSize,this.filter)}roleChange(n){n.type=="radio"&&(this.currentRole=n.radio)}getRoleList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.roleList=_.items,this.total=_.totalCount})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getRoleList(this.pageIndex,this.pageSize,this.filter))}reset(){this.pageIndex=1,this.pageSize=10,this.getRoleList(this.pageIndex,this.pageSize,this.filter)}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getRoleList(this.pageIndex,this.pageSize,this.filter)}add(){this.title="\u65B0\u589E\u89D2\u8272",this.drawerVisible=!0}refresh(){this.st.reload()}save(){var n=[],o=[];if(this.tree.getCheckedNodeList().forEach(a=>{o.push(a.key)}),this.tree.getHalfCheckedNodeList().forEach(a=>{n.push(a.key)}),this.currentRole){let a={roleValue:this.currentRole.name,checkedMenus:o,halfCheckedMenus:n};this.http.post("/api/main/menu/role-as-menu",a).subscribe(d=>{console.log(d),this.baseService.showMessage({messageId:"C0003"})})}}edit(n){this.title="\u7F16\u8F91\u89D2\u8272",this.http.get(`${this.url}/${n}`).subscribe(o=>{this.form.patchValue(Object.assign(o,{})),this.drawerVisible=!0,this.st.reload()})}delete(n){this.baseService.showConfirm({message:this.baseService.getMessage("C0001"),okCallback:()=>{this.http.delete(`${this.url}/${n}`).subscribe(o=>{this.st.reload()})}})}permissionEdit(n){let o=this.modalService.create({nzTitle:"\u6743\u9650\u7F16\u8F91",nzContent:Rr,nzWidth:480,nzData:n,nzOnOk:a=>{let d={permissions:a.getPermissions()};console.log(d),this.http.put(`/api/permission-management/permissions?providerName=R&providerKey=${n}`,d).subscribe(_=>{})}})}submit(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.form.reset({isDefault:!1,isPublic:!0}),this.drawerVisible=!1,this.st.reload()}):this.http.post(this.url,n).subscribe(o=>{this.form.reset({isDefault:!1,isPublic:!0}),this.drawerVisible=!1,this.st.reload()})}close(){this.drawerVisible=!1}nzEvent(n){this.selectedKeys=n.keys}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-role-manage"]],viewQuery:function(o,a){if(o&1&&(q(gd,5),q(yd,5),q(Md,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.tree=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"acl","click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u89D2\u8272","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u89D2\u8272\u540D\u79F0"],["label","\u9ED8\u8BA4"],["nz-checkbox","","formControlName","isDefault"],["label","\u516C\u5F00"],["nz-checkbox","","formControlName","isPublic"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,Sd,2,1,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,zd,7,1,"form",7)(10,Cd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.roleList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,Nd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.drawerVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,at,nt,st,ot,lt,ut,Cr,Ge,Ae,Re,ct,ft,mt,Ue,He,Be,dt,Ie,Ke,Ze,ks,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var vd=["sf"],Dd=["st"];function bd(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}if(c&2){let m=w();M("acl",m.newAcl)}}function wd(c,l){if(c&1&&b(0,"nz-option",26),c&2){let m=l.$implicit,n=w(2);M("nzLabel",m.name)("nzValue",m.name)("nzHide",!n.isNotSelected(m))}}function Td(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"input",14),f(),p(5,"se",15),b(6,"input",16),f(),p(7,"se",17),b(8,"input",18),f(),p(9,"se",19),b(10,"input",20),f(),p(11,"se",21)(12,"nz-select",22),O(13,wd,1,3,"nz-option",23),f()(),p(14,"se",24),b(15,"nz-switch",25),f()()),c&2){let m=w();M("formGroup",m.form),y(3),M("required",m.isNew()),y(10),M("ngForOf",m.roleOfOption)}}function xd(c,l){if(c&1){let m=L();p(0,"div",27)(1,"button",28),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var kd=()=>({front:!1}),Ed="\u7F16\u8F91\u7528\u6237",bn="\u65B0\u589E\u7528\u6237",Gs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.notification=v(Dr),this.newAcl={ability:["AbpIdentity.Users.Create"]},this.editVisible=!1,this.title="",this.url="/api/identity/users",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",acl:{ability:["AbpIdentity.Users.Update"]},click:n=>this.edit(n)},{text:"\u5220\u9664",acl:{ability:["AbpIdentity.Users.Delete"]},pop:!0,click:n=>this.delete(n)}]},{title:"\u767B\u5F55\u8D26\u6237",index:"userName"},{title:"\u59D3\u540D",index:"name"},{title:"\u90AE\u7BB1",index:"email"},{title:"\u624B\u673A\u53F7",index:"phoneNumber"},{title:"\u521B\u5EFA\u65F6\u95F4",index:"creationTime",type:"date",dateFormat:"yyyy-MM-dd",width:100},{title:"\u6709\u6548\u6027",index:"isActive",type:"badge",badge:{true:{text:"\u6709\u6548",color:"success"},false:{text:"\u65E0\u6548",color:"default"}}}],this.form=this.fb.group({id:[],userName:[,A.required("E0001","\u767B\u5F55\u8D26\u6237")],password:[,A.other(n=>this.isNew()?A.required("E0001","\u767B\u5F55\u8D26\u6237")(n):null)],name:[,A.required("E0001","\u59D3\u540D")],surname:[],email:[,A.email("E0003","\u90AE\u7BB1")],phoneNumber:[],lockoutEnabled:[!0],isActive:[!0],roleNames:[]}),this.loading=!1,this.pageIndex=1,this.pageSize=10,this.filter="",this.total=0,this.roleOfSelectedValue=[]}ngOnInit(){this.getRoles(),this.getUserList(this.pageIndex,this.pageSize,this.filter)}getRoles(){this.http.get("/api/identity/users/assignable-roles").subscribe(n=>{this.roleOfOption=n.items})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getUserList(this.pageIndex,this.pageSize,this.filter))}reset(){this.pageIndex=1,this.pageSize=10,this.getUserList(this.pageIndex,this.pageSize,"")}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getUserList(this.pageIndex,this.pageSize,this.filter)}getUserList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.userList=_.items,this.total=_.totalCount})}add(){this.title=bn,this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!0}edit(n){this.http.get(`${this.url}/${n.id}/roles`).subscribe(o=>{this.roleOfSelectedValue=o.items.map(a=>a.name),n.roleNames=this.roleOfSelectedValue,this.form.reset({}),this.form.patchValue(n),this.title=Ed,this.editVisible=!0})}delete(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>{this.reset()})}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();this.title==bn?this.http.post(`${this.url}`,n).subscribe(o=>{this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!1,this.reset()}):this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!1,this.reset()})}isNotSelected(n){return this.roleOfSelectedValue.indexOf(n)===-1}close(){this.editVisible=!1}isNew(){return this.title==bn}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-user-manage"]],viewQuery:function(o,a){if(o&1&&(q(vd,5),q(Dd,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"acl","click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u767B\u5F55\u8D26\u6237","autoErrorTip","","required",""],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237"],["label","\u767B\u5F55\u5BC6\u7801","autoErrorTip","",3,"required"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801"],["label","\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","email","placeholder","\u90AE\u7BB1"],["label","\u59D3\u540D","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u59D3\u540D"],["label","\u624B\u673A\u53F7"],["nz-input","","formControlName","phoneNumber","placeholder","\u624B\u673A\u53F7"],["label","\u89D2\u8272"],["nzMode","multiple","nzPlaceHolder","\u6388\u6743\u89D2\u8272","formControlName","roleNames"],[3,"nzLabel","nzValue","nzHide",4,"ngFor","ngForOf"],["label","\u6709\u6548\u6027"],["formControlName","isActive"],[3,"nzLabel","nzValue","nzHide"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,bd,2,1,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,Td,16,3,"form",7)(10,xd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.userList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,kd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.editVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,yi,at,nt,st,ot,lt,ut,Cr,Ge,Ae,Re,ct,ft,Ps,mt,Ue,He,Be,dt,Ai,Li,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Fd=["st"];function Od(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function Vd(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"input",14),f(),p(5,"se",15),b(6,"input",16),f()()),c&2){let m=w();M("formGroup",m.form)}}function Pd(c,l){if(c&1){let m=L();p(0,"div",17)(1,"button",18),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var Id=()=>({list:"items",total:"totalCount"}),$s=c=>({reName:c}),Yd=()=>({pi:"skipCount",ps:"maxResultCount"}),qs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.url="/api/main/organ-info",this.searchSchema={properties:{type:{type:"number",title:"\u72B6\u6001",enum:[{label:"\u5168\u90E8",value:99},{label:"\u672A\u5BA1\u6838",value:0},{label:"\u5BA1\u6838\u672A\u901A\u8FC7",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:9}],default:99},filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>{this.edit(n)}},{text:"\u5220\u9664",pop:!0,click:n=>{this.delete(n)}}]},{title:"\u673A\u6784\u540D\u79F0",index:"organName"},{title:"\u7BA1\u7406\u5458\u8D26\u6237",index:"adminName"},{title:"\u7BA1\u7406\u5458\u90AE\u7BB1",index:"adminEmail"},{title:"\u7BA1\u7406\u5458\u7535\u8BDD",index:"adminTel"},{title:"\u7533\u8BF7\u65F6\u95F4",index:"begntime",type:"date",dateFormat:"yyyy-MM-dd",width:120},{title:"\u72B6\u6001",index:"organStatusDisplay"}],this.editVisible=!1,this.title="",this.loading=!1,this.form=this.fb.group({id:[],organName:[,A.required("E0001","\u673A\u6784\u540D\u79F0")],adminTel:[,A.required("E0001","\u7BA1\u7406\u5458\u7535\u8BDD")],adminEmail:[,A.required("E0001","\u7BA1\u7406\u5458\u90AE\u7BB1")]})}ngOnInit(){}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.reset()}):this.http.post(this.url,n).subscribe(o=>{this.reset()})}reset(){this.editVisible=!1,this.st.reload()}add(){this.editVisible=!0,this.form.reset()}edit(n){this.editVisible=!0,this.http.get(`${this.url}/${n.id}`).subscribe(o=>{this.form.patchValue(o)})}delete(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>{this.st.reload()})}review(n){this.http.put(`/api/main/organ/${n.id}/review-organ`,{}).subscribe(o=>{this.st.reload()})}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-organ-manage"]],viewQuery:function(o,a){if(o&1&&q(Fd,5),o&2){let d;j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:17,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","res","req"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u673A\u6784\u540D\u79F0","autoErrorTip","","required",""],["nz-input","","formControlName","organName","placeholder","\u673A\u6784\u540D\u79F0"],["label","\u7BA1\u7406\u5458\u7535\u8BDD","autoErrorTip","","required",""],["nz-input","","formControlName","adminTel","placeholder","\u7BA1\u7406\u5458\u7535\u8BDD"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","adminEmail","placeholder","\u7BA1\u7406\u5458\u90AE\u7BB1"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,Od,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(N){k(d);let W=P(7);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(7);return E(W.reset(N))}),f(),b(6,"st",4,5),f(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,Vd,7,1,"form",7)(10,Pd,3,0,"ng-template",null,8,B),f()}if(o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("res",rt(12,$s,We(11,Id)))("req",rt(15,$s,We(14,Yd))),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.editVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[se,at,nt,st,ot,oe,lt,ut,De,Ae,ye,Re,we,ct,ft,Te,be,Ne,Ge,ne,he,ge,Oe,Ce,Se,mt,Me,te,Ue,He,Be,fe,dt,pe,xe,Fe,de,ke,ze,Ie,ue,_e,ce,Ee,re,Ke,Ze,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Rd=["sf"];function Ad(c,l){if(c&1){let m=L();p(0,"button",11),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function Ld(c,l){if(c&1&&b(0,"nz-option",34),c&2){let m=l.$implicit;M("nzValue",m.id)("nzLabel",m.organName)}}function Wd(c,l){if(c&1&&b(0,"nz-option",34),c&2){let m=l.$implicit;M("nzValue",m.dataDictCode)("nzLabel",m.dataDictName)}}var Hd=c=>({process:c});function Bd(c,l){if(c&1){let m=L();p(0,"form",12)(1,"se",13)(2,"nz-select",14),O(3,Ld,1,2,"nz-option",15),f()(),p(4,"se",16),b(5,"input",17),f(),p(6,"se",18),b(7,"input",19),f(),p(8,"se",20),b(9,"input",21),f(),p(10,"se",22),b(11,"nz-input-number",23),f(),p(12,"se",24)(13,"nz-select",25),T("ngModelChange",function(o){k(m);let a=w();return E(a.selecteOptionChange(o,0))}),O(14,Wd,1,2,"nz-option",15),f()(),p(15,"se",26),b(16,"nz-date-picker",27),f(),p(17,"se",28),b(18,"nz-date-picker",29),f(),p(19,"se",30),b(20,"input",31),f(),b(21,"nz-divider"),p(22,"st",32,33),T("change",function(o){k(m);let a=w();return E(a.propertyChange(o))}),f()()}if(c&2){let m=w();M("formGroup",m.editForm),y(3),M("ngForOf",m.organList),y(8),M("nzStep",1)("nzMin",0)("nzPrecision",2),y(3),M("ngForOf",m.catyList),y(8),M("data",m.propertyList)("columns",m.propertyColumns)("res",rt(9,Hd,m.dataProcess))}}function Ud(c,l){if(c&1){let m=L();p(0,"div",35)(1,"button",36),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",11),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}function Gd(c,l){if(c&1){let m=L();p(0,"tr")(1,"td")(2,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.addChild(o))}),C(3,"\u65B0\u589E\u5B50\u9879"),f(),b(4,"nz-divider",39),p(5,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.edit(o))}),C(6,"\u7F16\u8F91"),f(),b(7,"nz-divider",39),p(8,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.del(o))}),C(9,"\u5220\u9664"),f()(),p(10,"td",40),T("nzExpandChange",function(o){k(m);let a=w().$implicit;return E(a.expand=o)})("nzExpandChange",function(o){k(m);let a=w().$implicit,d=w().$implicit,_=w();return E(_.collapse(_.mapOfExpandedData[d.id],a,o))}),C(11),f(),p(12,"td"),C(13),f(),p(14,"td"),C(15),f(),p(16,"td"),C(17),f()()}if(c&2){let m=w().$implicit;y(10),M("nzIndentSize",m.level*20)("nzShowExpand",!!m.children&&m.children.length!=0)("nzExpand",m.expand),y(),zr(" ",m.deptName," "),y(2),Z(m.deptCodg),y(2),Z(m.srtNo),y(2),Z(m.itro)}}function $d(c,l){if(c&1&&(Ii(0),O(1,Gd,18,7,"tr",37),Yi()),c&2){let m=l.$implicit;y(),M("ngIf",m.parent&&m.parent.expand||!m.parent)}}function qd(c,l){if(c&1&&(Ii(0),O(1,$d,2,1,"ng-container",10),Yi()),c&2){let m=l.$implicit,n=w();y(),M("ngForOf",n.mapOfExpandedData[m.id])}}var jd="\u65B0\u589E\u90E8\u95E8\u4FE1\u606F",Qd="\u4FEE\u6539\u90E8\u95E8\u4FE1\u606F",js=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.settings=v(vr),this.url="/api/main/dept-info",this.deptList=[],this.editVisible=!1,this.detailTitle="",this.filter="",this.mapOfExpandedData={},this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.editForm=this.fb.group({id:[],parentId:[""],parentName:[""],organId:[null,A.required("E0001","\u6240\u5C5E\u673A\u6784")],deptCodg:[null,A.required("E0001","\u90E8\u95E8\u7F16\u7801")],deptName:[null,A.required("E0001","\u90E8\u95E8\u540D\u79F0")],deptAssocAttrs:[],srtNo:[0],begntime:[,A.required("E0001","\u5F00\u59CB\u65F6\u95F4")],endtime:[],itro:[],catyCode:[,A.required("E0001","\u79D1\u522B")],catyName:[,A.required("E0001","\u79D1\u522B")],memo:[]}),this.propertyColumns=[{title:"\u7F16\u53F7",index:"value.id",type:"checkbox"},{title:"\u5C5E\u6027\u4EE3\u7801",index:"deptAttrCodg"},{title:"\u5C5E\u6027\u540D\u79F0",index:"deptAttrName"},{title:"\u8BF4\u660E",index:"exp"}]}ngOnInit(){this.getOrganList(),this.currentOrgan=this.settings.user.currentOrgan,this.getDeptmentProperty([]),this.getDataDictList(),this.editForm.get("parentName")?.disable(),this.editForm.get("organId")?.disable(),this.getDeptList(this.filter)}getDataDictList(){var n="/api/main/data-dict/grp-dict-list?DataDictTypeCode=caty";this.http.get(n).subscribe(o=>{this.catyList=o.caty})}getOrganList(){this.http.get("/api/main/organ-info").subscribe(n=>{this.organList=n.items})}search(){this.filter=this.sf.value.filter,this.getDeptList(this.filter)}getDeptList(n){let o={filter:n??"",organId:this.currentOrgan.id};this.http.get(this.url,o).subscribe(a=>{this.deptList=a,this.deptList.forEach(d=>{this.mapOfExpandedData[d.id]=this.convertTreeToList(d)})})}add(){this.currentOrgan!=null&&(this.editForm.reset({organId:this.currentOrgan.id}),this.editVisible=!0,this.detailTitle=jd)}addChild(n){this.add(),this.editForm.patchValue({parentId:n.id,parentName:n.deptName})}edit(n){this.http.get(`${this.url}/${n.id}`).subscribe(o=>{this.editForm.patchValue(o),this.editVisible=!0,this.detailTitle=Qd,this.getDeptmentProperty(o.deptAssocAttrs)})}save(){if(this.baseService.hasError(this.editForm))return;let n=this.editForm.getRawValue();n.deptAssocAttrs=this.propertyCheckedList?.map(o=>({deptAttrId:o.id})),n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter),this.getDeptmentProperty([]),this.close()})):this.http.post(this.url,n).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter),this.getDeptmentProperty([]),this.close()}))}del(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter)}))}close(){this.editVisible=!1}convertTreeToList(n){let o=[],a=[],d={};for(o.push(Pi(gi({},n),{level:0,expand:!1}));o.length!==0;){let _=o.pop();if(this.visitNode(_,d,a),_.children)for(let N=_.children.length-1;N>=0;N--)o.push(Pi(gi({},_.children[N]),{level:_.level+1,expand:!1,parent:_}))}return a}visitNode(n,o,a){o[n.id]||(o[n.id]=!0,a.push(n))}collapse(n,o,a){if(!a)if(o.children)o.children.forEach(d=>{let _=n.find(N=>N.id===d.id);_.expand=!1,this.collapse(n,_,!1)});else return}selecteOptionChange(n,o){switch(o){case 0:if(this.catyList){let a=this.catyList.find(d=>d.dataDictCode==n);a&&this.editForm.patchValue({catyName:a.dataDictName})}break}}getDeptmentProperty(n){}dataProcess(n){return n.map((o,a)=>(o.checked=o.isChecked,o))}propertyChange(n){n.type=="checkbox"&&(this.propertyCheckedList=n.checkbox)}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-dept-manage"]],viewQuery:function(o,a){if(o&1&&q(Rd,5),o&2){let d;j(d=Q())&&(a.sf=d.first)}},standalone:!0,features:[X],decls:28,vars:10,consts:[[3,"action"],["phActionTpl",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-col","","nzXs","24","nzSm","24","nzMd","8"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["nzTableLayout","fixed",2,"margin-top","1.5rem",3,"nzData","nzSize"],["expandTable",""],[4,"ngFor","ngForOf"],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u6240\u5C5E\u673A\u6784","required","","autoErrorTip",""],["formControlName","organId","nzPlaceHolder","\u6240\u5C5E\u673A\u6784"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["label","\u4E0A\u7EA7\u90E8\u95E8"],["nz-input","","formControlName","parentName","placeholder","-"],["label","\u79D1\u5BA4\u7F16\u7801","required","","autoErrorTip",""],["nz-input","","formControlName","deptCodg","placeholder","\u79D1\u5BA4\u7F16\u7801"],["label","\u79D1\u5BA4\u540D\u79F0","required","","autoErrorTip",""],["nz-input","","formControlName","deptName","placeholder","\u79D1\u5BA4\u540D\u79F0"],["label","\u6392\u5E8F\u53F7","required","","autoErrorTip",""],["formControlName","srtNo","nzInputMode","decimal",1,"wp100",3,"nzStep","nzMin","nzPrecision"],["label","\u79D1\u522B","required","","autoErrorTip",""],["formControlName","catyCode","nzPlaceHolder","\u79D1\u522B",3,"ngModelChange"],["label","\u5F00\u59CB\u65F6\u95F4","required","","autoErrorTip",""],["formControlName","begntime","nzPlaceHolder","\u5F00\u59CB\u65F6\u95F4",1,"width-100"],["label","\u7ED3\u675F\u65F6\u95F4","autoErrorTip",""],["formControlName","endtime","nzPlaceHolder","\u7ED3\u675F\u65F6\u95F4",1,"width-100"],["label","\u7B80\u4ECB"],["nz-input","","formControlName","itro","placeholder","\u7B80\u4ECB"],["size","small",1,"width-100",3,"data","columns","res","change"],["propertySt",""],[3,"nzValue","nzLabel"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"],[4,"ngIf"],[3,"click"],["nzType","vertical"],[3,"nzIndentSize","nzShowExpand","nzExpand","nzExpandChange"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,Ad,2,0,"ng-template",null,1,B),f(),p(3,"div")(4,"nz-drawer",2),T("nzOnClose",function(){return a.close()}),p(5,"div",3),O(6,Bd,24,11,"form",4),f(),O(7,Ud,5,0,"ng-template",null,5,B),f()(),p(9,"nz-card")(10,"sf",6,7),T("formSubmit",function(){return a.search()}),f(),p(12,"nz-table",8,9)(14,"thead")(15,"tr")(16,"th"),C(17,"\u64CD\u4F5C"),f(),p(18,"th"),C(19,"\u90E8\u95E8\u540D\u79F0"),f(),p(20,"th"),C(21,"\u90E8\u95E8\u4EE3\u7801"),f(),p(22,"th"),C(23,"\u6392\u5E8F\u53F7"),f(),p(24,"th"),C(25,"\u7B80\u4ECB"),f()()(),p(26,"tbody"),O(27,qd,2,1,"ng-container",10),f()()()),o&2){let d=P(2),_=P(8),N=P(13);M("action",d),y(4),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",_),y(6),M("schema",a.searchSchema),y(2),M("nzData",a.deptList)("nzSize","small"),y(15),M("ngForOf",N.data)}},dependencies:[$e,Dt,yi,Ri,at,nt,st,ot,lt,ut,Ge,Ae,Re,ct,ft,Or,Wi,Vs,mt,Ue,He,Be,dt,Os,Ai,Li,Ie,xr,br,Tr,wr,Fr,kr,Er,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Ar=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.auditlog=v(Nr),this.auditLogActionInfoColumns=[{title:"\u670D\u52A1\u7684\u540D\u79F0",index:"serviceName"},{title:"\u65B9\u6CD5\u7684\u540D\u79F0",index:"methodName"},{title:"\u53C2\u6570\u7684JSON",index:"parameters"},{title:"\u6267\u884C\u7684\u65F6\u95F4",index:"executionTime"},{title:"\u65B9\u6CD5\u6267\u884C\u65F6\u957F",index:"executionDuration"}],this.entityChangeInfoColumns=[{title:"\u5B9E\u4F53\u88AB\u6539\u53D8\u7684\u65F6\u95F4",index:"changeTime"},{title:"\u65B9\u6CD5\u7684\u540D\u79F0",index:"changeType"},{title:"\u66F4\u6539\u5B9E\u4F53\u7684Id",index:"entityId"},{title:"\u5B9E\u4F53\u6240\u5C5E\u7684\u79DF\u6237Id",index:"entityTenantId"},{title:"\u5B9E\u4F53\u7684\u7C7B\u578B",index:"entityTypeFullName"}]}ngOnInit(){}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-audit-log-detl"]],standalone:!0,features:[X],decls:42,vars:19,consts:[["labelWidth","120"],["label","\u5E94\u7528\u7A0B\u5E8F"],["label","\u7528\u6237\u7684Id"],["label","\u7528\u6237\u540D"],["label","\u5F53\u524D\u79DF\u6237"],["label","\u79DF\u6237\u7684\u540D\u79F0"],["label","\u521B\u5EFA\u7684\u65F6\u95F4"],["label","\u6267\u884C\u65F6\u95F4"],["label","\u5BA2\u6237\u7AEF\u7684Id"],["label","\u5BA2\u6237\u7AEF\u7684\u540D\u79F0"],["label","\u5BA2\u6237\u7AEFIP\u5730\u5740"],["label","\u5F53\u524D\u76F8\u5173Id"],["label","\u6D4F\u89C8\u5668\u540D\u79F0"],["label","HTTP\u8BF7\u6C42\u7684\u65B9\u6CD5"],["label","\u54CD\u5E94\u72B6\u6001\u7801"],["label","\u8BF7\u6C42\u7684URL"],["col","1","hideLabel",""],["size","small",2,"width","100%",3,"data","columns"],["hideLabel","","col","1"]],template:function(o,a){o&1&&(p(0,"sv-container",0)(1,"sv-title"),C(2,"AuditLogInfo"),f(),p(3,"sv",1),C(4),f(),p(5,"sv",2),C(6),f(),p(7,"sv",3),C(8),f(),p(9,"sv",4),C(10),f(),p(11,"sv",5),C(12),f(),p(13,"sv",6),C(14),f(),p(15,"sv",7),C(16),f(),p(17,"sv",8),C(18),f(),p(19,"sv",9),C(20),f(),p(21,"sv",10),C(22),f(),p(23,"sv",11),C(24),f(),p(25,"sv",12),C(26),f(),p(27,"sv",13),C(28),f(),p(29,"sv",14),C(30),f(),p(31,"sv",15),C(32),f(),b(33,"nz-divider"),p(34,"sv-title"),C(35,"AuditLogActionInfo"),f(),p(36,"sv",16),b(37,"st",17),f(),p(38,"sv-title"),C(39,"EntityChangeInfo"),f(),p(40,"sv",18),b(41,"st",17),f()()),o&2&&(y(4),Z(a.auditlog.applicationName),y(2),Z(a.auditlog.userId),y(2),Z(a.auditlog.userName),y(2),Z(a.auditlog.tenantId),y(2),Z(a.auditlog.tenantName),y(2),Z(a.auditlog.executionTime),y(2),Z(a.auditlog.executionDuration),y(2),Z(a.auditlog.clientId),y(2),Z(a.auditlog.clientName),y(2),Z(a.auditlog.clientIpAddress),y(2),Z(a.auditlog.correlationId),y(2),Z(a.auditlog.browserInfo),y(2),Z(a.auditlog.httpMethod),y(2),Z(a.auditlog.httpStatusCode),y(2),Z(a.auditlog.url),y(5),M("data",a.auditlog.actions)("columns",a.auditLogActionInfoColumns),y(4),M("data",a.auditlog.entityChanges)("columns",a.entityChangeInfoColumns))},dependencies:[se,oe,De,ye,Re,we,Te,Ys,Rs,Is,be,Ne,ne,he,ge,Wi,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Zd=["sf"],Kd=["st"];function Jd(c,l){}var Xd=()=>({list:"items",total:"totalCount"}),em=c=>({reName:c}),Qs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.baseService=v(qe),this.notification=v(Dr),this.url="/api/main/audit-log",this.searchSchema={properties:{startTime:{type:"string",ui:{widget:"date",end:"endTime",separator:"\u5230"},format:"date",title:"\u65E5\u671F",default:new Date},endTime:{type:"string",default:new Date}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u67E5\u770B",click:n=>this.detl(n)}]},{title:"\u5E94\u7528\u7A0B\u5E8F",index:"applicationName"},{title:"URL",index:"url"},{title:"\u7528\u6237\u540D",index:"userName"},{title:"\u521B\u5EFA\u65F6\u95F4",index:"executionTime",type:"date",dateFormat:"yyyy-MM-dd HH:mm"},{title:"\u6267\u884C\u65F6\u95F4",index:"executionDuration"},{title:"IP\u5730\u5740",index:"clientIpAddress"},{title:"\u8BF7\u6C42\u7684\u65B9\u6CD5",index:"httpMethod"},{title:"\u72B6\u6001\u7801.",index:"httpStatusCode"}]}ngOnInit(){}detl(n){this.baseService.showModal({title:"\u5BA1\u8BA1\u65E5\u5FD7",widthClass:"xl",component:Ar,componentParams:n,footer:null,okCallBack:()=>{}})}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-audit-log"]],viewQuery:function(o,a){if(o&1&&(q(Zd,5),q(Kd,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:8,vars:8,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","res"],["st",""]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,Jd,0,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(N){k(d);let W=P(7);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(7);return E(W.reset(N))}),f(),b(6,"st",4,5),f()}if(o&2){let d=P(2);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("res",rt(6,em,We(5,Xd)))}},dependencies:[se,oe,De,Ae,ye,Re,we,Te,be,Ne,Ge,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,Ie,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var tm=["st"];function im(c,l){}function rm(c,l){if(c&1&&(p(0,"div"),b(1,"ag-grid-angular",8),f()),c&2){let m=w();y(),M("rowData",m.dataDictionaryList)("columnDefs",m.colDefs)}}function nm(c,l){if(c&1){let m=L();p(0,"div",9)(1,"button",10),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",11),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}var sm=()=>({list:"items",total:"totalCount"}),om=c=>({reName:c}),Zs="\u65B0\u589E\u5B57\u5178\u4FE1\u606F",am="\u4FEE\u6539\u5B57\u5178\u4FE1\u606F",Ks=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.baseService=v(qe),this.fb=v(Je),this.url="/api/main/data-dict-type",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u67E5\u770B",click:n=>this.detl(n)}]},{title:"\u7C7B\u578B\u4EE3\u7801",index:"dataDictTypeCode"},{title:"\u7C7B\u578B\u540D\u79F0",index:"dataDictTypeName"},{title:"\u6392\u5E8F\u53F7",index:"sotNo"},{title:"\u5206\u7EC4",index:"dataDictTypeModule"}],this.dataTypeNodes=[],this.editVisible=!1,this.detailTitle="",this.editForm=this.fb.group({dataDictionaryTypeValue:[],dataDictionaryTypeLabel:[],value:[],label:[],sort:[],valid:[]}),this.colDefs=[{headerName:"\u5B57\u5178\u7F16\u7801",width:120,field:"dataDictCode"},{headerName:"\u5B57\u5178\u540D\u79F0",field:"dataDictName"},{headerName:"\u6392\u5E8F\u53F7",field:"srtNo"}]}ngOnInit(){}treeGroupArr(n,o,a){var d=[],_=[];n.forEach(W=>{d.some(St=>St.id==W[o])||d.push({id:W[o],name:W[a]})});for(let W of d){var N=n.filter(St=>St[o]==W.id);_.push({key:W.id,title:W.name,children:N.map(St=>({title:`${St.dataDictTypeName}\uFF08${St.dataDictTypeCode}\uFF09`,key:St.dataDictTypeCode,isLeaf:!0}))})}return _}dataTypeChange(n){n.node.level==1?(this.dataTypeNode=n.node,this.getDataDictionaryList(this.dataTypeNode)):this.dataTypeNode=null}detl(n){this.editVisible=!0,this.detailTitle=n.dataDictTypeName+"\u5B57\u5178",this.getDataDictionaryList(n.dataDictTypeCode)}add(){this.dataTypeNode&&(this.editForm.reset(),this.editForm.patchValue({dataDictionaryTypeValue:this.dataTypeNode.key}),this.editVisible=!0,this.detailTitle=Zs,this.dataInfo=null)}edit(n){n.dataDictionaryTypeValue=this.dataTypeNode.key,this.editForm.patchValue(n),this.editVisible=!0,this.detailTitle=am,this.dataInfo=n}delete(n){}save(){if(this.baseService.hasError(this.editForm))return;let n="/api/main/data-dictionary",o=this.editForm.getRawValue();this.detailTitle==Zs?this.http.post(n,o).subscribe(a=>Qe(this,null,function*(){this.editVisible=!1,this.editForm.reset(),this.baseService.showMessage({messageId:"C0003"})})):this.http.put(`${n}/${this.dataInfo.id}`,o).subscribe(a=>Qe(this,null,function*(){this.editVisible=!1,this.editForm.reset(),this.baseService.showMessage({messageId:"C0003"})}))}getDataDictionaryList(n){var o={skipCount:1,maxResultCount:10,dataDictTypeValue:n};this.http.get("/api/main/data-dict",o).subscribe(a=>{this.dataDictionaryList=a.items})}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-data-dict"]],viewQuery:function(o,a){if(o&1&&q(tm,5),o&2){let d;j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:11,vars:13,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["size","small",3,"data","columns","res"],["st",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],[4,"nzDrawerContent"],["footerTpl",""],[1,"ag-theme-material",2,"height","500px",3,"rowData","columnDefs"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,im,0,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2),T("formSubmit",function(N){k(d);let W=P(6);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(6);return E(W.reset(N))}),f(),b(5,"st",3,4),f(),p(7,"nz-drawer",5),T("nzOnClose",function(){return a.close()}),O(8,rm,2,2,"div",6)(9,nm,5,0,"ng-template",null,7,B),f()}if(o&2){let d=P(2),_=P(10);M("action",d),y(4),M("schema",a.searchSchema),y(),M("data",a.url)("columns",a.columns)("res",rt(11,om,We(10,sm))),y(2),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",_)}},dependencies:[$e,As,Ge,Ae,Re,Ue,He,Be,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var lm=["sf"],um=["st"];function dm(c,l){if(c&1){let m=L();p(0,"button",17),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u589E"),f()}}function mm(c,l){c&1&&b(0,"span",18)}function cm(c,l){if(c&1&&b(0,"nz-option",35),c&2){let m=l.$implicit;M("nzValue",m.Code)("nzLabel",m.Name)}}function fm(c,l){if(c&1&&b(0,"nz-option",35),c&2){let m=l.$implicit;M("nzValue",m.id)("nzLabel",m.userName)}}function pm(c,l){if(c&1&&(p(0,"form",19)(1,"se",20),b(2,"input",21),f(),p(3,"se",22),b(4,"input",23),f(),p(5,"se",24)(6,"nz-select",25),O(7,cm,1,2,"nz-option",26),f()(),p(8,"se",27),b(9,"nz-date-picker",28),f(),p(10,"se",29),b(11,"input",30),f(),p(12,"se",31),b(13,"input",32),f(),p(14,"se",33)(15,"nz-select",34),O(16,fm,1,2,"nz-option",26),f()(),b(17,"nz-divider"),f()),c&2){let m=w();M("formGroup",m.form),y(7),M("ngForOf",m.genderList),y(2),M("nzDisabledDate",m.disabledEndDate),y(7),M("ngForOf",m.userList)}}function hm(c,l){if(c&1){let m=L();p(0,"div",36)(1,"button",37),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",17),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}var _m=()=>({pi:"skipCount",ps:"maxResultCount"}),Js=c=>({reName:c}),gm=()=>({list:"items",total:"totalCount"}),Xs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.settings=v(vr),this.url="/api/main/psn-info",this.deptUrl="/api/main/dept-info",this.accountSuffix="",this.searchSchema={properties:{deptId:{type:"string",title:"\u79D1\u5BA4id",visable:!1,ui:{hidden:!0},default:""},filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>this.editStaff(n)},{text:"\u5220\u9664",pop:!0,click:n=>this.delete(n)}]},{title:"\u4EBA\u5458\u7F16\u7801",index:"psnCodg"},{title:"\u4EBA\u5458\u59D3\u540D",index:"psnName"},{title:"\u6027\u522B",index:"gend",type:"enum",enum:{1:"\u7537",2:"\u5973"}},{title:"\u51FA\u751F\u65E5\u671F",index:"brdy",type:"date",dateFormat:"yyyy-MM-dd",width:100},{title:"\u8054\u7CFB\u7535\u8BDD",index:"tel"},{title:"\u8BC1\u4EF6\u53F7\u7801",index:"certno"}],this.isAdd=!1,this.editVisible=!1,this.detailTitle="\u4EBA\u5458\u4FE1\u606F\u8BE6\u7EC6",this.genderList=[{Code:1,Name:"\u7537"},{Code:2,Name:"\u5973"}],this.disabledEndDate=n=>!(n.getTime()<=new Date().getTime())}ngAfterViewInit(){}ngOnInit(){this.createForm(),this.getUserList(),this.getDeptList()}get reqParams(){return this.sf?gi({},this.sf.value):{}}getDeptList(){let n={organId:this.settings.user.currentOrgan.id};this.http.get(this.deptUrl,n).subscribe(o=>{this.deptList=[],o.map(a=>{this.deptList.push({title:`${a.deptCodg} - ${a.deptName}`,key:a.id,level:1,isLeaf:a.children.length==0,expanded:!0,children:a.children.map(d=>({title:`${d.deptCodg} - ${d.deptName}`,key:d.id,level:2,isLeaf:d.children.length==0,expanded:!0,children:d.children.map(_=>({title:`${_.deptCodg} - ${_.deptName}`,key:_.id,level:3,isLeaf:!0}))}))})})})}createForm(){this.form=this.fb.group({id:[],psnCodg:[,A.required("E0001","\u4EBA\u5458\u7F16\u53F7")],psnName:[,A.required("E0001","\u59D3\u540D")],gend:[,A.required("E0001","\u6027\u522B")],brdy:[],psnCertTypeValue:[],certno:[],pracPsnCode:[],profttlName:[],pinYinCode:[],userId:[],deptId:[],tel:[]}),this.form.get("pinYinCode")?.disable(),this.form.get("userName")?.disable(),this.form.get("pracPsnName")?.valueChanges.subscribe(n=>{setTimeout(()=>{})}),this.form.get("pracPsnNo")?.valueChanges.subscribe(n=>{n&&this.form.patchValue({userName:n+this.accountSuffix})})}add(){this.currentNode&&(this.form.reset({deptId:this.currentNode.key}),this.form.get("pracPsnNo")?.enable(),this.isAdd=!0,this.editVisible=!0)}getUserList(){this.http.get("/api/identity/users").subscribe(n=>{this.userList=n.items})}editStaff(n,o=!1){this.isAdd=!1,this.form.get("pracPsnNo")?.disable(),this.form.patchValue(n),this.editVisible=!0}delete(n){return Qe(this,null,function*(){yield Ns(this.http.delete(`${this.url}/${n.id}`)),this.st.reload()})}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.editVisible=!1,this.st.reload()}):this.http.post(this.url,n).subscribe(o=>{this.editVisible=!1,this.st.reload()})}deptChange(n){if(n.eventName="click"){this.currentNode=n.node,this.sf.setValue("/deptId",n.node.key);let o=this.sf.getValue("/filter");this.st.reset({deptId:n.node.key,filter:o})}}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-psn-manage"]],viewQuery:function(o,a){if(o&1&&(q(lm,5),q(um,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:21,vars:19,consts:[[3,"action"],["phActionTpl",""],[1,"dis-flex"],[1,"mr15"],[1,"card","default-min-height"],[2,"margin-bottom","1rem",3,"nzSuffix"],["type","text","nz-input","","placeholder","Search","ngModel",""],["suffixIcon",""],[3,"nzData","nzClick"],[1,"width-100"],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","req","res"],["st",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-icon","","nzType","search"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u4EBA\u5458\u7F16\u53F7","autoErrorTip","","required",""],["nz-input","","formControlName","psnCodg"],["label","\u4EBA\u5458\u59D3\u540D","autoErrorTip","","required",""],["nz-input","","formControlName","psnName"],["label","\u6027\u522B","autoErrorTip","","required",""],["formControlName","gend"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["label","\u51FA\u751F\u65E5\u671F","error","\u8BF7\u8F93\u5165\u51FA\u751F\u65E5\u671F"],["formControlName","brdy","nzPlaceHolder","\u51FA\u751F\u65E5\u671F",1,"width-100",3,"nzDisabledDate"],["label","\u8054\u7CFB\u7535\u8BDD"],["nz-input","","formControlName","tel","maxlength","50"],["label","\u8BC1\u4EF6\u53F7\u7801"],["nz-input","","formControlName","certno","maxlength","50"],["label","\u767B\u5F55\u7528\u6237"],["formControlName","userId"],[3,"nzValue","nzLabel"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,dm,2,0,"ng-template",null,1,B),f(),p(3,"div",2)(4,"div",3)(5,"nz-card",4)(6,"nz-input-group",5),b(7,"input",6),f(),O(8,mm,1,0,"ng-template",null,7,B),p(10,"nz-tree",8),T("nzClick",function(N){return a.deptChange(N)}),f()()(),p(11,"div",9)(12,"nz-card")(13,"sf",10,11),T("formSubmit",function(N){k(d);let W=P(16);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(16);return E(W.reset(N))}),f(),b(15,"st",12,13),f()()(),p(17,"nz-drawer",14),T("nzOnClose",function(){return a.close()}),O(18,pm,18,4,"form",15)(19,hm,5,0,"ng-template",null,16,B),f()}if(o&2){let d=P(2),_=P(9),N=P(20);M("action",d),y(6),M("nzSuffix",_),y(4),M("nzData",a.deptList),y(3),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("req",rt(14,Js,We(13,_m)))("res",rt(17,Js,We(16,gm))),y(2),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",N)}},dependencies:[$e,Dt,yi,at,nt,st,ot,Ts,ws,lt,ut,Ge,Ae,Re,ct,ft,Or,Wi,Vr,mt,Ue,He,Be,dt,Fs,Es,Ai,Li,Ie,Ke,Ze,Ds,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var ep=[{path:"menu-manage",component:Ls},{path:"tenant-manage",component:Bs},{path:"role-manage",component:Us},{path:"perms-setting",component:Rr},{path:"user-manage",component:Gs},{path:"organ-manage",component:qs},{path:"dept-manage",component:js},{path:"audit-log",component:Qs},{path:"audit-log-detl",component:Ar},{path:"data-dict",component:Ks},{path:"psn-manage",component:Xs}];export{ep as routes};
diff --git a/dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js b/dist/himp.platform.angular/browser/chunk-SIJVS6LY.js
similarity index 91%
rename from dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js
rename to dist/himp.platform.angular/browser/chunk-SIJVS6LY.js
index 8b456db..771af1e 100644
--- a/dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js
+++ b/dist/himp.platform.angular/browser/chunk-SIJVS6LY.js
@@ -1 +1 @@
-import{D as u,E as n,F as i,G as s,H as a,I as o,J as c,K as m,L as v}from"./chunk-OOUNO2UZ.js";var C=class{static num(r){return u(r.value)?null:{num:!0}}static int(r){return n(r.value)?null:{int:!0}}static decimal(r){return i(r.value)?null:{decimal:!0}}static idCard(r){return s(r.value)?null:{idCard:!0}}static mobile(r){return a(r.value)?null:{mobile:!0}}static url(r){return o(r.value)?null:{url:!0}}static ip(r){return c(r.value)?null:{ip:!0}}static color(r){return m(r.value)?null:{color:!0}}static chinese(r){return v(r.value)?null:{chinese:!0}}};function p(e,r){return l=>{let d=l.get(e),t=l.get(r);return t.errors&&!t.errors.matchControl||(d.value!==t.value?t.setErrors({matchControl:!0}):t.setErrors(null)),null}}export{C as a,p as b};
+import{D as u,E as n,F as i,G as s,H as a,I as o,J as c,K as m,L as v}from"./chunk-WD6SV3WH.js";var C=class{static num(r){return u(r.value)?null:{num:!0}}static int(r){return n(r.value)?null:{int:!0}}static decimal(r){return i(r.value)?null:{decimal:!0}}static idCard(r){return s(r.value)?null:{idCard:!0}}static mobile(r){return a(r.value)?null:{mobile:!0}}static url(r){return o(r.value)?null:{url:!0}}static ip(r){return c(r.value)?null:{ip:!0}}static color(r){return m(r.value)?null:{color:!0}}static chinese(r){return v(r.value)?null:{chinese:!0}}};function p(e,r){return l=>{let d=l.get(e),t=l.get(r);return t.errors&&!t.errors.matchControl||(d.value!==t.value?t.setErrors({matchControl:!0}):t.setErrors(null)),null}}export{C as a,p as b};
diff --git a/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js b/dist/himp.platform.angular/browser/chunk-TZPPFKXI.js
similarity index 97%
rename from dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js
rename to dist/himp.platform.angular/browser/chunk-TZPPFKXI.js
index 5efab61..5e64b2e 100644
--- a/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js
+++ b/dist/himp.platform.angular/browser/chunk-TZPPFKXI.js
@@ -1 +1 @@
-import{a as fe,e as he,j as Te}from"./chunk-HCPW2OGS.js";import{b as Ie}from"./chunk-2TNVIQ4O.js";import{$a as re,A as Ce,Aa as G,Ba as oe,C as _e,Ca as $,Da as q,Ea as j,Fa as W,Oa as ye,Pa as Ne,Sa as xe,Ta as Ee,Y as Se,Z as Fe,_ as be,ab as ne,bb as Me,cb as ke,d as ge,db as we,eb as De,fb as Be,gb as Ae,h as D,i as d,j as B,k as A,l as ze,la as O,lb as Pe,m as ve,na as U,o as P,oa as V,p as T,q as I,t as ie,v as R,za as L}from"./chunk-OOUNO2UZ.js";import{a as ee,b as w,c as te}from"./chunk-4FFPI7ZP.js";import{Db as S,Eb as u,Gb as K,Ge as de,He as F,Ib as X,Ie as b,Jb as C,Jc as M,Ka as r,Kb as ce,Kc as Q,Ke as y,Le as N,Ma as Y,Sb as _,Ta as f,V as H,Va as l,_a as ue,a as se,bb as h,gb as n,hb as s,ib as c,la as m,na as z,qb as v,rc as J,rf as k,sb as x,xf as Z}from"./chunk-VDRVUQCF.js";var Re=(()=>{let i=class i{constructor(){this.socialService=m(w),this.settingsSrv=m(k),this.type=""}ngOnInit(){this.mockModel()}mockModel(){let t={token:"123456789",name:"cipchk",email:`${this.type}@${this.type}.com`,id:1e4,time:+new Date};this.settingsSrv.setUser(se(se({},this.settingsSrv.user),t)),this.socialService.callback(t)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["app-callback"]],inputs:{type:"type"},standalone:!0,features:[X([w]),C],decls:0,vars:0,template:function(o,a){},encapsulation:2});let e=i;return e})();var Ge=(()=>{let i=class i{constructor(){this.tokenService=m(ee),this.settings=m(k),this.router=m(M),this.f=new ze({password:new ve("",{nonNullable:!0,validators:[d.required]})})}get user(){return this.settings.user}submit(){this.f.controls.password.markAsDirty(),this.f.controls.password.updateValueAndValidity(),this.f.valid&&(console.log("Valid!"),console.log(this.f.value),this.tokenService.set({token:"123"}),this.router.navigate(["dashboard"]))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-lock"]],standalone:!0,features:[C],decls:13,vars:6,consts:[[1,"ant-card","width-lg",2,"margin","0 auto"],[1,"ant-card-body"],[1,"avatar"],["nzIcon","user","nzSize","large",3,"nzSrc"],["nz-form","","role","form",1,"mt-md",3,"formGroup","ngSubmit"],[3,"nzErrorTip"],["nzSuffixIcon","lock"],["type","password","nz-input","","formControlName","password"],["nz-row","","nzType","flex","nzAlign","middle"],["nz-col","",2,"text-align","right",3,"nzOffset","nzSpan"],["nz-button","","nzType","primary",3,"disabled"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-avatar",3),s(),n(4,"form",4),v("ngSubmit",function(){return a.submit()}),n(5,"nz-form-item")(6,"nz-form-control",5)(7,"nz-input-group",6),c(8,"input",7),s()()(),n(9,"div",8)(10,"div",9)(11,"button",10),u(12,"\u9501\u5C4F"),s()()()()()()),o&2&&(r(3),l("nzSrc",a.user.avatar),r(),l("formGroup",a.f),r(2),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(4),l("nzOffset",12)("nzSpan",12),r(),l("disabled",!a.f.valid))},dependencies:[R,P,D,B,A,T,I,ke,Me,W,G,L,q,$,j,oe,N,y,F,b,V,O,U],styles:["[_nghost-%COMP%] .ant-card-body{position:relative;margin-top:80px}[_nghost-%COMP%] .avatar{position:absolute;top:-20px;left:50%;margin-left:-20px}"]});let e=i;return e})();function Xe(e,i){if(e&1&&c(0,"nz-alert",15),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Je(e,i){e&1&&c(0,"img",16)}var $e=(()=>{let i=class i{constructor(){this.router=m(M),this.settingsService=m(k),this.socialService=m(w),this.reuseTabService=m(Ne,{optional:!0}),this.tokenService=m(ee),this.startupSrv=m(he),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({userName:["",[d.required]],password:["",[d.required]],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]],remember:[!0]}),this.error="",this.type=0,this.loading=!1,this.count=0}switch({index:t}){this.type=t}getCaptcha(){let t=this.form.controls.mobile;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.interval$=setInterval(()=>{this.count-=1,this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",this.type===0){let{userName:t,password:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}else{let{mobile:t,captcha:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}this.loading=!0,this.cdr.detectChanges(),this.http.post("/api/main/login/account",{type:this.type,userName:this.form.value.userName,password:this.form.value.password},null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(t=>{if(t.msg!=="ok"){this.error=t.msg,this.cdr.detectChanges();return}this.reuseTabService?.clear(),this.settingsService.setUser({name:t.user.name,avatar:"./assets/pai.svg",email:t.user.email,staffId:t.staff?.id,organs:t.organ,currentOrgan:t.organ.find(o=>!0)}),this.tokenService.set(t.user),this.startupSrv.load().subscribe(()=>{let o=this.tokenService.referrer.url||"/";o.includes("/passport")&&(o="/"),this.router.navigateByUrl(o)})})}open(t,o="href"){let a="",g="";switch(fe.production?g=`https://ng-alain.github.io/ng-alain/#/passport/callback/${t}`:g=`http://localhost:4200/#/passport/callback/${t}`,t){case"auth0":a=`//cipchk.auth0.com/login?client=8gcNydIDzGBYxzqV0Vm1CX_RXH-wsWo5&redirect_uri=${decodeURIComponent(g)}`;break;case"github":a=`//github.com/login/oauth/authorize?client_id=9d6baae4b04a23fcafa2&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break;case"weibo":a=`https://api.weibo.com/oauth2/authorize?client_id=1239507802&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break}o==="window"?this.socialService.login(a,"/",{type:"window"}).subscribe(E=>{E&&(this.settingsService.setUser(E),this.router.navigateByUrl("/"))}):this.socialService.login(a,"/",{type:"href"})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-login"]],standalone:!0,features:[X([w]),C],decls:21,vars:3,consts:[[1,"login-container"],[1,"head"],["src","./assets/lh-logo.png",1,"logo"],[1,"title"],[1,"login-form"],["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],["nzErrorTip","Please enter user, admin"],["nzSize","large","nzPrefixIcon","user",2,"color","#515151"],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237",2,"color","#515151"],["nzErrorTip","Please enter password, 1q2w3E*"],["nzSize","large","nzPrefixIcon","lock",2,"color","#515151"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801",2,"color","#515151"],["nz-button","","type","submit","nzType","primary","nzSize","large","nzBlock","",3,"nzLoading"],["coverTemplate",""],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],["alt","example","src","assets/bg2.jpg",2,"height","100px"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1),c(2,"img",2),n(3,"span",3),u(4,"\u56FD\u5BB6\u7535\u6295\u4E34\u6CB3\u7535\u5382\u5168\u8FC7\u7A0B\u667A\u80FD\u71C3\u6599\u7BA1\u7406\u7CFB\u7EDF"),s()(),n(5,"div",4)(6,"form",5),v("ngSubmit",function(){return a.submit()}),f(7,Xe,1,3,"nz-alert",6),n(8,"nz-form-item")(9,"nz-form-control",7)(10,"nz-input-group",8),c(11,"input",9),s()()(),n(12,"nz-form-item")(13,"nz-form-control",10)(14,"nz-input-group",11),c(15,"input",12),s()()(),n(16,"nz-form-item")(17,"button",13),u(18," \u767B\u5F55 "),s()()()()(),f(19,Je,1,0,"ng-template",null,14,_)),o&2&&(r(6),l("formGroup",a.form),r(),h(7,a.error?7:-1),r(10),l("nzLoading",a.loading))},dependencies:[R,P,D,B,A,T,I,Ce,ye,ne,re,W,G,L,q,$,j,V,O,U,N,y,F,b,_e,de,Pe],styles:["[_nghost-%COMP%]{display:block;width:538px;margin:0 auto}[_nghost-%COMP%] .ant-tabs .ant-tabs-bar{margin-bottom:24px;text-align:center;border-bottom:0}[_nghost-%COMP%] .ant-tabs-tab{font-size:16px;line-height:24px}[_nghost-%COMP%] .ant-input-affix-wrapper .ant-input:not(:first-child){padding-left:4px}[_nghost-%COMP%] .icon{cursor:pointer;margin-left:16px;font-size:24px;color:#0003;vertical-align:middle;transition:color .3s}[_nghost-%COMP%] .icon:hover{color:#1890ff}[_nghost-%COMP%] .other{margin-top:24px;line-height:22px;text-align:left}[_nghost-%COMP%] .other nz-tooltip{vertical-align:middle}[_nghost-%COMP%] .other .register{float:right}[_nghost-%COMP%] .login-container{border-radius:10px;background-image:url(/assets/bg2.jpg);background-size:100%;box-shadow:0 4px 6px #0000001a;padding:10px 0 0;height:300px}[_nghost-%COMP%] .head{margin:0 0 0 20px}[_nghost-%COMP%] .login-form{justify-content:center;padding:30px 120px 0}[_nghost-%COMP%] .header{height:46px;line-height:46px}[_nghost-%COMP%] .header a{text-decoration:none}[_nghost-%COMP%] .logo{height:46px;margin-right:6px}[_nghost-%COMP%] .title{position:relative;font-family:Myriad Pro,Helvetica Neue,Arial,Helvetica,sans-serif;font-size:20px;font-weight:400;color:#515151;vertical-align:middle}[_nghost-%COMP%] .color-515151[_ngcontent-%COMP%]{color:#515151}[data-theme=dark] [_nghost-%COMP%] {display:block;width:538px;margin:0 auto}[data-theme=dark] [_nghost-%COMP%] .icon{color:#fff3}[data-theme=dark] [_nghost-%COMP%] .icon:hover{color:#515151}"],changeDetection:0});let e=i;return e})();function Qe(e,i){if(e&1&&c(0,"nz-alert",23),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Ze(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01 ")}function et(e,i){e&1&&u(0," \u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function tt(e,i){if(e&1&&f(0,Ze,1,0)(1,et,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.email?1:-1)}}function it(e,i){e&1&&(n(0,"div",27),u(1,"\u5F3A\u5EA6\uFF1A\u5F3A"),s())}function ot(e,i){e&1&&(n(0,"div",28),u(1,"\u5F3A\u5EA6\uFF1A\u4E2D"),s())}function rt(e,i){e&1&&(n(0,"div",29),u(1,"\u5F3A\u5EA6\uFF1A\u592A\u77ED"),s())}function nt(e,i){if(e&1&&(n(0,"div",24),f(1,it,2,0)(2,ot,2,0)(3,rt,2,0),n(4,"div"),c(5,"nz-progress",25),s(),n(6,"p",26),u(7,"\u8BF7\u81F3\u5C11\u8F93\u5165 6 \u4E2A\u5B57\u7B26\u3002\u8BF7\u4E0D\u8981\u4F7F\u7528\u5BB9\u6613\u88AB\u731C\u5230\u7684\u5BC6\u7801\u3002"),s()()),e&2){let p=x(),t;r(),h(1,(t=p.status)==="ok"?1:t==="pass"?2:3),r(3),ue("progress-",p.status,""),r(),l("nzPercent",p.progress)("nzStatus",p.passwordProgressMap[p.status])("nzStrokeWidth",6)("nzShowInfo",!1)}}function at(e,i){e&1&&u(0," \u8BF7\u786E\u8BA4\u5BC6\u7801\uFF01 ")}function st(e,i){e&1&&u(0," \u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u5339\u914D! ")}function lt(e,i){if(e&1&&f(0,at,1,0)(1,st,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.matchControl?1:-1)}}function pt(e,i){e&1&&(n(0,"nz-select",30),c(1,"nz-option",31)(2,"nz-option",31),s()),e&2&&(r(),l("nzLabel","+86")("nzValue","+86"),r(),l("nzLabel","+87")("nzValue","+87"))}function mt(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u624B\u673A\u53F7\uFF01 ")}function ut(e,i){e&1&&u(0," \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function ct(e,i){if(e&1&&f(0,mt,1,0)(1,ut,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.pattern?1:-1)}}var dt=()=>({"width.px":240}),qe=(()=>{let i=class i{constructor(){this.router=m(M),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({mail:["",[d.required,d.email]],password:["",[d.required,d.minLength(6),i.checkPassword.bind(this)]],confirm:["",[d.required,d.minLength(6)]],mobilePrefix:["+86"],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]]},{validators:Ie("password","confirm")}),this.error="",this.type=0,this.loading=!1,this.visible=!1,this.status="pool",this.progress=0,this.passwordProgressMap={ok:"success",pass:"normal",pool:"exception"},this.count=0}static checkPassword(t){if(!t)return null;let o=this;o.visible=!!t.value,t.value&&t.value.length>9?o.status="ok":t.value&&t.value.length>5?o.status="pass":o.status="pool",o.visible&&(o.progress=t.value.length*10>100?100:t.value.length*10)}getCaptcha(){let{mobile:t}=this.form.controls;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.cdr.detectChanges(),this.interval$=setInterval(()=>{this.count-=1,this.cdr.detectChanges(),this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",Object.keys(this.form.controls).forEach(o=>{let a=this.form.controls[o];a.markAsDirty(),a.updateValueAndValidity()}),this.form.invalid)return;let t=this.form.value;this.loading=!0,this.cdr.detectChanges(),this.http.post("/register",t,null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(()=>{this.router.navigate(["passport","register-result"],{queryParams:{email:t.mail}})})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register"]],standalone:!0,features:[C],decls:44,vars:19,consts:[["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],[3,"nzErrorTip"],["nzSize","large","nzAddonBeforeIcon","user"],["nz-input","","formControlName","mail","placeholder","Email"],["mailErrorTip",""],["nzSize","large","nzAddonBeforeIcon","lock","nz-popover","","nzPopoverPlacement","right","nzPopoverTrigger","focus","nzPopoverOverlayClassName","register-password-cdk",3,"nzPopoverVisible","nzPopoverOverlayStyle","nzPopoverContent","nzPopoverVisibleChange"],["nz-input","","type","password","formControlName","password","placeholder","Password"],["pwdCdkTpl",""],["nzSize","large","nzAddonBeforeIcon","lock"],["nz-input","","type","password","formControlName","confirm","placeholder","Confirm Password"],["confirmErrorTip",""],["nzSize","large",3,"nzAddOnBefore"],["addOnBeforeTemplate",""],["formControlName","mobile","nz-input","","placeholder","Phone number"],["mobileErrorTip",""],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan"],["nzSize","large","nzAddonBeforeIcon","mail"],["nz-input","","formControlName","captcha","placeholder","Captcha"],["type","button","nz-button","","nzSize","large","nzBlock","",3,"disabled","nzLoading","click"],["nz-button","","nzType","primary","nzSize","large","type","submit",1,"submit",3,"nzLoading"],["routerLink","/passport/login",1,"login"],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],[2,"padding","4px 0"],[3,"nzPercent","nzStatus","nzStrokeWidth","nzShowInfo"],[1,"mt-sm"],[1,"success"],[1,"warning"],[1,"error"],["formControlName","mobilePrefix",2,"width","100px"],[3,"nzLabel","nzValue"]],template:function(o,a){if(o&1&&(n(0,"h3"),u(1,"\u6CE8\u518C"),s(),n(2,"form",0),v("ngSubmit",function(){return a.submit()}),f(3,Qe,1,3,"nz-alert",1),n(4,"nz-form-item")(5,"nz-form-control",2)(6,"nz-input-group",3),c(7,"input",4),s(),f(8,tt,2,2,"ng-template",null,5,_),s()(),n(10,"nz-form-item")(11,"nz-form-control",2)(12,"nz-input-group",6),v("nzPopoverVisibleChange",function(E){return a.visible=E}),c(13,"input",7),s(),f(14,nt,8,8,"ng-template",null,8,_),s()(),n(16,"nz-form-item")(17,"nz-form-control",2)(18,"nz-input-group",9),c(19,"input",10),s(),f(20,lt,2,2,"ng-template",null,11,_),s()(),n(22,"nz-form-item")(23,"nz-form-control",2)(24,"nz-input-group",12),f(25,pt,3,4,"ng-template",null,13,_),c(27,"input",14),s(),f(28,ct,2,2,"ng-template",null,15,_),s()(),n(30,"nz-form-item")(31,"nz-form-control",2)(32,"div",16)(33,"div",17)(34,"nz-input-group",18),c(35,"input",19),s()(),n(36,"div",17)(37,"button",20),v("click",function(){return a.getCaptcha()}),u(38),s()()()()(),n(39,"nz-form-item")(40,"button",21),u(41," \u6CE8\u518C "),s(),n(42,"a",22),u(43,"\u4F7F\u7528\u5DF2\u6709\u8D26\u6237\u767B\u5F55"),s()()()),o&2){let g=S(9),E=S(15),We=S(21),He=S(26),Ye=S(29);r(2),l("formGroup",a.form),r(),h(3,a.error?3:-1),r(2),l("nzErrorTip",g),r(6),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(),l("nzPopoverVisible",a.visible)("nzPopoverOverlayStyle",ce(18,dt))("nzPopoverContent",E),r(5),l("nzErrorTip",We),r(6),l("nzErrorTip",Ye),r(),l("nzAddOnBefore",He),r(7),l("nzErrorTip","\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"),r(),l("nzGutter",8),r(),l("nzSpan",16),r(3),l("nzSpan",8),r(),l("disabled",a.count>0)("nzLoading",a.loading),r(),K(" ",a.count?a.count+"s":"\u83B7\u53D6\u9A8C\u8BC1\u7801"," "),r(2),l("nzLoading",a.loading)}},dependencies:[R,P,D,B,A,T,I,Q,ne,re,W,G,L,q,$,j,V,O,U,De,we,Ae,Be,be,Se,Fe,oe,N,y,F,b],styles:["[_nghost-%COMP%]{display:block;width:368px;margin:0 auto}[_nghost-%COMP%] h3{margin-bottom:20px;font-size:16px}[_nghost-%COMP%] .submit{width:50%}[_nghost-%COMP%] .login{float:right;line-height:40px} .register-password-cdk .success, .register-password-cdk .warning, .register-password-cdk .error{transition:color .3s} .register-password-cdk .success{color:#52c41a} .register-password-cdk .warning{color:#faad14} .register-password-cdk .error{color:#ff4d4f} .register-password-cdk .progress-pass>.progress .ant-progress-bg{background-color:#faad14}"],changeDetection:0});let e=i;return e})();function ft(e,i){if(e&1&&(n(0,"div",4),u(1),s()),e&2){let p=x();r(),K(" \u4F60\u7684\u8D26\u6237\uFF1A",p.email," \u6CE8\u518C\u6210\u529F ")}}var je=(()=>{let i=class i{constructor(){this.msg=m(ge),this.email=""}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register-result"]],inputs:{email:"email"},standalone:!0,features:[C],decls:7,vars:2,consts:[["type","success","description","\u6FC0\u6D3B\u90AE\u4EF6\u5DF2\u53D1\u9001\u5230\u4F60\u7684\u90AE\u7BB1\u4E2D\uFF0C\u90AE\u4EF6\u6709\u6548\u671F\u4E3A24\u5C0F\u65F6\u3002\u8BF7\u53CA\u65F6\u767B\u5F55\u90AE\u7BB1\uFF0C\u70B9\u51FB\u90AE\u4EF6\u4E2D\u7684\u94FE\u63A5\u6FC0\u6D3B\u5E10\u6237\u3002",3,"title"],["title",""],["nz-button","","nzSize","large",3,"nzType","click"],["routerLink","/","nz-button","","nzSize","large"],[1,"title",2,"font-size","20px"]],template:function(o,a){if(o&1&&(n(0,"result",0),f(1,ft,2,1,"ng-template",null,1,_),n(3,"button",2),v("click",function(){return a.msg.success("email")}),u(4," \u67E5\u770B\u90AE\u7BB1 "),s(),n(5,"button",3),u(6," \u8FD4\u56DE\u9996\u9875 "),s()()),o&2){let g=S(2);l("title",g),r(3),l("nzType","primary")}},dependencies:[Q,N,y,F,b,Ee,xe],encapsulation:2});let e=i;return e})();var qi=[{path:"passport",component:Te,children:[{path:"login",component:$e,data:{title:"\u767B\u5F55",titleI18n:"app.login.login"}},{path:"register",component:qe,data:{title:"\u6CE8\u518C",titleI18n:"app.register.register"}},{path:"register-result",component:je,data:{title:"\u6CE8\u518C\u7ED3\u679C",titleI18n:"app.register.register"}},{path:"lock",component:Ge,data:{title:"\u9501\u5C4F",titleI18n:"app.lock"}}]},{path:"passport/callback/:type",component:Re}];export{qi as routes};
+import{a as fe,e as he,j as Te}from"./chunk-MRNYEB3J.js";import{b as Ie}from"./chunk-SIJVS6LY.js";import{A as Ce,Aa as L,Ba as G,C as _e,Ca as oe,Da as $,Ea as q,Fa as j,Ga as W,Pa as ye,Qa as Ne,Ta as xe,Ua as Ee,Y as Se,Z as Fe,_ as be,ab as re,bb as ne,cb as Me,d as ge,db as ke,eb as we,fb as De,gb as Be,h as D,hb as Ae,i as d,j as B,k as A,l as ze,m as ve,ma as O,mb as Pe,o as P,oa as U,p as T,pa as V,q as I,t as ie,v as R}from"./chunk-WD6SV3WH.js";import{a as ee,b as w,c as te}from"./chunk-4FFPI7ZP.js";import{Db as S,Eb as u,Gb as K,Ge as de,He as F,Ib as X,Ie as b,Jb as C,Jc as M,Ka as r,Kb as ce,Kc as Q,Ke as y,Le as N,Ma as Y,Sb as _,Ta as f,V as H,Va as l,_a as ue,a as se,bb as h,gb as n,hb as s,ib as c,la as m,na as z,qb as v,rc as J,rf as k,sb as x,xf as Z}from"./chunk-VDRVUQCF.js";var Re=(()=>{let i=class i{constructor(){this.socialService=m(w),this.settingsSrv=m(k),this.type=""}ngOnInit(){this.mockModel()}mockModel(){let t={token:"123456789",name:"cipchk",email:`${this.type}@${this.type}.com`,id:1e4,time:+new Date};this.settingsSrv.setUser(se(se({},this.settingsSrv.user),t)),this.socialService.callback(t)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["app-callback"]],inputs:{type:"type"},standalone:!0,features:[X([w]),C],decls:0,vars:0,template:function(o,a){},encapsulation:2});let e=i;return e})();var Ge=(()=>{let i=class i{constructor(){this.tokenService=m(ee),this.settings=m(k),this.router=m(M),this.f=new ze({password:new ve("",{nonNullable:!0,validators:[d.required]})})}get user(){return this.settings.user}submit(){this.f.controls.password.markAsDirty(),this.f.controls.password.updateValueAndValidity(),this.f.valid&&(console.log("Valid!"),console.log(this.f.value),this.tokenService.set({token:"123"}),this.router.navigate(["dashboard"]))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-lock"]],standalone:!0,features:[C],decls:13,vars:6,consts:[[1,"ant-card","width-lg",2,"margin","0 auto"],[1,"ant-card-body"],[1,"avatar"],["nzIcon","user","nzSize","large",3,"nzSrc"],["nz-form","","role","form",1,"mt-md",3,"formGroup","ngSubmit"],[3,"nzErrorTip"],["nzSuffixIcon","lock"],["type","password","nz-input","","formControlName","password"],["nz-row","","nzType","flex","nzAlign","middle"],["nz-col","",2,"text-align","right",3,"nzOffset","nzSpan"],["nz-button","","nzType","primary",3,"disabled"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-avatar",3),s(),n(4,"form",4),v("ngSubmit",function(){return a.submit()}),n(5,"nz-form-item")(6,"nz-form-control",5)(7,"nz-input-group",6),c(8,"input",7),s()()(),n(9,"div",8)(10,"div",9)(11,"button",10),u(12,"\u9501\u5C4F"),s()()()()()()),o&2&&(r(3),l("nzSrc",a.user.avatar),r(),l("formGroup",a.f),r(2),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(4),l("nzOffset",12)("nzSpan",12),r(),l("disabled",!a.f.valid))},dependencies:[R,P,D,B,A,T,I,ke,Me,W,G,L,q,$,j,oe,N,y,F,b,V,O,U],styles:["[_nghost-%COMP%] .ant-card-body{position:relative;margin-top:80px}[_nghost-%COMP%] .avatar{position:absolute;top:-20px;left:50%;margin-left:-20px}"]});let e=i;return e})();function Xe(e,i){if(e&1&&c(0,"nz-alert",15),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Je(e,i){e&1&&c(0,"img",16)}var $e=(()=>{let i=class i{constructor(){this.router=m(M),this.settingsService=m(k),this.socialService=m(w),this.reuseTabService=m(Ne,{optional:!0}),this.tokenService=m(ee),this.startupSrv=m(he),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({userName:["",[d.required]],password:["",[d.required]],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]],remember:[!0]}),this.error="",this.type=0,this.loading=!1,this.count=0}switch({index:t}){this.type=t}getCaptcha(){let t=this.form.controls.mobile;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.interval$=setInterval(()=>{this.count-=1,this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",this.type===0){let{userName:t,password:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}else{let{mobile:t,captcha:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}this.loading=!0,this.cdr.detectChanges(),this.http.post("/api/main/login/account",{type:this.type,userName:this.form.value.userName,password:this.form.value.password},null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(t=>{if(t.msg!=="ok"){this.error=t.msg,this.cdr.detectChanges();return}this.reuseTabService?.clear(),this.settingsService.setUser({name:t.user.name,avatar:"./assets/pai.svg",email:t.user.email,staffId:t.staff?.id,organs:t.organ,currentOrgan:t.organ.find(o=>!0)}),this.tokenService.set(t.user),this.startupSrv.load().subscribe(()=>{let o=this.tokenService.referrer.url||"/";o.includes("/passport")&&(o="/"),this.router.navigateByUrl(o)})})}open(t,o="href"){let a="",g="";switch(fe.production?g=`https://ng-alain.github.io/ng-alain/#/passport/callback/${t}`:g=`http://localhost:4200/#/passport/callback/${t}`,t){case"auth0":a=`//cipchk.auth0.com/login?client=8gcNydIDzGBYxzqV0Vm1CX_RXH-wsWo5&redirect_uri=${decodeURIComponent(g)}`;break;case"github":a=`//github.com/login/oauth/authorize?client_id=9d6baae4b04a23fcafa2&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break;case"weibo":a=`https://api.weibo.com/oauth2/authorize?client_id=1239507802&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break}o==="window"?this.socialService.login(a,"/",{type:"window"}).subscribe(E=>{E&&(this.settingsService.setUser(E),this.router.navigateByUrl("/"))}):this.socialService.login(a,"/",{type:"href"})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-login"]],standalone:!0,features:[X([w]),C],decls:21,vars:3,consts:[[1,"login-container"],[1,"head"],["src","./assets/lh-logo.png",1,"logo"],[1,"title"],[1,"login-form"],["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],["nzErrorTip","Please enter user, admin"],["nzSize","large","nzPrefixIcon","user",2,"color","#515151"],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237",2,"color","#515151"],["nzErrorTip","Please enter password, 1q2w3E*"],["nzSize","large","nzPrefixIcon","lock",2,"color","#515151"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801",2,"color","#515151"],["nz-button","","type","submit","nzType","primary","nzSize","large","nzBlock","",3,"nzLoading"],["coverTemplate",""],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],["alt","example","src","assets/bg2.jpg",2,"height","100px"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1),c(2,"img",2),n(3,"span",3),u(4,"\u56FD\u5BB6\u7535\u6295\u4E34\u6CB3\u7535\u5382\u5168\u8FC7\u7A0B\u667A\u80FD\u71C3\u6599\u7BA1\u7406\u7CFB\u7EDF"),s()(),n(5,"div",4)(6,"form",5),v("ngSubmit",function(){return a.submit()}),f(7,Xe,1,3,"nz-alert",6),n(8,"nz-form-item")(9,"nz-form-control",7)(10,"nz-input-group",8),c(11,"input",9),s()()(),n(12,"nz-form-item")(13,"nz-form-control",10)(14,"nz-input-group",11),c(15,"input",12),s()()(),n(16,"nz-form-item")(17,"button",13),u(18," \u767B\u5F55 "),s()()()()(),f(19,Je,1,0,"ng-template",null,14,_)),o&2&&(r(6),l("formGroup",a.form),r(),h(7,a.error?7:-1),r(10),l("nzLoading",a.loading))},dependencies:[R,P,D,B,A,T,I,Ce,ye,ne,re,W,G,L,q,$,j,V,O,U,N,y,F,b,_e,de,Pe],styles:["[_nghost-%COMP%]{display:block;width:538px;margin:0 auto}[_nghost-%COMP%] .ant-tabs .ant-tabs-bar{margin-bottom:24px;text-align:center;border-bottom:0}[_nghost-%COMP%] .ant-tabs-tab{font-size:16px;line-height:24px}[_nghost-%COMP%] .ant-input-affix-wrapper .ant-input:not(:first-child){padding-left:4px}[_nghost-%COMP%] .icon{cursor:pointer;margin-left:16px;font-size:24px;color:#0003;vertical-align:middle;transition:color .3s}[_nghost-%COMP%] .icon:hover{color:#1890ff}[_nghost-%COMP%] .other{margin-top:24px;line-height:22px;text-align:left}[_nghost-%COMP%] .other nz-tooltip{vertical-align:middle}[_nghost-%COMP%] .other .register{float:right}[_nghost-%COMP%] .login-container{border-radius:10px;background-image:url(/assets/bg2.jpg);background-size:100%;box-shadow:0 4px 6px #0000001a;padding:10px 0 0;height:300px}[_nghost-%COMP%] .head{margin:0 0 0 20px}[_nghost-%COMP%] .login-form{justify-content:center;padding:30px 120px 0}[_nghost-%COMP%] .header{height:46px;line-height:46px}[_nghost-%COMP%] .header a{text-decoration:none}[_nghost-%COMP%] .logo{height:46px;margin-right:6px}[_nghost-%COMP%] .title{position:relative;font-family:Myriad Pro,Helvetica Neue,Arial,Helvetica,sans-serif;font-size:20px;font-weight:400;color:#515151;vertical-align:middle}[_nghost-%COMP%] .color-515151[_ngcontent-%COMP%]{color:#515151}[data-theme=dark] [_nghost-%COMP%] {display:block;width:538px;margin:0 auto}[data-theme=dark] [_nghost-%COMP%] .icon{color:#fff3}[data-theme=dark] [_nghost-%COMP%] .icon:hover{color:#515151}"],changeDetection:0});let e=i;return e})();function Qe(e,i){if(e&1&&c(0,"nz-alert",23),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Ze(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01 ")}function et(e,i){e&1&&u(0," \u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function tt(e,i){if(e&1&&f(0,Ze,1,0)(1,et,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.email?1:-1)}}function it(e,i){e&1&&(n(0,"div",27),u(1,"\u5F3A\u5EA6\uFF1A\u5F3A"),s())}function ot(e,i){e&1&&(n(0,"div",28),u(1,"\u5F3A\u5EA6\uFF1A\u4E2D"),s())}function rt(e,i){e&1&&(n(0,"div",29),u(1,"\u5F3A\u5EA6\uFF1A\u592A\u77ED"),s())}function nt(e,i){if(e&1&&(n(0,"div",24),f(1,it,2,0)(2,ot,2,0)(3,rt,2,0),n(4,"div"),c(5,"nz-progress",25),s(),n(6,"p",26),u(7,"\u8BF7\u81F3\u5C11\u8F93\u5165 6 \u4E2A\u5B57\u7B26\u3002\u8BF7\u4E0D\u8981\u4F7F\u7528\u5BB9\u6613\u88AB\u731C\u5230\u7684\u5BC6\u7801\u3002"),s()()),e&2){let p=x(),t;r(),h(1,(t=p.status)==="ok"?1:t==="pass"?2:3),r(3),ue("progress-",p.status,""),r(),l("nzPercent",p.progress)("nzStatus",p.passwordProgressMap[p.status])("nzStrokeWidth",6)("nzShowInfo",!1)}}function at(e,i){e&1&&u(0," \u8BF7\u786E\u8BA4\u5BC6\u7801\uFF01 ")}function st(e,i){e&1&&u(0," \u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u5339\u914D! ")}function lt(e,i){if(e&1&&f(0,at,1,0)(1,st,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.matchControl?1:-1)}}function pt(e,i){e&1&&(n(0,"nz-select",30),c(1,"nz-option",31)(2,"nz-option",31),s()),e&2&&(r(),l("nzLabel","+86")("nzValue","+86"),r(),l("nzLabel","+87")("nzValue","+87"))}function mt(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u624B\u673A\u53F7\uFF01 ")}function ut(e,i){e&1&&u(0," \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function ct(e,i){if(e&1&&f(0,mt,1,0)(1,ut,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.pattern?1:-1)}}var dt=()=>({"width.px":240}),qe=(()=>{let i=class i{constructor(){this.router=m(M),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({mail:["",[d.required,d.email]],password:["",[d.required,d.minLength(6),i.checkPassword.bind(this)]],confirm:["",[d.required,d.minLength(6)]],mobilePrefix:["+86"],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]]},{validators:Ie("password","confirm")}),this.error="",this.type=0,this.loading=!1,this.visible=!1,this.status="pool",this.progress=0,this.passwordProgressMap={ok:"success",pass:"normal",pool:"exception"},this.count=0}static checkPassword(t){if(!t)return null;let o=this;o.visible=!!t.value,t.value&&t.value.length>9?o.status="ok":t.value&&t.value.length>5?o.status="pass":o.status="pool",o.visible&&(o.progress=t.value.length*10>100?100:t.value.length*10)}getCaptcha(){let{mobile:t}=this.form.controls;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.cdr.detectChanges(),this.interval$=setInterval(()=>{this.count-=1,this.cdr.detectChanges(),this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",Object.keys(this.form.controls).forEach(o=>{let a=this.form.controls[o];a.markAsDirty(),a.updateValueAndValidity()}),this.form.invalid)return;let t=this.form.value;this.loading=!0,this.cdr.detectChanges(),this.http.post("/register",t,null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(()=>{this.router.navigate(["passport","register-result"],{queryParams:{email:t.mail}})})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register"]],standalone:!0,features:[C],decls:44,vars:19,consts:[["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],[3,"nzErrorTip"],["nzSize","large","nzAddonBeforeIcon","user"],["nz-input","","formControlName","mail","placeholder","Email"],["mailErrorTip",""],["nzSize","large","nzAddonBeforeIcon","lock","nz-popover","","nzPopoverPlacement","right","nzPopoverTrigger","focus","nzPopoverOverlayClassName","register-password-cdk",3,"nzPopoverVisible","nzPopoverOverlayStyle","nzPopoverContent","nzPopoverVisibleChange"],["nz-input","","type","password","formControlName","password","placeholder","Password"],["pwdCdkTpl",""],["nzSize","large","nzAddonBeforeIcon","lock"],["nz-input","","type","password","formControlName","confirm","placeholder","Confirm Password"],["confirmErrorTip",""],["nzSize","large",3,"nzAddOnBefore"],["addOnBeforeTemplate",""],["formControlName","mobile","nz-input","","placeholder","Phone number"],["mobileErrorTip",""],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan"],["nzSize","large","nzAddonBeforeIcon","mail"],["nz-input","","formControlName","captcha","placeholder","Captcha"],["type","button","nz-button","","nzSize","large","nzBlock","",3,"disabled","nzLoading","click"],["nz-button","","nzType","primary","nzSize","large","type","submit",1,"submit",3,"nzLoading"],["routerLink","/passport/login",1,"login"],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],[2,"padding","4px 0"],[3,"nzPercent","nzStatus","nzStrokeWidth","nzShowInfo"],[1,"mt-sm"],[1,"success"],[1,"warning"],[1,"error"],["formControlName","mobilePrefix",2,"width","100px"],[3,"nzLabel","nzValue"]],template:function(o,a){if(o&1&&(n(0,"h3"),u(1,"\u6CE8\u518C"),s(),n(2,"form",0),v("ngSubmit",function(){return a.submit()}),f(3,Qe,1,3,"nz-alert",1),n(4,"nz-form-item")(5,"nz-form-control",2)(6,"nz-input-group",3),c(7,"input",4),s(),f(8,tt,2,2,"ng-template",null,5,_),s()(),n(10,"nz-form-item")(11,"nz-form-control",2)(12,"nz-input-group",6),v("nzPopoverVisibleChange",function(E){return a.visible=E}),c(13,"input",7),s(),f(14,nt,8,8,"ng-template",null,8,_),s()(),n(16,"nz-form-item")(17,"nz-form-control",2)(18,"nz-input-group",9),c(19,"input",10),s(),f(20,lt,2,2,"ng-template",null,11,_),s()(),n(22,"nz-form-item")(23,"nz-form-control",2)(24,"nz-input-group",12),f(25,pt,3,4,"ng-template",null,13,_),c(27,"input",14),s(),f(28,ct,2,2,"ng-template",null,15,_),s()(),n(30,"nz-form-item")(31,"nz-form-control",2)(32,"div",16)(33,"div",17)(34,"nz-input-group",18),c(35,"input",19),s()(),n(36,"div",17)(37,"button",20),v("click",function(){return a.getCaptcha()}),u(38),s()()()()(),n(39,"nz-form-item")(40,"button",21),u(41," \u6CE8\u518C "),s(),n(42,"a",22),u(43,"\u4F7F\u7528\u5DF2\u6709\u8D26\u6237\u767B\u5F55"),s()()()),o&2){let g=S(9),E=S(15),We=S(21),He=S(26),Ye=S(29);r(2),l("formGroup",a.form),r(),h(3,a.error?3:-1),r(2),l("nzErrorTip",g),r(6),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(),l("nzPopoverVisible",a.visible)("nzPopoverOverlayStyle",ce(18,dt))("nzPopoverContent",E),r(5),l("nzErrorTip",We),r(6),l("nzErrorTip",Ye),r(),l("nzAddOnBefore",He),r(7),l("nzErrorTip","\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"),r(),l("nzGutter",8),r(),l("nzSpan",16),r(3),l("nzSpan",8),r(),l("disabled",a.count>0)("nzLoading",a.loading),r(),K(" ",a.count?a.count+"s":"\u83B7\u53D6\u9A8C\u8BC1\u7801"," "),r(2),l("nzLoading",a.loading)}},dependencies:[R,P,D,B,A,T,I,Q,ne,re,W,G,L,q,$,j,V,O,U,De,we,Ae,Be,be,Se,Fe,oe,N,y,F,b],styles:["[_nghost-%COMP%]{display:block;width:368px;margin:0 auto}[_nghost-%COMP%] h3{margin-bottom:20px;font-size:16px}[_nghost-%COMP%] .submit{width:50%}[_nghost-%COMP%] .login{float:right;line-height:40px} .register-password-cdk .success, .register-password-cdk .warning, .register-password-cdk .error{transition:color .3s} .register-password-cdk .success{color:#52c41a} .register-password-cdk .warning{color:#faad14} .register-password-cdk .error{color:#ff4d4f} .register-password-cdk .progress-pass>.progress .ant-progress-bg{background-color:#faad14}"],changeDetection:0});let e=i;return e})();function ft(e,i){if(e&1&&(n(0,"div",4),u(1),s()),e&2){let p=x();r(),K(" \u4F60\u7684\u8D26\u6237\uFF1A",p.email," \u6CE8\u518C\u6210\u529F ")}}var je=(()=>{let i=class i{constructor(){this.msg=m(ge),this.email=""}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register-result"]],inputs:{email:"email"},standalone:!0,features:[C],decls:7,vars:2,consts:[["type","success","description","\u6FC0\u6D3B\u90AE\u4EF6\u5DF2\u53D1\u9001\u5230\u4F60\u7684\u90AE\u7BB1\u4E2D\uFF0C\u90AE\u4EF6\u6709\u6548\u671F\u4E3A24\u5C0F\u65F6\u3002\u8BF7\u53CA\u65F6\u767B\u5F55\u90AE\u7BB1\uFF0C\u70B9\u51FB\u90AE\u4EF6\u4E2D\u7684\u94FE\u63A5\u6FC0\u6D3B\u5E10\u6237\u3002",3,"title"],["title",""],["nz-button","","nzSize","large",3,"nzType","click"],["routerLink","/","nz-button","","nzSize","large"],[1,"title",2,"font-size","20px"]],template:function(o,a){if(o&1&&(n(0,"result",0),f(1,ft,2,1,"ng-template",null,1,_),n(3,"button",2),v("click",function(){return a.msg.success("email")}),u(4," \u67E5\u770B\u90AE\u7BB1 "),s(),n(5,"button",3),u(6," \u8FD4\u56DE\u9996\u9875 "),s()()),o&2){let g=S(2);l("title",g),r(3),l("nzType","primary")}},dependencies:[Q,N,y,F,b,Ee,xe],encapsulation:2});let e=i;return e})();var qi=[{path:"passport",component:Te,children:[{path:"login",component:$e,data:{title:"\u767B\u5F55",titleI18n:"app.login.login"}},{path:"register",component:qe,data:{title:"\u6CE8\u518C",titleI18n:"app.register.register"}},{path:"register-result",component:je,data:{title:"\u6CE8\u518C\u7ED3\u679C",titleI18n:"app.register.register"}},{path:"lock",component:Ge,data:{title:"\u9501\u5C4F",titleI18n:"app.lock"}}]},{path:"passport/callback/:type",component:Re}];export{qi as routes};
diff --git a/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js b/dist/himp.platform.angular/browser/chunk-U3NGNWYP.js
similarity index 83%
rename from dist/himp.platform.angular/browser/chunk-R3OIOWDW.js
rename to dist/himp.platform.angular/browser/chunk-U3NGNWYP.js
index 3840424..9dfe2af 100644
--- a/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js
+++ b/dist/himp.platform.angular/browser/chunk-U3NGNWYP.js
@@ -1,34 +1,34 @@
-import{a as CV,b as RV}from"./chunk-2D265ORJ.js";import{A as Nc,Aa as JM,Ba as Tl,C as Uc,Fa as Xc,Ha as qc,Ka as Zc,Oa as jc,Ra as Kc,Ta as Jc,V as Oc,W as MV,Wa as $c,X as bV,_ as Fc,_a as Qc,ab as ef,b as ZM,ba as wV,bb as TV,ca as wl,cb as El,e as Pc,eb as tf,fb as EV,gb as rf,ib as nf,jb as AV,ka as zc,oa as Bc,qa as kc,sa as Vc,ta as Gc,u as Dc,v as Ic,va as Hc,xa as Wc,y as jM,za as KM}from"./chunk-OOUNO2UZ.js";import{$ as aV,Ab as vm,Bb as co,Cb as fo,D as tV,Db as gu,Eb as Pi,Fb as Ec,Gc as gV,Ge as Ac,Ha as uV,I as rV,Ib as mV,Jb as ui,Jc as yV,Ka as Ot,Kc as _V,La as uo,Lb as vV,Le as Cc,Ma as jR,Mb as tL,Me as YM,Ne as qM,Nf as Yc,Pa as cV,Q as iV,Sb as gm,Ta as br,U as nV,Va as Rt,Wa as fV,Xa as KR,Ya as hV,a as E0,ba as ZR,cc as R0,cd as xV,db as JR,dc as bl,e as Dse,eb as $R,f as Ise,fb as QR,g as YR,gb as tr,h as Nse,hb as lr,hf as Rc,i as Use,ia as oV,ib as li,ic as L0,j as WM,jb as Sl,kb as Ml,la as xl,lb as pV,lf as Lc,m as $k,na as si,nc as XM,o as qR,oa as sV,p as Qk,pa as lV,qb as dV,ra as C0,sb as Lr,tb as Ho,tf as SV,u as A0,ub as Li,vf as ym,w as eV,xd as P0,xf as _m,yb as eL,zb as Tc}from"./chunk-VDRVUQCF.js";var $ne={};YR($ne,{AddEquation:()=>Vz,AddOperation:()=>sne,AdditiveBlending:()=>Fz,AlphaFormat:()=>yne,AlwaysDepth:()=>ene,AmbientLight:()=>aC,AnimationClip:()=>No,AnimationMixer:()=>cB,AnimationObjectGroup:()=>wz,AnimationUtils:()=>Jn,ArcCurve:()=>gC,ArrowHelper:()=>$d,Audio:()=>by,AudioAnalyser:()=>uB,AudioContext:()=>sB,AudioListener:()=>Mz,AudioLoader:()=>lB,AxisHelper:()=>vC,BackSide:()=>yh,BasicDepthPacking:()=>Dne,BasicShadowMap:()=>JEe,BinaryTextureLoader:()=>eB,BlendingMode:()=>Vie,Bone:()=>jA,BooleanKeyframeTrack:()=>cC,BoundingBoxHelper:()=>TLe,Box2:()=>PS,Box3:()=>lu,BoxBufferGeometry:()=>Ud,BoxGeometry:()=>oM,BoxHelper:()=>Iy,BufferAttribute:()=>gt,BufferGeometry:()=>Bt,BufferGeometryLoader:()=>rB,ByteType:()=>hne,Cache:()=>xz,Camera:()=>Qn,CameraHelper:()=>mM,CanvasRenderer:()=>DLe,CanvasTexture:()=>$A,CatmullRomCurve3:()=>fB,CineonToneMapping:()=>cne,CircleBufferGeometry:()=>yy,CircleGeometry:()=>aM,ClampToEdgeWrapping:()=>Uo,Clock:()=>Rz,ClosedSplineCurve3:()=>Jne,Color:()=>Gt,ColorKeyframeTrack:()=>fC,CompressedTexture:()=>ny,CompressedTextureLoader:()=>Xne,ConeBufferGeometry:()=>nM,ConeGeometry:()=>iM,CubeCamera:()=>hC,CubeGeometry:()=>oM,CubeReflectionMapping:()=>xC,CubeRefractionMapping:()=>HA,CubeTexture:()=>_h,CubeTextureLoader:()=>tB,CubeUVReflectionMapping:()=>SC,CubeUVRefractionMapping:()=>MC,CubicBezierCurve:()=>jd,CubicBezierCurve3:()=>eLe,CubicInterpolant:()=>oC,CullFaceBack:()=>wS,CullFaceFront:()=>Dz,CullFaceFrontBack:()=>jEe,CullFaceNone:()=>zie,Curve:()=>ea,CurvePath:()=>cM,CurveUtils:()=>_M,CustomBlending:()=>kz,CylinderBufferGeometry:()=>sc,CylinderGeometry:()=>Vd,Cylindrical:()=>Pz,DataTexture:()=>Nd,DataTextureLoader:()=>JRe,DefaultLoadingManager:()=>zo,DepthFormat:()=>Cd,DepthStencilFormat:()=>Jg,DepthTexture:()=>GS,DirectionalLight:()=>nC,DirectionalLightHelper:()=>Dy,DirectionalLightShadow:()=>iC,DiscreteInterpolant:()=>sC,DodecahedronBufferGeometry:()=>uy,DodecahedronGeometry:()=>qS,DoubleSide:()=>Ny,DstAlphaFactor:()=>Zie,DstColorFactor:()=>Kie,DynamicBufferAttribute:()=>mLe,EdgesGeometry:()=>gy,EdgesHelper:()=>ELe,EllipseCurve:()=>lc,EqualDepth:()=>rne,EquirectangularReflectionMapping:()=>Xz,EquirectangularRefractionMapping:()=>WA,Euler:()=>bh,EventDispatcher:()=>Ms,ExtrudeGeometry:()=>ws,Face3:()=>Fo,Face4:()=>nLe,FaceColors:()=>Oz,FaceNormalsHelper:()=>dM,FileLoader:()=>Ts,FlatShading:()=>Nz,Float32Attribute:()=>bLe,Float32BufferAttribute:()=>gr,Float64Attribute:()=>wLe,Float64BufferAttribute:()=>zS,FloatType:()=>jg,Fog:()=>ry,FogExp2:()=>ty,Font:()=>oB,FontLoader:()=>qne,FrontFaceDirectionCCW:()=>KEe,FrontFaceDirectionCW:()=>Bie,FrontSide:()=>Zg,Frustum:()=>DS,GammaEncoding:()=>Kz,Geometry:()=>or,GeometryIdCount:()=>Jz,GeometryUtils:()=>RLe,GreaterDepth:()=>nne,GreaterEqualDepth:()=>ine,GridHelper:()=>pM,Group:()=>VS,HalfFloatType:()=>YA,HemisphereLight:()=>QA,HemisphereLightHelper:()=>Py,IcosahedronBufferGeometry:()=>ly,IcosahedronGeometry:()=>YS,ImageLoader:()=>yM,ImageUtils:()=>LLe,ImmediateRenderObject:()=>fM,InstancedBufferAttribute:()=>Ey,InstancedBufferGeometry:()=>Jd,InstancedInterleavedBuffer:()=>Ty,Int16Attribute:()=>_Le,Int16BufferAttribute:()=>OS,Int32Attribute:()=>SLe,Int32BufferAttribute:()=>FS,Int8Attribute:()=>vLe,Int8BufferAttribute:()=>IS,IntType:()=>dne,InterleavedBuffer:()=>wy,InterleavedBufferAttribute:()=>Ez,Interpolant:()=>ro,InterpolateDiscrete:()=>CS,InterpolateLinear:()=>bS,InterpolateSmooth:()=>VA,JSONLoader:()=>iB,KeyframeTrack:()=>qd,LOD:()=>kS,LatheBufferGeometry:()=>dy,LatheGeometry:()=>rM,Layers:()=>qA,LensFlare:()=>_z,LessDepth:()=>tne,LessEqualDepth:()=>GA,Light:()=>Oi,LightShadow:()=>em,Line:()=>oc,Line3:()=>Rd,LineBasicMaterial:()=>Ui,LineCurve:()=>cu,LineCurve3:()=>rLe,LineDashedMaterial:()=>Yd,LinePieces:()=>oLe,LineSegments:()=>di,LineStrip:()=>aLe,LinearEncoding:()=>LS,LinearFilter:()=>to,LinearInterpolant:()=>lM,LinearMipMapLinearFilter:()=>gM,LinearMipMapNearestFilter:()=>qz,LinearToneMapping:()=>Wz,Loader:()=>Ld,LoadingManager:()=>Qz,LogLuvEncoding:()=>QEe,LoopOnce:()=>Mne,LoopPingPong:()=>wne,LoopRepeat:()=>bne,LuminanceAlphaFormat:()=>xne,LuminanceFormat:()=>_ne,MOUSE:()=>ZEe,Material:()=>mr,MaterialLoader:()=>EC,Math:()=>cr,Matrix3:()=>bs,Matrix4:()=>qt,MaxEquation:()=>sz,Mesh:()=>mn,MeshBasicMaterial:()=>io,MeshDepthMaterial:()=>Sh,MeshFaceMaterial:()=>sLe,MeshLambertMaterial:()=>Xd,MeshNormalMaterial:()=>Wd,MeshPhongMaterial:()=>ml,MeshPhysicalMaterial:()=>Gd,MeshStandardMaterial:()=>uu,MeshToonMaterial:()=>Hd,MinEquation:()=>oz,MirroredRepeatWrapping:()=>Dd,MixOperation:()=>one,MorphBlendMesh:()=>Pn,MultiMaterial:()=>sM,MultiplyBlending:()=>Bz,MultiplyOperation:()=>vM,NearestFilter:()=>Oo,NearestMipMapLinearFilter:()=>wC,NearestMipMapNearestFilter:()=>bC,NeverDepth:()=>Qie,NoBlending:()=>TS,NoColors:()=>yC,NoToneMapping:()=>kA,NormalBlending:()=>Uy,NotEqualDepth:()=>ane,NumberKeyframeTrack:()=>My,Object3D:()=>Et,ObjectLoader:()=>Yne,OctahedronBufferGeometry:()=>Bd,OctahedronGeometry:()=>XS,OneFactor:()=>Xie,OneMinusDstAlphaFactor:()=>jie,OneMinusDstColorFactor:()=>Jie,OneMinusSrcAlphaFactor:()=>Hz,OneMinusSrcColorFactor:()=>qie,OrthographicCamera:()=>ey,PCFShadowMap:()=>Iz,PCFSoftShadowMap:()=>kie,ParametricBufferGeometry:()=>oy,ParametricGeometry:()=>HS,Particle:()=>uLe,ParticleBasicMaterial:()=>hLe,ParticleSystem:()=>cLe,ParticleSystemMaterial:()=>pLe,Path:()=>xM,PerspectiveCamera:()=>Kn,Plane:()=>Io,PlaneBufferGeometry:()=>Od,PlaneGeometry:()=>tM,PointCloud:()=>lLe,PointCloudMaterial:()=>fLe,PointLight:()=>rC,PointLightHelper:()=>Ry,Points:()=>iy,PointsMaterial:()=>dl,PolarGridHelper:()=>mC,PolyhedronBufferGeometry:()=>no,PolyhedronGeometry:()=>ZS,PositionalAudio:()=>bz,Projector:()=>PLe,PropertyBinding:()=>Ri,PropertyMixer:()=>pC,QuadraticBezierCurve:()=>Kd,QuadraticBezierCurve3:()=>tLe,Quaternion:()=>on,QuaternionKeyframeTrack:()=>uM,QuaternionLinearInterpolant:()=>lC,REVISION:()=>Fie,RGBADepthPacking:()=>Ine,RGBAFormat:()=>su,RGBA_PVRTC_2BPPV1_Format:()=>gz,RGBA_PVRTC_4BPPV1_Format:()=>vz,RGBA_S3TC_DXT1_Format:()=>fz,RGBA_S3TC_DXT3_Format:()=>hz,RGBA_S3TC_DXT5_Format:()=>pz,RGBDEncoding:()=>Pne,RGBEEncoding:()=>Cne,RGBEFormat:()=>$Ee,RGBFormat:()=>Kg,RGBM16Encoding:()=>Lne,RGBM7Encoding:()=>Rne,RGB_ETC1_Format:()=>Sne,RGB_PVRTC_2BPPV1_Format:()=>mz,RGB_PVRTC_4BPPV1_Format:()=>dz,RGB_S3TC_DXT1_Format:()=>cz,RawShaderMaterial:()=>xy,Ray:()=>Mh,Raycaster:()=>Az,RectAreaLight:()=>Sz,RectAreaLightHelper:()=>Ly,ReinhardToneMapping:()=>lne,RepeatWrapping:()=>ic,ReverseSubtractEquation:()=>Hie,RingBufferGeometry:()=>py,RingGeometry:()=>eM,Scene:()=>Fd,SceneUtils:()=>iLe,ShaderChunk:()=>Xr,ShaderLib:()=>Qg,ShaderMaterial:()=>_a,ShadowMaterial:()=>_y,Shape:()=>Pd,ShapeBufferGeometry:()=>my,ShapeGeometry:()=>vy,ShapePath:()=>aB,ShapeUtils:()=>Ln,ShortType:()=>pne,Skeleton:()=>ZA,SkeletonHelper:()=>Cy,SkinnedMesh:()=>KA,SmoothShading:()=>Uz,Sphere:()=>$n,SphereBufferGeometry:()=>kd,SphereGeometry:()=>QS,Spherical:()=>Lz,SphericalReflectionMapping:()=>Yz,Spline:()=>$Re,SplineCurve:()=>Zd,SplineCurve3:()=>QRe,SpotLight:()=>tC,SpotLightHelper:()=>Ay,SpotLightShadow:()=>eC,Sprite:()=>BS,SpriteMaterial:()=>zd,SrcAlphaFactor:()=>Gz,SrcAlphaSaturateFactor:()=>$ie,SrcColorFactor:()=>Yie,StereoCamera:()=>Zne,StringKeyframeTrack:()=>uC,SubtractEquation:()=>Gie,SubtractiveBlending:()=>zz,TetrahedronBufferGeometry:()=>sy,TetrahedronGeometry:()=>WS,TextGeometry:()=>$S,Texture:()=>ni,TextureFilter:()=>uz,TextureLoader:()=>TC,TextureMapping:()=>fne,TextureWrapping:()=>lz,TorusBufferGeometry:()=>hy,TorusGeometry:()=>JS,TorusKnotBufferGeometry:()=>fy,TorusKnotGeometry:()=>KS,Triangle:()=>Ss,TriangleFanDrawMode:()=>Ene,TriangleStripDrawMode:()=>Tne,TrianglesDrawMode:()=>jz,TubeBufferGeometry:()=>cy,TubeGeometry:()=>jS,UVMapping:()=>_C,Uint16Attribute:()=>xLe,Uint16BufferAttribute:()=>nc,Uint32Attribute:()=>MLe,Uint32BufferAttribute:()=>ac,Uint8Attribute:()=>gLe,Uint8BufferAttribute:()=>NS,Uint8ClampedAttribute:()=>yLe,Uint8ClampedBufferAttribute:()=>US,Uncharted2ToneMapping:()=>une,Uniform:()=>dC,UniformsLib:()=>hr,UniformsUtils:()=>eo,UnsignedByteType:()=>XA,UnsignedInt248Type:()=>AS,UnsignedIntType:()=>Zz,UnsignedShort4444Type:()=>mne,UnsignedShort5551Type:()=>vne,UnsignedShort565Type:()=>gne,UnsignedShortType:()=>ES,Vector2:()=>St,Vector3:()=>oe,Vector4:()=>Qr,VectorKeyframeTrack:()=>Sy,Vertex:()=>dLe,VertexColors:()=>Qd,VertexNormalsHelper:()=>hM,VideoTexture:()=>JA,WebGLRenderTarget:()=>Oy,WebGLRenderTargetCube:()=>$g,WebGLRenderer:()=>$z,WireframeGeometry:()=>ay,WireframeHelper:()=>ALe,WrapAroundEnding:()=>RS,XHRLoader:()=>CLe,ZeroCurvatureEnding:()=>Id,ZeroFactor:()=>Wie,ZeroSlopeEnding:()=>Ad,sRGBEncoding:()=>Ane});function Ms(){}function St(r,e){this.x=r||0,this.y=e||0}function ni(r,e,t,i,n,a,o,s,l,u){Object.defineProperty(this,"id",{value:eAe++}),this.uuid=cr.generateUUID(),this.name="",this.image=r!==void 0?r:ni.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:ni.DEFAULT_MAPPING,this.wrapS=t!==void 0?t:Uo,this.wrapT=i!==void 0?i:Uo,this.magFilter=n!==void 0?n:to,this.minFilter=a!==void 0?a:gM,this.anisotropy=l!==void 0?l:1,this.format=o!==void 0?o:su,this.type=s!==void 0?s:XA,this.offset=new St(0,0),this.repeat=new St(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u!==void 0?u:LS,this.version=0,this.onUpdate=null}function Qr(r,e,t,i){this.x=r||0,this.y=e||0,this.z=t||0,this.w=i!==void 0?i:1}function Oy(r,e,t){this.uuid=cr.generateUUID(),this.width=r,this.height=e,this.scissor=new Qr(0,0,r,e),this.scissorTest=!1,this.viewport=new Qr(0,0,r,e),t=t||{},t.minFilter===void 0&&(t.minFilter=to),this.texture=new ni(void 0,void 0,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.depthBuffer=t.depthBuffer!==void 0?t.depthBuffer:!0,this.stencilBuffer=t.stencilBuffer!==void 0?t.stencilBuffer:!0,this.depthTexture=t.depthTexture!==void 0?t.depthTexture:null}function $g(r,e,t){Oy.call(this,r,e,t),this.activeCubeFace=0,this.activeMipMapLevel=0}function on(r,e,t,i){this._x=r||0,this._y=e||0,this._z=t||0,this._w=i!==void 0?i:1}function oe(r,e,t){this.x=r||0,this.y=e||0,this.z=t||0}function qt(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function _h(r,e,t,i,n,a,o,s,l,u){r=r!==void 0?r:[],e=e!==void 0?e:xC,ni.call(this,r,e,t,i,n,a,o,s,l,u),this.flipY=!1}function One(){this.seq=[],this.map={}}function Fy(r,e,t){var i=r[0];if(i<=0||i>0)return r;var n=e*t,a=Lie[n];if(a===void 0&&(a=new Float32Array(n),Lie[n]=a),e!==0){i.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function Fne(r,e){var t=Pie[e];t===void 0&&(t=new Int32Array(e),Pie[e]=t);for(var i=0;i!==e;++i)t[i]=r.allocTextureUnit();return t}function tAe(r,e){r.uniform1f(this.addr,e)}function rAe(r,e){r.uniform1i(this.addr,e)}function iAe(r,e){e.x===void 0?r.uniform2fv(this.addr,e):r.uniform2f(this.addr,e.x,e.y)}function nAe(r,e){e.x!==void 0?r.uniform3f(this.addr,e.x,e.y,e.z):e.r!==void 0?r.uniform3f(this.addr,e.r,e.g,e.b):r.uniform3fv(this.addr,e)}function aAe(r,e){e.x===void 0?r.uniform4fv(this.addr,e):r.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function oAe(r,e){r.uniformMatrix2fv(this.addr,!1,e.elements||e)}function sAe(r,e){r.uniformMatrix3fv(this.addr,!1,e.elements||e)}function lAe(r,e){r.uniformMatrix4fv(this.addr,!1,e.elements||e)}function uAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTexture2D(e||Nne,i)}function cAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTextureCube(e||Une,i)}function zne(r,e){r.uniform2iv(this.addr,e)}function Bne(r,e){r.uniform3iv(this.addr,e)}function kne(r,e){r.uniform4iv(this.addr,e)}function fAe(r){switch(r){case 5126:return tAe;case 35664:return iAe;case 35665:return nAe;case 35666:return aAe;case 35674:return oAe;case 35675:return sAe;case 35676:return lAe;case 35678:return uAe;case 35680:return cAe;case 5124:case 35670:return rAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function hAe(r,e){r.uniform1fv(this.addr,e)}function pAe(r,e){r.uniform1iv(this.addr,e)}function dAe(r,e){r.uniform2fv(this.addr,Fy(e,this.size,2))}function mAe(r,e){r.uniform3fv(this.addr,Fy(e,this.size,3))}function vAe(r,e){r.uniform4fv(this.addr,Fy(e,this.size,4))}function gAe(r,e){r.uniformMatrix2fv(this.addr,!1,Fy(e,this.size,4))}function yAe(r,e){r.uniformMatrix3fv(this.addr,!1,Fy(e,this.size,9))}function _Ae(r,e){r.uniformMatrix4fv(this.addr,!1,Fy(e,this.size,16))}function xAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTexture2D(e[a]||Nne,n[a])}function SAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTextureCube(e[a]||Une,n[a])}function MAe(r){switch(r){case 5126:return hAe;case 35664:return dAe;case 35665:return mAe;case 35666:return vAe;case 35674:return gAe;case 35675:return yAe;case 35676:return _Ae;case 35678:return xAe;case 35680:return SAe;case 5124:case 35670:return pAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function bAe(r,e,t){this.id=r,this.addr=t,this.setValue=fAe(e.type)}function wAe(r,e,t){this.id=r,this.addr=t,this.size=e.size,this.setValue=MAe(e.type)}function Vne(r){this.id=r,One.call(this)}function Die(r,e){r.seq.push(e),r.map[e.id]=e}function TAe(r,e,t){var i=r.name,n=i.length;for(nz.lastIndex=0;;){var a=nz.exec(i),o=nz.lastIndex,s=a[1],l=a[2]==="]",u=a[3];if(l&&(s=s|0),u===void 0||u==="["&&o+2===n){Die(t,u===void 0?new bAe(s,r,e):new wAe(s,r,e));break}else{var c=t.map,f=c[s];f===void 0&&(f=new Vne(s),Die(t,f)),t=f}}}function xh(r,e,t){One.call(this),this.renderer=t;for(var i=r.getProgramParameter(e,r.ACTIVE_UNIFORMS),n=0;n!==i;++n){var a=r.getActiveUniform(e,n),o=a.name,s=r.getUniformLocation(e,o);TAe(a,s,this)}}function Gt(r,e,t){return e===void 0&&t===void 0?this.set(r):this.setRGB(r,e,t)}function Nd(r,e,t,i,n,a,o,s,l,u,c,f){ni.call(this,null,a,o,s,l,u,i,n,c,f),this.image={data:r,width:e,height:t},this.magFilter=l!==void 0?l:Oo,this.minFilter=u!==void 0?u:Oo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function PS(r,e){this.min=r!==void 0?r:new St(1/0,1/0),this.max=e!==void 0?e:new St(-1/0,-1/0)}function TRe(r,e){var t=r.context,i=r.state,n,a,o,s,l,u,c,f;function h(){var d=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),g=new Uint16Array([0,1,2,0,2,3]);n=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,d,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,g,t.STATIC_DRAW),c=t.createTexture(),f=t.createTexture(),i.bindTexture(t.TEXTURE_2D,c),t.texImage2D(t.TEXTURE_2D,0,t.RGB,16,16,0,t.RGB,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),i.bindTexture(t.TEXTURE_2D,f),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,16,16,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),o={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join(`
+import{a as rL,b as RV,c as LV}from"./chunk-M4HTTI2X.js";import{$a as Qc,A as Nc,Aa as KM,Ba as JM,C as Uc,Ca as Tl,Ga as Xc,Ia as qc,La as Zc,Pa as jc,Sa as Kc,Ua as Jc,V as Oc,W as bV,X as wV,Xa as $c,_ as Fc,b as ZM,ba as TV,bb as ef,ca as wl,cb as EV,db as El,e as Pc,fb as tf,gb as AV,hb as rf,jb as nf,kb as CV,la as zc,pa as Bc,ra as kc,ta as Vc,u as Dc,ua as Gc,v as Ic,wa as Hc,y as jM,ya as Wc}from"./chunk-WD6SV3WH.js";import{$ as oV,Ab as vm,Bb as co,Cb as fo,D as rV,Db as gu,Eb as Pi,Fb as Ec,Gc as yV,Ge as Ac,Ha as cV,I as iV,Ib as vV,Jb as ui,Jc as _V,Ka as Ot,Kc as xV,La as uo,Lb as gV,Le as Cc,Ma as jR,Mb as tL,Me as YM,Ne as qM,Nf as Yc,Pa as fV,Q as nV,Sb as gm,Ta as br,U as aV,Va as Rt,Wa as hV,Xa as KR,Ya as pV,a as E0,ba as ZR,cc as R0,cd as SV,db as JR,dc as bl,e as Ise,eb as $R,f as Nse,fb as QR,g as YR,gb as tr,h as Use,hb as lr,hf as Rc,i as Ose,ia as sV,ib as li,ic as L0,j as WM,jb as Sl,kb as Ml,la as xl,lb as dV,lf as Lc,m as Qk,na as si,nc as XM,o as qR,oa as lV,p as eV,pa as uV,qb as mV,ra as C0,sb as Lr,tb as Ho,tf as MV,u as A0,ub as Li,vf as ym,w as tV,xd as P0,xf as _m,yb as eL,zb as Tc}from"./chunk-VDRVUQCF.js";var $ne={};YR($ne,{AddEquation:()=>Gz,AddOperation:()=>sne,AdditiveBlending:()=>zz,AlphaFormat:()=>yne,AlwaysDepth:()=>ene,AmbientLight:()=>aC,AnimationClip:()=>No,AnimationMixer:()=>fB,AnimationObjectGroup:()=>Tz,AnimationUtils:()=>Jn,ArcCurve:()=>gC,ArrowHelper:()=>$d,Audio:()=>by,AudioAnalyser:()=>cB,AudioContext:()=>lB,AudioListener:()=>bz,AudioLoader:()=>uB,AxisHelper:()=>vC,BackSide:()=>yh,BasicDepthPacking:()=>Dne,BasicShadowMap:()=>$Ee,BinaryTextureLoader:()=>tB,BlendingMode:()=>Vie,Bone:()=>jA,BooleanKeyframeTrack:()=>cC,BoundingBoxHelper:()=>ELe,Box2:()=>PS,Box3:()=>lu,BoxBufferGeometry:()=>Ud,BoxGeometry:()=>oM,BoxHelper:()=>Iy,BufferAttribute:()=>gt,BufferGeometry:()=>Bt,BufferGeometryLoader:()=>iB,ByteType:()=>hne,Cache:()=>Sz,Camera:()=>Qn,CameraHelper:()=>mM,CanvasRenderer:()=>ILe,CanvasTexture:()=>$A,CatmullRomCurve3:()=>hB,CineonToneMapping:()=>cne,CircleBufferGeometry:()=>yy,CircleGeometry:()=>aM,ClampToEdgeWrapping:()=>Uo,Clock:()=>Lz,ClosedSplineCurve3:()=>Jne,Color:()=>Gt,ColorKeyframeTrack:()=>fC,CompressedTexture:()=>ny,CompressedTextureLoader:()=>Xne,ConeBufferGeometry:()=>nM,ConeGeometry:()=>iM,CubeCamera:()=>hC,CubeGeometry:()=>oM,CubeReflectionMapping:()=>xC,CubeRefractionMapping:()=>HA,CubeTexture:()=>_h,CubeTextureLoader:()=>rB,CubeUVReflectionMapping:()=>SC,CubeUVRefractionMapping:()=>MC,CubicBezierCurve:()=>jd,CubicBezierCurve3:()=>tLe,CubicInterpolant:()=>oC,CullFaceBack:()=>wS,CullFaceFront:()=>Iz,CullFaceFrontBack:()=>KEe,CullFaceNone:()=>zie,Curve:()=>ea,CurvePath:()=>cM,CurveUtils:()=>_M,CustomBlending:()=>Vz,CylinderBufferGeometry:()=>sc,CylinderGeometry:()=>Vd,Cylindrical:()=>Dz,DataTexture:()=>Nd,DataTextureLoader:()=>$Re,DefaultLoadingManager:()=>zo,DepthFormat:()=>Cd,DepthStencilFormat:()=>Jg,DepthTexture:()=>GS,DirectionalLight:()=>nC,DirectionalLightHelper:()=>Dy,DirectionalLightShadow:()=>iC,DiscreteInterpolant:()=>sC,DodecahedronBufferGeometry:()=>uy,DodecahedronGeometry:()=>qS,DoubleSide:()=>Ny,DstAlphaFactor:()=>Zie,DstColorFactor:()=>Kie,DynamicBufferAttribute:()=>vLe,EdgesGeometry:()=>gy,EdgesHelper:()=>ALe,EllipseCurve:()=>lc,EqualDepth:()=>rne,EquirectangularReflectionMapping:()=>Yz,EquirectangularRefractionMapping:()=>WA,Euler:()=>bh,EventDispatcher:()=>Ms,ExtrudeGeometry:()=>ws,Face3:()=>Fo,Face4:()=>aLe,FaceColors:()=>Fz,FaceNormalsHelper:()=>dM,FileLoader:()=>Ts,FlatShading:()=>Uz,Float32Attribute:()=>wLe,Float32BufferAttribute:()=>gr,Float64Attribute:()=>TLe,Float64BufferAttribute:()=>zS,FloatType:()=>jg,Fog:()=>ry,FogExp2:()=>ty,Font:()=>sB,FontLoader:()=>qne,FrontFaceDirectionCCW:()=>JEe,FrontFaceDirectionCW:()=>Bie,FrontSide:()=>Zg,Frustum:()=>DS,GammaEncoding:()=>Jz,Geometry:()=>or,GeometryIdCount:()=>$z,GeometryUtils:()=>LLe,GreaterDepth:()=>nne,GreaterEqualDepth:()=>ine,GridHelper:()=>pM,Group:()=>VS,HalfFloatType:()=>YA,HemisphereLight:()=>QA,HemisphereLightHelper:()=>Py,IcosahedronBufferGeometry:()=>ly,IcosahedronGeometry:()=>YS,ImageLoader:()=>yM,ImageUtils:()=>PLe,ImmediateRenderObject:()=>fM,InstancedBufferAttribute:()=>Ey,InstancedBufferGeometry:()=>Jd,InstancedInterleavedBuffer:()=>Ty,Int16Attribute:()=>xLe,Int16BufferAttribute:()=>OS,Int32Attribute:()=>MLe,Int32BufferAttribute:()=>FS,Int8Attribute:()=>gLe,Int8BufferAttribute:()=>IS,IntType:()=>dne,InterleavedBuffer:()=>wy,InterleavedBufferAttribute:()=>Az,Interpolant:()=>ro,InterpolateDiscrete:()=>CS,InterpolateLinear:()=>bS,InterpolateSmooth:()=>VA,JSONLoader:()=>nB,KeyframeTrack:()=>qd,LOD:()=>kS,LatheBufferGeometry:()=>dy,LatheGeometry:()=>rM,Layers:()=>qA,LensFlare:()=>xz,LessDepth:()=>tne,LessEqualDepth:()=>GA,Light:()=>Oi,LightShadow:()=>em,Line:()=>oc,Line3:()=>Rd,LineBasicMaterial:()=>Ui,LineCurve:()=>cu,LineCurve3:()=>iLe,LineDashedMaterial:()=>Yd,LinePieces:()=>sLe,LineSegments:()=>di,LineStrip:()=>oLe,LinearEncoding:()=>LS,LinearFilter:()=>to,LinearInterpolant:()=>lM,LinearMipMapLinearFilter:()=>gM,LinearMipMapNearestFilter:()=>Zz,LinearToneMapping:()=>Xz,Loader:()=>Ld,LoadingManager:()=>eB,LogLuvEncoding:()=>eAe,LoopOnce:()=>Mne,LoopPingPong:()=>wne,LoopRepeat:()=>bne,LuminanceAlphaFormat:()=>xne,LuminanceFormat:()=>_ne,MOUSE:()=>jEe,Material:()=>mr,MaterialLoader:()=>EC,Math:()=>cr,Matrix3:()=>bs,Matrix4:()=>qt,MaxEquation:()=>lz,Mesh:()=>mn,MeshBasicMaterial:()=>io,MeshDepthMaterial:()=>Sh,MeshFaceMaterial:()=>lLe,MeshLambertMaterial:()=>Xd,MeshNormalMaterial:()=>Wd,MeshPhongMaterial:()=>ml,MeshPhysicalMaterial:()=>Gd,MeshStandardMaterial:()=>uu,MeshToonMaterial:()=>Hd,MinEquation:()=>sz,MirroredRepeatWrapping:()=>Dd,MixOperation:()=>one,MorphBlendMesh:()=>Pn,MultiMaterial:()=>sM,MultiplyBlending:()=>kz,MultiplyOperation:()=>vM,NearestFilter:()=>Oo,NearestMipMapLinearFilter:()=>wC,NearestMipMapNearestFilter:()=>bC,NeverDepth:()=>Qie,NoBlending:()=>TS,NoColors:()=>yC,NoToneMapping:()=>kA,NormalBlending:()=>Uy,NotEqualDepth:()=>ane,NumberKeyframeTrack:()=>My,Object3D:()=>Et,ObjectLoader:()=>Yne,OctahedronBufferGeometry:()=>Bd,OctahedronGeometry:()=>XS,OneFactor:()=>Xie,OneMinusDstAlphaFactor:()=>jie,OneMinusDstColorFactor:()=>Jie,OneMinusSrcAlphaFactor:()=>Wz,OneMinusSrcColorFactor:()=>qie,OrthographicCamera:()=>ey,PCFShadowMap:()=>Nz,PCFSoftShadowMap:()=>kie,ParametricBufferGeometry:()=>oy,ParametricGeometry:()=>HS,Particle:()=>cLe,ParticleBasicMaterial:()=>pLe,ParticleSystem:()=>fLe,ParticleSystemMaterial:()=>dLe,Path:()=>xM,PerspectiveCamera:()=>Kn,Plane:()=>Io,PlaneBufferGeometry:()=>Od,PlaneGeometry:()=>tM,PointCloud:()=>uLe,PointCloudMaterial:()=>hLe,PointLight:()=>rC,PointLightHelper:()=>Ry,Points:()=>iy,PointsMaterial:()=>dl,PolarGridHelper:()=>mC,PolyhedronBufferGeometry:()=>no,PolyhedronGeometry:()=>ZS,PositionalAudio:()=>wz,Projector:()=>DLe,PropertyBinding:()=>Ri,PropertyMixer:()=>pC,QuadraticBezierCurve:()=>Kd,QuadraticBezierCurve3:()=>rLe,Quaternion:()=>on,QuaternionKeyframeTrack:()=>uM,QuaternionLinearInterpolant:()=>lC,REVISION:()=>Fie,RGBADepthPacking:()=>Ine,RGBAFormat:()=>su,RGBA_PVRTC_2BPPV1_Format:()=>yz,RGBA_PVRTC_4BPPV1_Format:()=>gz,RGBA_S3TC_DXT1_Format:()=>hz,RGBA_S3TC_DXT3_Format:()=>pz,RGBA_S3TC_DXT5_Format:()=>dz,RGBDEncoding:()=>Pne,RGBEEncoding:()=>Cne,RGBEFormat:()=>QEe,RGBFormat:()=>Kg,RGBM16Encoding:()=>Lne,RGBM7Encoding:()=>Rne,RGB_ETC1_Format:()=>Sne,RGB_PVRTC_2BPPV1_Format:()=>vz,RGB_PVRTC_4BPPV1_Format:()=>mz,RGB_S3TC_DXT1_Format:()=>fz,RawShaderMaterial:()=>xy,Ray:()=>Mh,Raycaster:()=>Cz,RectAreaLight:()=>Mz,RectAreaLightHelper:()=>Ly,ReinhardToneMapping:()=>lne,RepeatWrapping:()=>ic,ReverseSubtractEquation:()=>Hie,RingBufferGeometry:()=>py,RingGeometry:()=>eM,Scene:()=>Fd,SceneUtils:()=>nLe,ShaderChunk:()=>Xr,ShaderLib:()=>Qg,ShaderMaterial:()=>_a,ShadowMaterial:()=>_y,Shape:()=>Pd,ShapeBufferGeometry:()=>my,ShapeGeometry:()=>vy,ShapePath:()=>oB,ShapeUtils:()=>Ln,ShortType:()=>pne,Skeleton:()=>ZA,SkeletonHelper:()=>Cy,SkinnedMesh:()=>KA,SmoothShading:()=>Oz,Sphere:()=>$n,SphereBufferGeometry:()=>kd,SphereGeometry:()=>QS,Spherical:()=>Pz,SphericalReflectionMapping:()=>qz,Spline:()=>QRe,SplineCurve:()=>Zd,SplineCurve3:()=>eLe,SpotLight:()=>tC,SpotLightHelper:()=>Ay,SpotLightShadow:()=>eC,Sprite:()=>BS,SpriteMaterial:()=>zd,SrcAlphaFactor:()=>Hz,SrcAlphaSaturateFactor:()=>$ie,SrcColorFactor:()=>Yie,StereoCamera:()=>Zne,StringKeyframeTrack:()=>uC,SubtractEquation:()=>Gie,SubtractiveBlending:()=>Bz,TetrahedronBufferGeometry:()=>sy,TetrahedronGeometry:()=>WS,TextGeometry:()=>$S,Texture:()=>ni,TextureFilter:()=>cz,TextureLoader:()=>TC,TextureMapping:()=>fne,TextureWrapping:()=>uz,TorusBufferGeometry:()=>hy,TorusGeometry:()=>JS,TorusKnotBufferGeometry:()=>fy,TorusKnotGeometry:()=>KS,Triangle:()=>Ss,TriangleFanDrawMode:()=>Ene,TriangleStripDrawMode:()=>Tne,TrianglesDrawMode:()=>Kz,TubeBufferGeometry:()=>cy,TubeGeometry:()=>jS,UVMapping:()=>_C,Uint16Attribute:()=>SLe,Uint16BufferAttribute:()=>nc,Uint32Attribute:()=>bLe,Uint32BufferAttribute:()=>ac,Uint8Attribute:()=>yLe,Uint8BufferAttribute:()=>NS,Uint8ClampedAttribute:()=>_Le,Uint8ClampedBufferAttribute:()=>US,Uncharted2ToneMapping:()=>une,Uniform:()=>dC,UniformsLib:()=>hr,UniformsUtils:()=>eo,UnsignedByteType:()=>XA,UnsignedInt248Type:()=>AS,UnsignedIntType:()=>jz,UnsignedShort4444Type:()=>mne,UnsignedShort5551Type:()=>vne,UnsignedShort565Type:()=>gne,UnsignedShortType:()=>ES,Vector2:()=>St,Vector3:()=>oe,Vector4:()=>Qr,VectorKeyframeTrack:()=>Sy,Vertex:()=>mLe,VertexColors:()=>Qd,VertexNormalsHelper:()=>hM,VideoTexture:()=>JA,WebGLRenderTarget:()=>Oy,WebGLRenderTargetCube:()=>$g,WebGLRenderer:()=>Qz,WireframeGeometry:()=>ay,WireframeHelper:()=>CLe,WrapAroundEnding:()=>RS,XHRLoader:()=>RLe,ZeroCurvatureEnding:()=>Id,ZeroFactor:()=>Wie,ZeroSlopeEnding:()=>Ad,sRGBEncoding:()=>Ane});function Ms(){}function St(r,e){this.x=r||0,this.y=e||0}function ni(r,e,t,i,n,a,o,s,l,u){Object.defineProperty(this,"id",{value:tAe++}),this.uuid=cr.generateUUID(),this.name="",this.image=r!==void 0?r:ni.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:ni.DEFAULT_MAPPING,this.wrapS=t!==void 0?t:Uo,this.wrapT=i!==void 0?i:Uo,this.magFilter=n!==void 0?n:to,this.minFilter=a!==void 0?a:gM,this.anisotropy=l!==void 0?l:1,this.format=o!==void 0?o:su,this.type=s!==void 0?s:XA,this.offset=new St(0,0),this.repeat=new St(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u!==void 0?u:LS,this.version=0,this.onUpdate=null}function Qr(r,e,t,i){this.x=r||0,this.y=e||0,this.z=t||0,this.w=i!==void 0?i:1}function Oy(r,e,t){this.uuid=cr.generateUUID(),this.width=r,this.height=e,this.scissor=new Qr(0,0,r,e),this.scissorTest=!1,this.viewport=new Qr(0,0,r,e),t=t||{},t.minFilter===void 0&&(t.minFilter=to),this.texture=new ni(void 0,void 0,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.depthBuffer=t.depthBuffer!==void 0?t.depthBuffer:!0,this.stencilBuffer=t.stencilBuffer!==void 0?t.stencilBuffer:!0,this.depthTexture=t.depthTexture!==void 0?t.depthTexture:null}function $g(r,e,t){Oy.call(this,r,e,t),this.activeCubeFace=0,this.activeMipMapLevel=0}function on(r,e,t,i){this._x=r||0,this._y=e||0,this._z=t||0,this._w=i!==void 0?i:1}function oe(r,e,t){this.x=r||0,this.y=e||0,this.z=t||0}function qt(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function _h(r,e,t,i,n,a,o,s,l,u){r=r!==void 0?r:[],e=e!==void 0?e:xC,ni.call(this,r,e,t,i,n,a,o,s,l,u),this.flipY=!1}function One(){this.seq=[],this.map={}}function Fy(r,e,t){var i=r[0];if(i<=0||i>0)return r;var n=e*t,a=Lie[n];if(a===void 0&&(a=new Float32Array(n),Lie[n]=a),e!==0){i.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function Fne(r,e){var t=Pie[e];t===void 0&&(t=new Int32Array(e),Pie[e]=t);for(var i=0;i!==e;++i)t[i]=r.allocTextureUnit();return t}function rAe(r,e){r.uniform1f(this.addr,e)}function iAe(r,e){r.uniform1i(this.addr,e)}function nAe(r,e){e.x===void 0?r.uniform2fv(this.addr,e):r.uniform2f(this.addr,e.x,e.y)}function aAe(r,e){e.x!==void 0?r.uniform3f(this.addr,e.x,e.y,e.z):e.r!==void 0?r.uniform3f(this.addr,e.r,e.g,e.b):r.uniform3fv(this.addr,e)}function oAe(r,e){e.x===void 0?r.uniform4fv(this.addr,e):r.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function sAe(r,e){r.uniformMatrix2fv(this.addr,!1,e.elements||e)}function lAe(r,e){r.uniformMatrix3fv(this.addr,!1,e.elements||e)}function uAe(r,e){r.uniformMatrix4fv(this.addr,!1,e.elements||e)}function cAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTexture2D(e||Nne,i)}function fAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTextureCube(e||Une,i)}function zne(r,e){r.uniform2iv(this.addr,e)}function Bne(r,e){r.uniform3iv(this.addr,e)}function kne(r,e){r.uniform4iv(this.addr,e)}function hAe(r){switch(r){case 5126:return rAe;case 35664:return nAe;case 35665:return aAe;case 35666:return oAe;case 35674:return sAe;case 35675:return lAe;case 35676:return uAe;case 35678:return cAe;case 35680:return fAe;case 5124:case 35670:return iAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function pAe(r,e){r.uniform1fv(this.addr,e)}function dAe(r,e){r.uniform1iv(this.addr,e)}function mAe(r,e){r.uniform2fv(this.addr,Fy(e,this.size,2))}function vAe(r,e){r.uniform3fv(this.addr,Fy(e,this.size,3))}function gAe(r,e){r.uniform4fv(this.addr,Fy(e,this.size,4))}function yAe(r,e){r.uniformMatrix2fv(this.addr,!1,Fy(e,this.size,4))}function _Ae(r,e){r.uniformMatrix3fv(this.addr,!1,Fy(e,this.size,9))}function xAe(r,e){r.uniformMatrix4fv(this.addr,!1,Fy(e,this.size,16))}function SAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTexture2D(e[a]||Nne,n[a])}function MAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTextureCube(e[a]||Une,n[a])}function bAe(r){switch(r){case 5126:return pAe;case 35664:return mAe;case 35665:return vAe;case 35666:return gAe;case 35674:return yAe;case 35675:return _Ae;case 35676:return xAe;case 35678:return SAe;case 35680:return MAe;case 5124:case 35670:return dAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function wAe(r,e,t){this.id=r,this.addr=t,this.setValue=hAe(e.type)}function TAe(r,e,t){this.id=r,this.addr=t,this.size=e.size,this.setValue=bAe(e.type)}function Vne(r){this.id=r,One.call(this)}function Die(r,e){r.seq.push(e),r.map[e.id]=e}function EAe(r,e,t){var i=r.name,n=i.length;for(az.lastIndex=0;;){var a=az.exec(i),o=az.lastIndex,s=a[1],l=a[2]==="]",u=a[3];if(l&&(s=s|0),u===void 0||u==="["&&o+2===n){Die(t,u===void 0?new wAe(s,r,e):new TAe(s,r,e));break}else{var c=t.map,f=c[s];f===void 0&&(f=new Vne(s),Die(t,f)),t=f}}}function xh(r,e,t){One.call(this),this.renderer=t;for(var i=r.getProgramParameter(e,r.ACTIVE_UNIFORMS),n=0;n!==i;++n){var a=r.getActiveUniform(e,n),o=a.name,s=r.getUniformLocation(e,o);EAe(a,s,this)}}function Gt(r,e,t){return e===void 0&&t===void 0?this.set(r):this.setRGB(r,e,t)}function Nd(r,e,t,i,n,a,o,s,l,u,c,f){ni.call(this,null,a,o,s,l,u,i,n,c,f),this.image={data:r,width:e,height:t},this.magFilter=l!==void 0?l:Oo,this.minFilter=u!==void 0?u:Oo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function PS(r,e){this.min=r!==void 0?r:new St(1/0,1/0),this.max=e!==void 0?e:new St(-1/0,-1/0)}function ERe(r,e){var t=r.context,i=r.state,n,a,o,s,l,u,c,f;function h(){var d=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),g=new Uint16Array([0,1,2,0,2,3]);n=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,d,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,g,t.STATIC_DRAW),c=t.createTexture(),f=t.createTexture(),i.bindTexture(t.TEXTURE_2D,c),t.texImage2D(t.TEXTURE_2D,0,t.RGB,16,16,0,t.RGB,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),i.bindTexture(t.TEXTURE_2D,f),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,16,16,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),o={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join(`
`),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join(`
`)},s=p(o),l={vertex:t.getAttribLocation(s,"position"),uv:t.getAttribLocation(s,"uv")},u={renderType:t.getUniformLocation(s,"renderType"),map:t.getUniformLocation(s,"map"),occlusionMap:t.getUniformLocation(s,"occlusionMap"),opacity:t.getUniformLocation(s,"opacity"),color:t.getUniformLocation(s,"color"),scale:t.getUniformLocation(s,"scale"),rotation:t.getUniformLocation(s,"rotation"),screenPosition:t.getUniformLocation(s,"screenPosition")}}this.render=function(d,g,m){if(e.length!==0){var v=new oe,_=m.w/m.z,y=m.z*.5,x=m.w*.5,M=16/m.w,S=new St(M*_,M),w=new oe(1,1,0),T=new St(1,1),C=new PS;C.min.set(m.x,m.y),C.max.set(m.x+(m.z-16),m.y+(m.w-16)),s===void 0&&h(),t.useProgram(s),i.initAttributes(),i.enableAttribute(l.vertex),i.enableAttribute(l.uv),i.disableUnusedAttributes(),t.uniform1i(u.occlusionMap,0),t.uniform1i(u.map,1),t.bindBuffer(t.ARRAY_BUFFER,n),t.vertexAttribPointer(l.vertex,2,t.FLOAT,!1,2*8,0),t.vertexAttribPointer(l.uv,2,t.FLOAT,!1,2*8,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),i.disable(t.CULL_FACE),i.setDepthWrite(!1);for(var b=0,E=e.length;b.001&&D.scale>.001&&(w.x=D.x,w.y=D.y,w.z=D.z,M=D.size*D.scale/m.w,S.x=M*_,S.y=M,t.uniform3f(u.screenPosition,w.x,w.y,w.z),t.uniform2f(u.scale,S.x,S.y),t.uniform1f(u.rotation,D.rotation),t.uniform1f(u.opacity,D.opacity),t.uniform3f(u.color,D.color.r,D.color.g,D.color.b),i.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst),r.setTexture2D(D.texture,1),t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0))}}}i.enable(t.CULL_FACE),i.enable(t.DEPTH_TEST),i.setDepthWrite(!0),r.resetGLState()}};function p(d){var g=t.createProgram(),m=t.createShader(t.FRAGMENT_SHADER),v=t.createShader(t.VERTEX_SHADER),_="precision "+r.getPrecision()+` float;
-`;return t.shaderSource(m,_+d.fragmentShader),t.shaderSource(v,_+d.vertexShader),t.compileShader(m),t.compileShader(v),t.attachShader(g,m),t.attachShader(g,v),t.linkProgram(g),g}}function ERe(r,e){var t=r.context,i=r.state,n,a,o,s,l,u,c=new oe,f=new on,h=new oe;function p(){var m=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),v=new Uint16Array([0,1,2,0,2,3]);n=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,m,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,v,t.STATIC_DRAW),o=d(),s={position:t.getAttribLocation(o,"position"),uv:t.getAttribLocation(o,"uv")},l={uvOffset:t.getUniformLocation(o,"uvOffset"),uvScale:t.getUniformLocation(o,"uvScale"),rotation:t.getUniformLocation(o,"rotation"),scale:t.getUniformLocation(o,"scale"),color:t.getUniformLocation(o,"color"),map:t.getUniformLocation(o,"map"),opacity:t.getUniformLocation(o,"opacity"),modelViewMatrix:t.getUniformLocation(o,"modelViewMatrix"),projectionMatrix:t.getUniformLocation(o,"projectionMatrix"),fogType:t.getUniformLocation(o,"fogType"),fogDensity:t.getUniformLocation(o,"fogDensity"),fogNear:t.getUniformLocation(o,"fogNear"),fogFar:t.getUniformLocation(o,"fogFar"),fogColor:t.getUniformLocation(o,"fogColor"),alphaTest:t.getUniformLocation(o,"alphaTest")};var _=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");_.width=8,_.height=8;var y=_.getContext("2d");y.fillStyle="white",y.fillRect(0,0,8,8),u=new ni(_),u.needsUpdate=!0}this.render=function(m,v){if(e.length!==0){o===void 0&&p(),t.useProgram(o),i.initAttributes(),i.enableAttribute(s.position),i.enableAttribute(s.uv),i.disableUnusedAttributes(),i.disable(t.CULL_FACE),i.enable(t.BLEND),t.bindBuffer(t.ARRAY_BUFFER,n),t.vertexAttribPointer(s.position,2,t.FLOAT,!1,2*8,0),t.vertexAttribPointer(s.uv,2,t.FLOAT,!1,2*8,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.uniformMatrix4fv(l.projectionMatrix,!1,v.projectionMatrix.elements),i.activeTexture(t.TEXTURE0),t.uniform1i(l.map,0);var _=0,y=0,x=m.fog;x?(t.uniform3f(l.fogColor,x.color.r,x.color.g,x.color.b),x.isFog?(t.uniform1f(l.fogNear,x.near),t.uniform1f(l.fogFar,x.far),t.uniform1i(l.fogType,1),_=1,y=1):x.isFogExp2&&(t.uniform1f(l.fogDensity,x.density),t.uniform1i(l.fogType,2),_=2,y=2)):(t.uniform1i(l.fogType,0),_=0,y=0);for(var M=0,S=e.length;M 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join(`
-`)),t.compileShader(v),t.compileShader(_),t.attachShader(m,v),t.attachShader(m,_),t.linkProgram(m),m}function g(m,v){return m.renderOrder!==v.renderOrder?m.renderOrder-v.renderOrder:m.z!==v.z?v.z-m.z:v.id-m.id}}function mr(){Object.defineProperty(this,"id",{value:ARe++}),this.uuid=cr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Uy,this.side=Zg,this.shading=Uz,this.vertexColors=yC,this.opacity=1,this.transparent=!1,this.blendSrc=Gz,this.blendDst=Hz,this.blendEquation=Vz,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=GA,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0}function _a(r){mr.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
+`)),t.compileShader(v),t.compileShader(_),t.attachShader(m,v),t.attachShader(m,_),t.linkProgram(m),m}function g(m,v){return m.renderOrder!==v.renderOrder?m.renderOrder-v.renderOrder:m.z!==v.z?v.z-m.z:v.id-m.id}}function mr(){Object.defineProperty(this,"id",{value:CRe++}),this.uuid=cr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Uy,this.side=Zg,this.shading=Oz,this.vertexColors=yC,this.opacity=1,this.transparent=!1,this.blendSrc=Hz,this.blendDst=Wz,this.blendEquation=Gz,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=GA,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0}function _a(r){mr.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,this.fragmentShader=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
-}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,r!==void 0&&(r.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(r))}function Sh(r){mr.call(this),this.type="MeshDepthMaterial",this.depthPacking=Dne,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(r)}function lu(r,e){this.min=r!==void 0?r:new oe(1/0,1/0,1/0),this.max=e!==void 0?e:new oe(-1/0,-1/0,-1/0)}function $n(r,e){this.center=r!==void 0?r:new oe,this.radius=e!==void 0?e:0}function bs(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Io(r,e){this.normal=r!==void 0?r:new oe(1,0,0),this.constant=e!==void 0?e:0}function DS(r,e,t,i,n,a){this.planes=[r!==void 0?r:new Io,e!==void 0?e:new Io,t!==void 0?t:new Io,i!==void 0?i:new Io,n!==void 0?n:new Io,a!==void 0?a:new Io]}function Gne(r,e,t,i){var n=r.context,a=r.state,o=new DS,s=new qt,l=e.shadows,u=new St,c=new St(i.maxTextureSize,i.maxTextureSize),f=new oe,h=new oe,p=[],d=1,g=2,m=(d|g)+1,v=new Array(m),_=new Array(m),y={},x=[new oe(1,0,0),new oe(-1,0,0),new oe(0,0,1),new oe(0,0,-1),new oe(0,1,0),new oe(0,-1,0)],M=[new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,0,1),new oe(0,0,-1)],S=[new Qr,new Qr,new Qr,new Qr,new Qr,new Qr],w=new Sh;w.depthPacking=Ine,w.clipping=!0;for(var T=Qg.distanceRGBA,C=eo.clone(T.uniforms),b=0;b!==m;++b){var E=(b&d)!==0,I=(b&g)!==0,R=w.clone();R.morphTargets=E,R.skinning=I,v[b]=R;var A=new _a({defines:{USE_SHADOWMAP:""},uniforms:C,vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,morphTargets:E,skinning:I,clipping:!0});_[b]=A}var D=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Iz,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(F,k){if(D.enabled!==!1&&!(D.autoUpdate===!1&&D.needsUpdate===!1)&&l.length!==0){a.buffers.color.setClear(1,1,1,1),a.disable(n.BLEND),a.setDepthTest(!0),a.setScissorTest(!1);for(var G,Y,J=0,Q=l.length;J0:J&&J.isGeometry&&(ae=J.morphTargets&&J.morphTargets.length>0));var ve=F.isSkinnedMesh&&k.skinning,ue=0;ae&&(ue|=d),ve&&(ue|=g),Q=V[ue]}if(r.localClippingEnabled&&k.clipShadows===!0&&k.clippingPlanes.length!==0){var se=Q.uuid,Ee=k.uuid,q=y[se];q===void 0&&(q={},y[se]=q);var H=q[Ee];H===void 0&&(H=Q.clone(),q[Ee]=H),Q=H}Q.visible=k.visible,Q.wireframe=k.wireframe;var We=k.side;return D.renderSingleSided&&We==Ny&&(We=Zg),D.renderReverseSided&&(We===Zg?We=yh:We===yh&&(We=Zg)),Q.side=We,Q.clipShadows=k.clipShadows,Q.clippingPlanes=k.clippingPlanes,Q.wireframeLinewidth=k.wireframeLinewidth,Q.linewidth=k.linewidth,G&&Q.uniforms.lightPos!==void 0&&Q.uniforms.lightPos.value.copy(Y),Q}function B(F,k,G){if(F.visible!==!1){var Y=(F.layers.mask&k.layers.mask)!==0;if(Y&&(F.isMesh||F.isLine||F.isPoints)&&F.castShadow&&(F.frustumCulled===!1||o.intersectsObject(F)===!0)){var J=F.material;J.visible===!0&&(F.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,F.matrixWorld),p.push(F))}for(var Q=F.children,V=0,K=Q.length;V65535?Uint32Array:Uint16Array)(l),c=new Float32Array(s*3),f=new Float32Array(s*3),h=new Float32Array(s*2),p=0,d=0,g=0,m=0,v=0;x("z","y","x",-1,-1,t,e,r,a,n,0),x("z","y","x",1,-1,t,e,-r,a,n,1),x("x","z","y",1,1,r,t,e,i,a,2),x("x","z","y",1,-1,r,t,-e,i,a,3),x("x","y","z",1,-1,r,e,t,i,n,4),x("x","y","z",-1,-1,r,e,-t,i,n,5),this.setIndex(new gt(u,1)),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(f,3)),this.addAttribute("uv",new gt(h,2));function _(M,S,w){var T=0;return T+=(M+1)*(S+1)*2,T+=(M+1)*(w+1)*2,T+=(w+1)*(S+1)*2,T}function y(M,S,w){var T=0;return T+=M*S*2,T+=M*w*2,T+=w*S*2,T*6}function x(M,S,w,T,C,b,E,I,R,A,D){for(var U=b/R,B=E/A,F=b/2,k=E/2,G=I/2,Y=R+1,J=A+1,Q=0,V=0,K=new oe,ae=0;ae0?1:-1,f[p]=K.x,f[p+1]=K.y,f[p+2]=K.z,h[d]=ue/R,h[d+1]=1-ae/A,p+=3,d+=2,Q+=1}for(ae=0;ae65535?Uint32Array:Uint16Array)(o*s*6),v=0;v0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Io(r,e){this.normal=r!==void 0?r:new oe(1,0,0),this.constant=e!==void 0?e:0}function DS(r,e,t,i,n,a){this.planes=[r!==void 0?r:new Io,e!==void 0?e:new Io,t!==void 0?t:new Io,i!==void 0?i:new Io,n!==void 0?n:new Io,a!==void 0?a:new Io]}function Gne(r,e,t,i){var n=r.context,a=r.state,o=new DS,s=new qt,l=e.shadows,u=new St,c=new St(i.maxTextureSize,i.maxTextureSize),f=new oe,h=new oe,p=[],d=1,g=2,m=(d|g)+1,v=new Array(m),_=new Array(m),y={},x=[new oe(1,0,0),new oe(-1,0,0),new oe(0,0,1),new oe(0,0,-1),new oe(0,1,0),new oe(0,-1,0)],M=[new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,0,1),new oe(0,0,-1)],S=[new Qr,new Qr,new Qr,new Qr,new Qr,new Qr],w=new Sh;w.depthPacking=Ine,w.clipping=!0;for(var T=Qg.distanceRGBA,C=eo.clone(T.uniforms),b=0;b!==m;++b){var E=(b&d)!==0,I=(b&g)!==0,R=w.clone();R.morphTargets=E,R.skinning=I,v[b]=R;var A=new _a({defines:{USE_SHADOWMAP:""},uniforms:C,vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,morphTargets:E,skinning:I,clipping:!0});_[b]=A}var D=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Nz,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(F,k){if(D.enabled!==!1&&!(D.autoUpdate===!1&&D.needsUpdate===!1)&&l.length!==0){a.buffers.color.setClear(1,1,1,1),a.disable(n.BLEND),a.setDepthTest(!0),a.setScissorTest(!1);for(var G,Y,J=0,Q=l.length;J0:J&&J.isGeometry&&(ae=J.morphTargets&&J.morphTargets.length>0));var ve=F.isSkinnedMesh&&k.skinning,ue=0;ae&&(ue|=d),ve&&(ue|=g),Q=V[ue]}if(r.localClippingEnabled&&k.clipShadows===!0&&k.clippingPlanes.length!==0){var se=Q.uuid,Ee=k.uuid,q=y[se];q===void 0&&(q={},y[se]=q);var H=q[Ee];H===void 0&&(H=Q.clone(),q[Ee]=H),Q=H}Q.visible=k.visible,Q.wireframe=k.wireframe;var We=k.side;return D.renderSingleSided&&We==Ny&&(We=Zg),D.renderReverseSided&&(We===Zg?We=yh:We===yh&&(We=Zg)),Q.side=We,Q.clipShadows=k.clipShadows,Q.clippingPlanes=k.clippingPlanes,Q.wireframeLinewidth=k.wireframeLinewidth,Q.linewidth=k.linewidth,G&&Q.uniforms.lightPos!==void 0&&Q.uniforms.lightPos.value.copy(Y),Q}function B(F,k,G){if(F.visible!==!1){var Y=(F.layers.mask&k.layers.mask)!==0;if(Y&&(F.isMesh||F.isLine||F.isPoints)&&F.castShadow&&(F.frustumCulled===!1||o.intersectsObject(F)===!0)){var J=F.material;J.visible===!0&&(F.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,F.matrixWorld),p.push(F))}for(var Q=F.children,V=0,K=Q.length;V65535?Uint32Array:Uint16Array)(l),c=new Float32Array(s*3),f=new Float32Array(s*3),h=new Float32Array(s*2),p=0,d=0,g=0,m=0,v=0;x("z","y","x",-1,-1,t,e,r,a,n,0),x("z","y","x",1,-1,t,e,-r,a,n,1),x("x","z","y",1,1,r,t,e,i,a,2),x("x","z","y",1,-1,r,t,-e,i,a,3),x("x","y","z",1,-1,r,e,t,i,n,4),x("x","y","z",-1,-1,r,e,-t,i,n,5),this.setIndex(new gt(u,1)),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(f,3)),this.addAttribute("uv",new gt(h,2));function _(M,S,w){var T=0;return T+=(M+1)*(S+1)*2,T+=(M+1)*(w+1)*2,T+=(w+1)*(S+1)*2,T}function y(M,S,w){var T=0;return T+=M*S*2,T+=M*w*2,T+=w*S*2,T*6}function x(M,S,w,T,C,b,E,I,R,A,D){for(var U=b/R,B=E/A,F=b/2,k=E/2,G=I/2,Y=R+1,J=A+1,Q=0,V=0,K=new oe,ae=0;ae0?1:-1,f[p]=K.x,f[p+1]=K.y,f[p+2]=K.z,h[d]=ue/R,h[d+1]=1-ae/A,p+=3,d+=2,Q+=1}for(ae=0;ae65535?Uint32Array:Uint16Array)(o*s*6),v=0;v/g;function t(i,n){var a=Xr[n];if(a===void 0)throw new Error("Can not resolve #include <"+n+">");return yz(a)}return r.replace(e,t)}function Uie(r){var e=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function t(i,n,a,o){for(var s="",l=parseInt(n);l0?r.gammaFactor:1,d=FRe(a,i,r.extensions),g=zRe(o),m=n.createProgram(),v,_;t.isRawShaderMaterial?(v=[g,`
+`)}function Iie(r,e,t){var i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),r.getShaderParameter(i,r.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),r.getShaderInfoLog(i)!==""&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===r.VERTEX_SHADER?"vertex":"fragment",r.getShaderInfoLog(i),NRe(t)),i}function Wne(r){switch(r){case LS:return["Linear","( value )"];case Ane:return["sRGB","( value )"];case Cne:return["RGBE","( value )"];case Rne:return["RGBM","( value, 7.0 )"];case Lne:return["RGBM","( value, 16.0 )"];case Pne:return["RGBD","( value, 256.0 )"];case Jz:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+r)}}function oz(r,e){var t=Wne(e);return"vec4 "+r+"( vec4 value ) { return "+t[0]+"ToLinear"+t[1]+"; }"}function ORe(r,e){var t=Wne(e);return"vec4 "+r+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function FRe(r,e){var t;switch(e){case Xz:t="Linear";break;case lne:t="Reinhard";break;case une:t="Uncharted2";break;case cne:t="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function zRe(r,e,t){r=r||{};var i=[r.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(r.fragDepth||e.logarithmicDepthBuffer)&&t.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",r.drawBuffers&&t.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(r.shaderTextureLOD||e.envMap)&&t.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return i.filter(MS).join(`
+`)}function BRe(r){var e=[];for(var t in r){var i=r[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(`
+`)}function kRe(r,e,t){for(var i={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES),a=0;a/g;function t(i,n){var a=Xr[n];if(a===void 0)throw new Error("Can not resolve #include <"+n+">");return _z(a)}return r.replace(e,t)}function Uie(r){var e=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function t(i,n,a,o){for(var s="",l=parseInt(n);l0?r.gammaFactor:1,d=zRe(a,i,r.extensions),g=BRe(o),m=n.createProgram(),v,_;t.isRawShaderMaterial?(v=[g,`
`].filter(MS).join(`
`),_=[d,g,`
`].filter(MS).join(`
`)):(v=["precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,g,i.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+i.maxBones,i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+f:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.displacementMap&&i.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexColors?"#define USE_COLOR":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.useVertexTexture?"#define BONE_TEXTURE":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&i.flatShading===!1?"#define USE_MORPHNORMALS":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+i.numClippingPlanes,i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&r.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
`].filter(MS).join(`
-`),_=[d,"precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,g,i.alphaTest?"#define ALPHATEST "+i.alphaTest:"","#define GAMMA_FACTOR "+p,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+c:"",i.envMap?"#define "+f:"",i.envMap?"#define "+h:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexColors?"#define USE_COLOR":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+i.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(i.numClippingPlanes-i.numClipIntersection),i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&r.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",i.envMap&&r.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",i.toneMapping!==kA?"#define TONE_MAPPING":"",i.toneMapping!==kA?Xr.tonemapping_pars_fragment:"",i.toneMapping!==kA?ORe("toneMapping",i.toneMapping):"",i.outputEncoding||i.mapEncoding||i.envMapEncoding||i.emissiveMapEncoding?Xr.encodings_pars_fragment:"",i.mapEncoding?az("mapTexelToLinear",i.mapEncoding):"",i.envMapEncoding?az("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMapEncoding?az("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.outputEncoding?URe("linearToOutputTexel",i.outputEncoding):"",i.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
+`),_=[d,"precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,g,i.alphaTest?"#define ALPHATEST "+i.alphaTest:"","#define GAMMA_FACTOR "+p,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+c:"",i.envMap?"#define "+f:"",i.envMap?"#define "+h:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexColors?"#define USE_COLOR":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+i.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(i.numClippingPlanes-i.numClipIntersection),i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&r.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",i.envMap&&r.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",i.toneMapping!==kA?"#define TONE_MAPPING":"",i.toneMapping!==kA?Xr.tonemapping_pars_fragment:"",i.toneMapping!==kA?FRe("toneMapping",i.toneMapping):"",i.outputEncoding||i.mapEncoding||i.envMapEncoding||i.emissiveMapEncoding?Xr.encodings_pars_fragment:"",i.mapEncoding?oz("mapTexelToLinear",i.mapEncoding):"",i.envMapEncoding?oz("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMapEncoding?oz("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.outputEncoding?ORe("linearToOutputTexel",i.outputEncoding):"",i.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
`].filter(MS).join(`
-`)),s=yz(s,i),s=Nie(s,i),l=yz(l,i),l=Nie(l,i),t.isShaderMaterial||(s=Uie(s),l=Uie(l));var y=v+s,x=_+l,M=Iie(n,n.VERTEX_SHADER,y),S=Iie(n,n.FRAGMENT_SHADER,x);n.attachShader(m,M),n.attachShader(m,S),t.index0AttributeName!==void 0?n.bindAttribLocation(m,0,t.index0AttributeName):i.morphTargets===!0&&n.bindAttribLocation(m,0,"position"),n.linkProgram(m);var w=n.getProgramInfoLog(m),T=n.getShaderInfoLog(M),C=n.getShaderInfoLog(S),b=!0,E=!0;n.getProgramParameter(m,n.LINK_STATUS)===!1?(b=!1,console.error("THREE.WebGLProgram: shader error: ",n.getError(),"gl.VALIDATE_STATUS",n.getProgramParameter(m,n.VALIDATE_STATUS),"gl.getProgramInfoLog",w,T,C)):w!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",w):(T===""||C==="")&&(E=!1),E&&(this.diagnostics={runnable:b,material:t,programLog:w,vertexShader:{log:T,prefix:v},fragmentShader:{log:C,prefix:_}}),n.deleteShader(M),n.deleteShader(S);var I;this.getUniforms=function(){return I===void 0&&(I=new xh(n,m,r)),I};var R;return this.getAttributes=function(){return R===void 0&&(R=BRe(n,m)),R},this.destroy=function(){n.deleteProgram(m),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=NRe++,this.code=e,this.usedTimes=1,this.program=m,this.vertexShader=M,this.fragmentShader=S,this}function VRe(r,e){var t=[],i={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},n=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking"];function a(s){if(e.floatVertexTextures&&s&&s.skeleton&&s.skeleton.useVertexTexture)return 1024;var l=e.maxVertexUniforms,u=Math.floor((l-20)/4),c=u;return s!==void 0&&s&&s.isSkinnedMesh&&(c=Math.min(s.skeleton.bones.length,c),c0,shadowMapType:r.shadowMap.type,toneMapping:r.toneMapping,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,alphaTest:s.alphaTest,doubleSided:s.side===Ny,flipSided:s.side===yh,depthPacking:s.depthPacking!==void 0?s.depthPacking:!1};return v},this.getProgramCode=function(s,l){var u=[];if(l.shaderID?u.push(l.shaderID):(u.push(s.fragmentShader),u.push(s.vertexShader)),s.defines!==void 0)for(var c in s.defines)u.push(c),u.push(s.defines[c]);for(var f=0;f65535?Uint32Array:Uint16Array,C=new gt(new T(p),1);return a(C,r.ELEMENT_ARRAY_BUFFER),h.wireframe=C,C}return{getAttributeBuffer:l,getAttributeProperties:u,getWireframeAttribute:c,update:n}}function WRe(r,e,t,i,n,a,o){var s=o.memory,l=typeof WebGL2RenderingContext<"u"&&r instanceof WebGL2RenderingContext;function u(R,A){if(R.width>A||R.height>A){var D=A/Math.max(R.width,R.height),U=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");U.width=Math.floor(R.width*D),U.height=Math.floor(R.height*D);var B=U.getContext("2d");return B.drawImage(R,0,0,R.width,R.height,0,0,U.width,U.height),console.warn("THREE.WebGLRenderer: image is too big ("+R.width+"x"+R.height+"). Resized to "+U.width+"x"+U.height,R),U}return R}function c(R){return cr.isPowerOfTwo(R.width)&&cr.isPowerOfTwo(R.height)}function f(R){if(R instanceof HTMLImageElement||R instanceof HTMLCanvasElement){var A=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");A.width=cr.nearestPowerOfTwo(R.width),A.height=cr.nearestPowerOfTwo(R.height);var D=A.getContext("2d");return D.drawImage(R,0,0,A.width,A.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+R.width+"x"+R.height+"). Resized to "+A.width+"x"+A.height,R),A}return R}function h(R){return R.wrapS!==Uo||R.wrapT!==Uo||R.minFilter!==Oo&&R.minFilter!==to}function p(R){return R===Oo||R===bC||R===wC?r.NEAREST:r.LINEAR}function d(R){var A=R.target;A.removeEventListener("dispose",d),m(A),s.textures--}function g(R){var A=R.target;A.removeEventListener("dispose",g),v(A),s.textures--}function m(R){var A=i.get(R);if(R.image&&A.__image__webglTextureCube)r.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)return;r.deleteTexture(A.__webglTexture)}i.delete(R)}function v(R){var A=i.get(R),D=i.get(R.texture);if(R){if(D.__webglTexture!==void 0&&r.deleteTexture(D.__webglTexture),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLRenderTargetCube)for(var U=0;U<6;U++)r.deleteFramebuffer(A.__webglFramebuffer[U]),A.__webglDepthbuffer&&r.deleteRenderbuffer(A.__webglDepthbuffer[U]);else r.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&r.deleteRenderbuffer(A.__webglDepthbuffer);i.delete(R.texture),i.delete(R)}}function _(R,A){var D=i.get(R);if(R.version>0&&D.__version!==R.version){var U=R.image;if(U===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",R);else if(U.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",R);else{S(D,R,A);return}}t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_2D,D.__webglTexture)}function y(R,A){var D=i.get(R);if(R.image.length===6)if(R.version>0&&D.__version!==R.version){D.__image__webglTextureCube||(R.addEventListener("dispose",d),D.__image__webglTextureCube=r.createTexture(),s.textures++),t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,D.__image__webglTextureCube),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,R.flipY);for(var U=R&&R.isCompressedTexture,B=R.image[0]&&R.image[0].isDataTexture,F=[],k=0;k<6;k++)!U&&!B?F[k]=u(R.image[k],n.maxCubemapSize):F[k]=B?R.image[k].image:R.image[k];var G=F[0],Y=c(G),J=a(R.format),Q=a(R.type);M(r.TEXTURE_CUBE_MAP,R,Y);for(var k=0;k<6;k++)if(!U)B?t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,J,F[k].width,F[k].height,0,J,Q,F[k].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,J,J,Q,F[k]);else for(var V,K=F[k].mipmaps,ae=0,ve=K.length;ae-1?t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,ae,J,V.width,V.height,0,V.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,ae,J,V.width,V.height,0,J,Q,V.data);R.generateMipmaps&&Y&&r.generateMipmap(r.TEXTURE_CUBE_MAP),D.__version=R.version,R.onUpdate&&R.onUpdate(R)}else t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,D.__image__webglTextureCube)}function x(R,A){t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,i.get(R).__webglTexture)}function M(R,A,D){var U;if(D?(r.texParameteri(R,r.TEXTURE_WRAP_S,a(A.wrapS)),r.texParameteri(R,r.TEXTURE_WRAP_T,a(A.wrapT)),r.texParameteri(R,r.TEXTURE_MAG_FILTER,a(A.magFilter)),r.texParameteri(R,r.TEXTURE_MIN_FILTER,a(A.minFilter))):(r.texParameteri(R,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(R,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(A.wrapS!==Uo||A.wrapT!==Uo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",A),r.texParameteri(R,r.TEXTURE_MAG_FILTER,p(A.magFilter)),r.texParameteri(R,r.TEXTURE_MIN_FILTER,p(A.minFilter)),A.minFilter!==Oo&&A.minFilter!==to&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",A)),U=e.get("EXT_texture_filter_anisotropic"),U){if(A.type===jg&&e.get("OES_texture_float_linear")===null||A.type===YA&&e.get("OES_texture_half_float_linear")===null)return;(A.anisotropy>1||i.get(A).__currentAnisotropy)&&(r.texParameterf(R,U.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,n.getMaxAnisotropy())),i.get(A).__currentAnisotropy=A.anisotropy)}}function S(R,A,D){R.__webglInit===void 0&&(R.__webglInit=!0,A.addEventListener("dispose",d),R.__webglTexture=r.createTexture(),s.textures++),t.activeTexture(r.TEXTURE0+D),t.bindTexture(r.TEXTURE_2D,R.__webglTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,A.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,A.unpackAlignment);var U=u(A.image,n.maxTextureSize);h(A)&&c(U)===!1&&(U=f(U));var B=c(U),F=a(A.format),k=a(A.type);M(r.TEXTURE_2D,A,B);var G,Y=A.mipmaps;if(A.isDepthTexture){var J=r.DEPTH_COMPONENT;if(A.type===jg){if(!l)throw new Error("Float Depth Texture only supported in WebGL2.0");J=r.DEPTH_COMPONENT32F}else l&&(J=r.DEPTH_COMPONENT16);A.format===Cd&&J===r.DEPTH_COMPONENT&&A.type!==ES&&A.type!==Zz&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=ES,k=a(A.type)),A.format===Jg&&(J=r.DEPTH_STENCIL,A.type!==AS&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=AS,k=a(A.type))),t.texImage2D(r.TEXTURE_2D,0,J,U.width,U.height,0,F,k,null)}else if(A.isDataTexture)if(Y.length>0&&B){for(var Q=0,V=Y.length;Q-1?t.compressedTexImage2D(r.TEXTURE_2D,Q,F,G.width,G.height,0,G.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):t.texImage2D(r.TEXTURE_2D,Q,F,G.width,G.height,0,F,k,G.data);else if(Y.length>0&&B){for(var Q=0,V=Y.length;Q=1,U=null,B={},F=new Qr,k=new Qr;function G($,it,Xe){var ze=new Uint8Array(4),we=r.createTexture();r.bindTexture($,we),r.texParameteri($,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri($,r.TEXTURE_MAG_FILTER,r.NEAREST);for(var Ie=0;Ie0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";x="mediump"}return x==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=t.precision!==void 0?t.precision:"highp",s=a(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var l=t.logarithmicDepthBuffer===!0&&!!e.get("EXT_frag_depth"),u=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),c=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=r.getParameter(r.MAX_TEXTURE_SIZE),h=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),d=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),g=r.getParameter(r.MAX_VARYING_VECTORS),m=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),v=c>0,_=!!e.get("OES_texture_float"),y=v&&_;return{getMaxAnisotropy:n,getMaxPrecision:a,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:c,maxTextureSize:f,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:_,floatVertexTextures:y}}function ZRe(r){var e={};return{get:function(t){if(e[t]!==void 0)return e[t];var i;switch(t){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":i=r.getExtension("WEBGL_compressed_texture_etc1");break;default:i=r.getExtension(t)}return i===null&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e[t]=i,i}}}function jRe(){var r=this,e=null,t=0,i=!1,n=!1,a=new Io,o=new bs,s={value:null,needsUpdate:!1};this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(c,f,h){var p=c.length!==0||f||t!==0||i;return i=f,e=u(c,h,0),t=c.length,p},this.beginShadows=function(){n=!0,u(null)},this.endShadows=function(){n=!1,l()},this.setState=function(c,f,h,p,d,g){if(!i||c===null||c.length===0||n&&!h)n?u(null):l();else{var m=n?0:t,v=m*4,_=d.clippingState||null;s.value=_,_=u(c,p,v,g);for(var y=0;y!==v;++y)_[y]=e[y];d.clippingState=_,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=m}};function l(){s.value!==e&&(s.value=e,s.needsUpdate=t>0),r.numPlanes=t,r.numIntersection=0}function u(c,f,h,p){var d=c!==null?c.length:0,g=null;if(d!==0){if(g=s.value,p!==!0||g===null){var m=h+d*4,v=f.matrixWorldInverse;o.getNormalMatrix(v),(g===null||g.length