(()=>{var e,t={874:(e,t,o)=>{var r=o(19),n=r,i=function(){return this?this:"undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:Function("return this")()}.call(null),s=o(21);n.object.extend(proto,s),n.exportSymbol("proto.Conf.Artwork",null,i),n.exportSymbol("proto.Conf.Battery",null,i),n.exportSymbol("proto.Conf.BatteryAttenEnum",null,i),n.exportSymbol("proto.Conf.BatteryChannelEnum",null,i),n.exportSymbol("proto.Conf.Button",null,i),n.exportSymbol("proto.Conf.ButtonAction",null,i),n.exportSymbol("proto.Conf.ButtonActions",null,i),n.exportSymbol("proto.Conf.Config",null,i),n.exportSymbol("proto.Conf.DACDev",null,i),n.exportSymbol("proto.Conf.DACModelEnum",null,i),n.exportSymbol("proto.Conf.Dev",null,i),n.exportSymbol("proto.Conf.DeviceTypeEnum",null,i),n.exportSymbol("proto.Conf.DispCommon",null,i),n.exportSymbol("proto.Conf.DispOffsets",null,i),n.exportSymbol("proto.Conf.DisplayDev",null,i),n.exportSymbol("proto.Conf.DisplayDev.DisptypeCase",null,i),n.exportSymbol("proto.Conf.DisplayDriverEnum",null,i),n.exportSymbol("proto.Conf.Eth",null,i),n.exportSymbol("proto.Conf.Eth.EthtypeCase",null,i),n.exportSymbol("proto.Conf.EthCommon",null,i),n.exportSymbol("proto.Conf.EthModelEnum",null,i),n.exportSymbol("proto.Conf.EthRMII",null,i),n.exportSymbol("proto.Conf.EthSPI",null,i),n.exportSymbol("proto.Conf.EthType",null,i),n.exportSymbol("proto.Conf.GPIO",null,i),n.exportSymbol("proto.Conf.GPIOExp",null,i),n.exportSymbol("proto.Conf.GPIOExpModelEnum",null,i),n.exportSymbol("proto.Conf.Gpios",null,i),n.exportSymbol("proto.Conf.HostEnum",null,i),n.exportSymbol("proto.Conf.I2CBus",null,i),n.exportSymbol("proto.Conf.I2CDisplay",null,i),n.exportSymbol("proto.Conf.I2CPortEnum",null,i),n.exportSymbol("proto.Conf.LEDStrip",null,i),n.exportSymbol("proto.Conf.MCKEnum",null,i),n.exportSymbol("proto.Conf.Metadata",null,i),n.exportSymbol("proto.Conf.PortEnum",null,i),n.exportSymbol("proto.Conf.Rotary",null,i),n.exportSymbol("proto.Conf.SPDIFDev",null,i),n.exportSymbol("proto.Conf.SPIBus",null,i),n.exportSymbol("proto.Conf.SPIDisplay",null,i),n.exportSymbol("proto.Conf.Services",null,i),n.exportSymbol("proto.Conf.SleepService",null,i),n.exportSymbol("proto.Conf.WS2812",null,i),proto.Conf.GPIO=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.GPIO,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.GPIO.displayName="proto.Conf.GPIO"),proto.Conf.I2CBus=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.I2CBus,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.I2CBus.displayName="proto.Conf.I2CBus"),proto.Conf.DACDev=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.DACDev,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.DACDev.displayName="proto.Conf.DACDev"),proto.Conf.SPDIFDev=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.SPDIFDev,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.SPDIFDev.displayName="proto.Conf.SPDIFDev"),proto.Conf.DispOffsets=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.DispOffsets,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.DispOffsets.displayName="proto.Conf.DispOffsets"),proto.Conf.DispCommon=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.DispCommon,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.DispCommon.displayName="proto.Conf.DispCommon"),proto.Conf.I2CDisplay=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.I2CDisplay,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.I2CDisplay.displayName="proto.Conf.I2CDisplay"),proto.Conf.SPIDisplay=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.SPIDisplay,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.SPIDisplay.displayName="proto.Conf.SPIDisplay"),proto.Conf.SPIBus=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.SPIBus,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.SPIBus.displayName="proto.Conf.SPIBus"),proto.Conf.DisplayDev=function(e){r.Message.initialize(this,e,0,-1,null,proto.Conf.DisplayDev.oneofGroups_)},n.inherits(proto.Conf.DisplayDev,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.DisplayDev.displayName="proto.Conf.DisplayDev"),proto.Conf.GPIOExp=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.GPIOExp,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.GPIOExp.displayName="proto.Conf.GPIOExp"),proto.Conf.WS2812=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.WS2812,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.WS2812.displayName="proto.Conf.WS2812"),proto.Conf.LEDStrip=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.LEDStrip,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.LEDStrip.displayName="proto.Conf.LEDStrip"),proto.Conf.Rotary=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Rotary,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Rotary.displayName="proto.Conf.Rotary"),proto.Conf.ButtonActions=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.ButtonActions,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.ButtonActions.displayName="proto.Conf.ButtonActions"),proto.Conf.Button=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Button,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Button.displayName="proto.Conf.Button"),proto.Conf.EthCommon=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.EthCommon,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.EthCommon.displayName="proto.Conf.EthCommon"),proto.Conf.EthSPI=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.EthSPI,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.EthSPI.displayName="proto.Conf.EthSPI"),proto.Conf.EthRMII=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.EthRMII,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.EthRMII.displayName="proto.Conf.EthRMII"),proto.Conf.Eth=function(e){r.Message.initialize(this,e,0,-1,null,proto.Conf.Eth.oneofGroups_)},n.inherits(proto.Conf.Eth,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Eth.displayName="proto.Conf.Eth"),proto.Conf.Battery=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Battery,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Battery.displayName="proto.Conf.Battery"),proto.Conf.Gpios=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Gpios,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Gpios.displayName="proto.Conf.Gpios"),proto.Conf.Dev=function(e){r.Message.initialize(this,e,0,-1,proto.Conf.Dev.repeatedFields_,null)},n.inherits(proto.Conf.Dev,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Dev.displayName="proto.Conf.Dev"),proto.Conf.SleepService=function(e){r.Message.initialize(this,e,0,-1,proto.Conf.SleepService.repeatedFields_,null)},n.inherits(proto.Conf.SleepService,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.SleepService.displayName="proto.Conf.SleepService"),proto.Conf.Artwork=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Artwork,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Artwork.displayName="proto.Conf.Artwork"),proto.Conf.Metadata=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Metadata,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Metadata.displayName="proto.Conf.Metadata"),proto.Conf.Services=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Services,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Services.displayName="proto.Conf.Services"),proto.Conf.Config=function(e){r.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Conf.Config,r.Message),n.DEBUG&&!COMPILED&&(proto.Conf.Config.displayName="proto.Conf.Config"),r.Message.GENERATE_TO_OBJECT&&(proto.Conf.GPIO.prototype.toObject=function(e){return proto.Conf.GPIO.toObject(e,this)},proto.Conf.GPIO.toObject=function(e,t){var o={pin:r.Message.getFieldWithDefault(t,1,0),level:r.Message.getFieldWithDefault(t,2,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.GPIO.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.GPIO;return proto.Conf.GPIO.deserializeBinaryFromReader(o,t)},proto.Conf.GPIO.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readInt32();e.setPin(o);break;case 2:o=t.readInt32();e.setLevel(o);break;default:t.skipField()}}return e},proto.Conf.GPIO.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.GPIO.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.GPIO.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getPin())&&t.writeInt32(1,o),null!=(o=r.Message.getField(e,2))&&t.writeInt32(2,o)},proto.Conf.GPIO.prototype.getPin=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.GPIO.prototype.setPin=function(e){return r.Message.setProto3IntField(this,1,e)},proto.Conf.GPIO.prototype.getLevel=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.GPIO.prototype.setLevel=function(e){return r.Message.setField(this,2,e)},proto.Conf.GPIO.prototype.clearLevel=function(){return r.Message.setField(this,2,void 0)},proto.Conf.GPIO.prototype.hasLevel=function(){return null!=r.Message.getField(this,2)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.I2CBus.prototype.toObject=function(e){return proto.Conf.I2CBus.toObject(e,this)},proto.Conf.I2CBus.toObject=function(e,t){var o,n={port:r.Message.getFieldWithDefault(t,1,0),speed:r.Message.getFieldWithDefault(t,2,0),sda:(o=t.getSda())&&proto.Conf.GPIO.toObject(e,o),scl:(o=t.getScl())&&proto.Conf.GPIO.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.I2CBus.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.I2CBus;return proto.Conf.I2CBus.deserializeBinaryFromReader(o,t)},proto.Conf.I2CBus.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setPort(o);break;case 2:o=t.readInt32();e.setSpeed(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setSda(o);break;case 4:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setScl(o);break;default:t.skipField()}}return e},proto.Conf.I2CBus.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.I2CBus.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.I2CBus.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getPort())&&t.writeEnum(1,o),0!==(o=e.getSpeed())&&t.writeInt32(2,o),null!=(o=e.getSda())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getScl())&&t.writeMessage(4,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.I2CBus.prototype.getPort=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.I2CBus.prototype.setPort=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.I2CBus.prototype.getSpeed=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.I2CBus.prototype.setSpeed=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.I2CBus.prototype.getSda=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.I2CBus.prototype.setSda=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.I2CBus.prototype.clearSda=function(){return this.setSda(void 0)},proto.Conf.I2CBus.prototype.hasSda=function(){return null!=r.Message.getField(this,3)},proto.Conf.I2CBus.prototype.getScl=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,4)},proto.Conf.I2CBus.prototype.setScl=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.I2CBus.prototype.clearScl=function(){return this.setScl(void 0)},proto.Conf.I2CBus.prototype.hasScl=function(){return null!=r.Message.getField(this,4)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.DACDev.prototype.toObject=function(e){return proto.Conf.DACDev.toObject(e,this)},proto.Conf.DACDev.toObject=function(e,t){var o,n={bck:(o=t.getBck())&&proto.Conf.GPIO.toObject(e,o),ws:(o=t.getWs())&&proto.Conf.GPIO.toObject(e,o),dout:(o=t.getDout())&&proto.Conf.GPIO.toObject(e,o),mck:r.Message.getFieldWithDefault(t,4,0),mute:(o=t.getMute())&&proto.Conf.GPIO.toObject(e,o),model:r.Message.getFieldWithDefault(t,6,0),i2c:(o=t.getI2c())&&proto.Conf.I2CBus.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.DACDev.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.DACDev;return proto.Conf.DACDev.deserializeBinaryFromReader(o,t)},proto.Conf.DACDev.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setBck(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setWs(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setDout(o);break;case 4:o=t.readEnum();e.setMck(o);break;case 5:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setMute(o);break;case 6:o=t.readEnum();e.setModel(o);break;case 7:o=new proto.Conf.I2CBus;t.readMessage(o,proto.Conf.I2CBus.deserializeBinaryFromReader),e.setI2c(o);break;default:t.skipField()}}return e},proto.Conf.DACDev.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.DACDev.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.DACDev.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getBck())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getWs())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getDout())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getMck())&&t.writeEnum(4,o),null!=(o=e.getMute())&&t.writeMessage(5,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getModel())&&t.writeEnum(6,o),null!=(o=e.getI2c())&&t.writeMessage(7,o,proto.Conf.I2CBus.serializeBinaryToWriter)},proto.Conf.DACDev.prototype.getBck=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.DACDev.prototype.setBck=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.DACDev.prototype.clearBck=function(){return this.setBck(void 0)},proto.Conf.DACDev.prototype.hasBck=function(){return null!=r.Message.getField(this,1)},proto.Conf.DACDev.prototype.getWs=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.DACDev.prototype.setWs=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.DACDev.prototype.clearWs=function(){return this.setWs(void 0)},proto.Conf.DACDev.prototype.hasWs=function(){return null!=r.Message.getField(this,2)},proto.Conf.DACDev.prototype.getDout=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.DACDev.prototype.setDout=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.DACDev.prototype.clearDout=function(){return this.setDout(void 0)},proto.Conf.DACDev.prototype.hasDout=function(){return null!=r.Message.getField(this,3)},proto.Conf.DACDev.prototype.getMck=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.DACDev.prototype.setMck=function(e){return r.Message.setProto3EnumField(this,4,e)},proto.Conf.DACDev.prototype.getMute=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,5)},proto.Conf.DACDev.prototype.setMute=function(e){return r.Message.setWrapperField(this,5,e)},proto.Conf.DACDev.prototype.clearMute=function(){return this.setMute(void 0)},proto.Conf.DACDev.prototype.hasMute=function(){return null!=r.Message.getField(this,5)},proto.Conf.DACDev.prototype.getModel=function(){return r.Message.getFieldWithDefault(this,6,0)},proto.Conf.DACDev.prototype.setModel=function(e){return r.Message.setProto3EnumField(this,6,e)},proto.Conf.DACDev.prototype.getI2c=function(){return r.Message.getWrapperField(this,proto.Conf.I2CBus,7)},proto.Conf.DACDev.prototype.setI2c=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.DACDev.prototype.clearI2c=function(){return this.setI2c(void 0)},proto.Conf.DACDev.prototype.hasI2c=function(){return null!=r.Message.getField(this,7)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.SPDIFDev.prototype.toObject=function(e){return proto.Conf.SPDIFDev.toObject(e,this)},proto.Conf.SPDIFDev.toObject=function(e,t){var o,r={dc:(o=t.getDc())&&proto.Conf.GPIO.toObject(e,o),data:(o=t.getData())&&proto.Conf.GPIO.toObject(e,o),clk:(o=t.getClk())&&proto.Conf.GPIO.toObject(e,o)};return e&&(r.$jspbMessageInstance=t),r}),proto.Conf.SPDIFDev.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.SPDIFDev;return proto.Conf.SPDIFDev.deserializeBinaryFromReader(o,t)},proto.Conf.SPDIFDev.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setDc(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setData(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setClk(o);break;default:t.skipField()}}return e},proto.Conf.SPDIFDev.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.SPDIFDev.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.SPDIFDev.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getDc())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getData())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getClk())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.SPDIFDev.prototype.getDc=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.SPDIFDev.prototype.setDc=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.SPDIFDev.prototype.clearDc=function(){return this.setDc(void 0)},proto.Conf.SPDIFDev.prototype.hasDc=function(){return null!=r.Message.getField(this,1)},proto.Conf.SPDIFDev.prototype.getData=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.SPDIFDev.prototype.setData=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.SPDIFDev.prototype.clearData=function(){return this.setData(void 0)},proto.Conf.SPDIFDev.prototype.hasData=function(){return null!=r.Message.getField(this,2)},proto.Conf.SPDIFDev.prototype.getClk=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.SPDIFDev.prototype.setClk=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.SPDIFDev.prototype.clearClk=function(){return this.setClk(void 0)},proto.Conf.SPDIFDev.prototype.hasClk=function(){return null!=r.Message.getField(this,3)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.DispOffsets.prototype.toObject=function(e){return proto.Conf.DispOffsets.toObject(e,this)},proto.Conf.DispOffsets.toObject=function(e,t){var o={height:r.Message.getFieldWithDefault(t,1,0),width:r.Message.getFieldWithDefault(t,2,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.DispOffsets.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.DispOffsets;return proto.Conf.DispOffsets.deserializeBinaryFromReader(o,t)},proto.Conf.DispOffsets.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readInt32();e.setHeight(o);break;case 2:o=t.readInt32();e.setWidth(o);break;default:t.skipField()}}return e},proto.Conf.DispOffsets.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.DispOffsets.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.DispOffsets.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getHeight())&&t.writeInt32(1,o),0!==(o=e.getWidth())&&t.writeInt32(2,o)},proto.Conf.DispOffsets.prototype.getHeight=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.DispOffsets.prototype.setHeight=function(e){return r.Message.setProto3IntField(this,1,e)},proto.Conf.DispOffsets.prototype.getWidth=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.DispOffsets.prototype.setWidth=function(e){return r.Message.setProto3IntField(this,2,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.DispCommon.prototype.toObject=function(e){return proto.Conf.DispCommon.toObject(e,this)},proto.Conf.DispCommon.toObject=function(e,t){var o,n={width:r.Message.getFieldWithDefault(t,1,0),height:r.Message.getFieldWithDefault(t,2,0),hflip:r.Message.getBooleanFieldWithDefault(t,3,!1),vflip:r.Message.getBooleanFieldWithDefault(t,4,!1),driver:r.Message.getFieldWithDefault(t,5,0),bitdepth:r.Message.getFieldWithDefault(t,6,0),back:(o=t.getBack())&&proto.Conf.GPIO.toObject(e,o),reset:(o=t.getReset())&&proto.Conf.GPIO.toObject(e,o),ready:(o=t.getReady())&&proto.Conf.GPIO.toObject(e,o),offsets:(o=t.getOffsets())&&proto.Conf.DispOffsets.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.DispCommon.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.DispCommon;return proto.Conf.DispCommon.deserializeBinaryFromReader(o,t)},proto.Conf.DispCommon.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readInt32();e.setWidth(o);break;case 2:o=t.readInt32();e.setHeight(o);break;case 3:o=t.readBool();e.setHflip(o);break;case 4:o=t.readBool();e.setVflip(o);break;case 5:o=t.readEnum();e.setDriver(o);break;case 6:o=t.readInt32();e.setBitdepth(o);break;case 7:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setBack(o);break;case 8:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setReset(o);break;case 9:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setReady(o);break;case 10:o=new proto.Conf.DispOffsets;t.readMessage(o,proto.Conf.DispOffsets.deserializeBinaryFromReader),e.setOffsets(o);break;default:t.skipField()}}return e},proto.Conf.DispCommon.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.DispCommon.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.DispCommon.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getWidth())&&t.writeInt32(1,o),0!==(o=e.getHeight())&&t.writeInt32(2,o),(o=e.getHflip())&&t.writeBool(3,o),(o=e.getVflip())&&t.writeBool(4,o),0!==(o=e.getDriver())&&t.writeEnum(5,o),0!==(o=e.getBitdepth())&&t.writeInt32(6,o),null!=(o=e.getBack())&&t.writeMessage(7,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getReset())&&t.writeMessage(8,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getReady())&&t.writeMessage(9,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getOffsets())&&t.writeMessage(10,o,proto.Conf.DispOffsets.serializeBinaryToWriter)},proto.Conf.DispCommon.prototype.getWidth=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.DispCommon.prototype.setWidth=function(e){return r.Message.setProto3IntField(this,1,e)},proto.Conf.DispCommon.prototype.getHeight=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.DispCommon.prototype.setHeight=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.DispCommon.prototype.getHflip=function(){return r.Message.getBooleanFieldWithDefault(this,3,!1)},proto.Conf.DispCommon.prototype.setHflip=function(e){return r.Message.setProto3BooleanField(this,3,e)},proto.Conf.DispCommon.prototype.getVflip=function(){return r.Message.getBooleanFieldWithDefault(this,4,!1)},proto.Conf.DispCommon.prototype.setVflip=function(e){return r.Message.setProto3BooleanField(this,4,e)},proto.Conf.DispCommon.prototype.getDriver=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.Conf.DispCommon.prototype.setDriver=function(e){return r.Message.setProto3EnumField(this,5,e)},proto.Conf.DispCommon.prototype.getBitdepth=function(){return r.Message.getFieldWithDefault(this,6,0)},proto.Conf.DispCommon.prototype.setBitdepth=function(e){return r.Message.setProto3IntField(this,6,e)},proto.Conf.DispCommon.prototype.getBack=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,7)},proto.Conf.DispCommon.prototype.setBack=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.DispCommon.prototype.clearBack=function(){return this.setBack(void 0)},proto.Conf.DispCommon.prototype.hasBack=function(){return null!=r.Message.getField(this,7)},proto.Conf.DispCommon.prototype.getReset=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,8)},proto.Conf.DispCommon.prototype.setReset=function(e){return r.Message.setWrapperField(this,8,e)},proto.Conf.DispCommon.prototype.clearReset=function(){return this.setReset(void 0)},proto.Conf.DispCommon.prototype.hasReset=function(){return null!=r.Message.getField(this,8)},proto.Conf.DispCommon.prototype.getReady=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,9)},proto.Conf.DispCommon.prototype.setReady=function(e){return r.Message.setWrapperField(this,9,e)},proto.Conf.DispCommon.prototype.clearReady=function(){return this.setReady(void 0)},proto.Conf.DispCommon.prototype.hasReady=function(){return null!=r.Message.getField(this,9)},proto.Conf.DispCommon.prototype.getOffsets=function(){return r.Message.getWrapperField(this,proto.Conf.DispOffsets,10)},proto.Conf.DispCommon.prototype.setOffsets=function(e){return r.Message.setWrapperField(this,10,e)},proto.Conf.DispCommon.prototype.clearOffsets=function(){return this.setOffsets(void 0)},proto.Conf.DispCommon.prototype.hasOffsets=function(){return null!=r.Message.getField(this,10)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.I2CDisplay.prototype.toObject=function(e){return proto.Conf.I2CDisplay.toObject(e,this)},proto.Conf.I2CDisplay.toObject=function(e,t){var o={address:r.Message.getFieldWithDefault(t,1,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.I2CDisplay.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.I2CDisplay;return proto.Conf.I2CDisplay.deserializeBinaryFromReader(o,t)},proto.Conf.I2CDisplay.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var o=t.readInt32();e.setAddress(o)}else t.skipField()}return e},proto.Conf.I2CDisplay.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.I2CDisplay.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.I2CDisplay.serializeBinaryToWriter=function(e,t){var o;0!==(o=e.getAddress())&&t.writeInt32(1,o)},proto.Conf.I2CDisplay.prototype.getAddress=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.I2CDisplay.prototype.setAddress=function(e){return r.Message.setProto3IntField(this,1,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.SPIDisplay.prototype.toObject=function(e){return proto.Conf.SPIDisplay.toObject(e,this)},proto.Conf.SPIDisplay.toObject=function(e,t){var o,n={cs:(o=t.getCs())&&proto.Conf.GPIO.toObject(e,o),speed:r.Message.getFieldWithDefault(t,4,0),rotate:r.Message.getBooleanFieldWithDefault(t,5,!1)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.SPIDisplay.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.SPIDisplay;return proto.Conf.SPIDisplay.deserializeBinaryFromReader(o,t)},proto.Conf.SPIDisplay.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setCs(o);break;case 4:o=t.readInt32();e.setSpeed(o);break;case 5:o=t.readBool();e.setRotate(o);break;default:t.skipField()}}return e},proto.Conf.SPIDisplay.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.SPIDisplay.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.SPIDisplay.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getCs())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getSpeed())&&t.writeInt32(4,o),(o=e.getRotate())&&t.writeBool(5,o)},proto.Conf.SPIDisplay.prototype.getCs=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.SPIDisplay.prototype.setCs=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.SPIDisplay.prototype.clearCs=function(){return this.setCs(void 0)},proto.Conf.SPIDisplay.prototype.hasCs=function(){return null!=r.Message.getField(this,1)},proto.Conf.SPIDisplay.prototype.getSpeed=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.SPIDisplay.prototype.setSpeed=function(e){return r.Message.setProto3IntField(this,4,e)},proto.Conf.SPIDisplay.prototype.getRotate=function(){return r.Message.getBooleanFieldWithDefault(this,5,!1)},proto.Conf.SPIDisplay.prototype.setRotate=function(e){return r.Message.setProto3BooleanField(this,5,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.SPIBus.prototype.toObject=function(e){return proto.Conf.SPIBus.toObject(e,this)},proto.Conf.SPIBus.toObject=function(e,t){var o,n={mosi:(o=t.getMosi())&&proto.Conf.GPIO.toObject(e,o),miso:(o=t.getMiso())&&proto.Conf.GPIO.toObject(e,o),clk:(o=t.getClk())&&proto.Conf.GPIO.toObject(e,o),dc:(o=t.getDc())&&proto.Conf.GPIO.toObject(e,o),host:r.Message.getFieldWithDefault(t,5,0)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.SPIBus.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.SPIBus;return proto.Conf.SPIBus.deserializeBinaryFromReader(o,t)},proto.Conf.SPIBus.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setMosi(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setMiso(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setClk(o);break;case 4:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setDc(o);break;case 5:o=t.readEnum();e.setHost(o);break;default:t.skipField()}}return e},proto.Conf.SPIBus.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.SPIBus.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.SPIBus.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getMosi())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getMiso())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getClk())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getDc())&&t.writeMessage(4,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getHost())&&t.writeEnum(5,o)},proto.Conf.SPIBus.prototype.getMosi=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.SPIBus.prototype.setMosi=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.SPIBus.prototype.clearMosi=function(){return this.setMosi(void 0)},proto.Conf.SPIBus.prototype.hasMosi=function(){return null!=r.Message.getField(this,1)},proto.Conf.SPIBus.prototype.getMiso=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.SPIBus.prototype.setMiso=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.SPIBus.prototype.clearMiso=function(){return this.setMiso(void 0)},proto.Conf.SPIBus.prototype.hasMiso=function(){return null!=r.Message.getField(this,2)},proto.Conf.SPIBus.prototype.getClk=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.SPIBus.prototype.setClk=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.SPIBus.prototype.clearClk=function(){return this.setClk(void 0)},proto.Conf.SPIBus.prototype.hasClk=function(){return null!=r.Message.getField(this,3)},proto.Conf.SPIBus.prototype.getDc=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,4)},proto.Conf.SPIBus.prototype.setDc=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.SPIBus.prototype.clearDc=function(){return this.setDc(void 0)},proto.Conf.SPIBus.prototype.hasDc=function(){return null!=r.Message.getField(this,4)},proto.Conf.SPIBus.prototype.getHost=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.Conf.SPIBus.prototype.setHost=function(e){return r.Message.setProto3EnumField(this,5,e)},proto.Conf.DisplayDev.oneofGroups_=[[3,4]],proto.Conf.DisplayDev.DisptypeCase={DISPTYPE_NOT_SET:0,I2C:3,SPI:4},proto.Conf.DisplayDev.prototype.getDisptypeCase=function(){return r.Message.computeOneofCase(this,proto.Conf.DisplayDev.oneofGroups_[0])},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.DisplayDev.prototype.toObject=function(e){return proto.Conf.DisplayDev.toObject(e,this)},proto.Conf.DisplayDev.toObject=function(e,t){var o,n={type:r.Message.getFieldWithDefault(t,1,0),common:(o=t.getCommon())&&proto.Conf.DispCommon.toObject(e,o),i2c:(o=t.getI2c())&&proto.Conf.I2CDisplay.toObject(e,o),spi:(o=t.getSpi())&&proto.Conf.SPIDisplay.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.DisplayDev.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.DisplayDev;return proto.Conf.DisplayDev.deserializeBinaryFromReader(o,t)},proto.Conf.DisplayDev.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setType(o);break;case 2:o=new proto.Conf.DispCommon;t.readMessage(o,proto.Conf.DispCommon.deserializeBinaryFromReader),e.setCommon(o);break;case 3:o=new proto.Conf.I2CDisplay;t.readMessage(o,proto.Conf.I2CDisplay.deserializeBinaryFromReader),e.setI2c(o);break;case 4:o=new proto.Conf.SPIDisplay;t.readMessage(o,proto.Conf.SPIDisplay.deserializeBinaryFromReader),e.setSpi(o);break;default:t.skipField()}}return e},proto.Conf.DisplayDev.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.DisplayDev.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.DisplayDev.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getType())&&t.writeEnum(1,o),null!=(o=e.getCommon())&&t.writeMessage(2,o,proto.Conf.DispCommon.serializeBinaryToWriter),null!=(o=e.getI2c())&&t.writeMessage(3,o,proto.Conf.I2CDisplay.serializeBinaryToWriter),null!=(o=e.getSpi())&&t.writeMessage(4,o,proto.Conf.SPIDisplay.serializeBinaryToWriter)},proto.Conf.DisplayDev.prototype.getType=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.DisplayDev.prototype.setType=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.DisplayDev.prototype.getCommon=function(){return r.Message.getWrapperField(this,proto.Conf.DispCommon,2)},proto.Conf.DisplayDev.prototype.setCommon=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.DisplayDev.prototype.clearCommon=function(){return this.setCommon(void 0)},proto.Conf.DisplayDev.prototype.hasCommon=function(){return null!=r.Message.getField(this,2)},proto.Conf.DisplayDev.prototype.getI2c=function(){return r.Message.getWrapperField(this,proto.Conf.I2CDisplay,3)},proto.Conf.DisplayDev.prototype.setI2c=function(e){return r.Message.setOneofWrapperField(this,3,proto.Conf.DisplayDev.oneofGroups_[0],e)},proto.Conf.DisplayDev.prototype.clearI2c=function(){return this.setI2c(void 0)},proto.Conf.DisplayDev.prototype.hasI2c=function(){return null!=r.Message.getField(this,3)},proto.Conf.DisplayDev.prototype.getSpi=function(){return r.Message.getWrapperField(this,proto.Conf.SPIDisplay,4)},proto.Conf.DisplayDev.prototype.setSpi=function(e){return r.Message.setOneofWrapperField(this,4,proto.Conf.DisplayDev.oneofGroups_[0],e)},proto.Conf.DisplayDev.prototype.clearSpi=function(){return this.setSpi(void 0)},proto.Conf.DisplayDev.prototype.hasSpi=function(){return null!=r.Message.getField(this,4)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.GPIOExp.prototype.toObject=function(e){return proto.Conf.GPIOExp.toObject(e,this)},proto.Conf.GPIOExp.toObject=function(e,t){var o,n={model:r.Message.getFieldWithDefault(t,1,0),addr:r.Message.getFieldWithDefault(t,2,0),port:r.Message.getFieldWithDefault(t,3,0),base:r.Message.getFieldWithDefault(t,4,0),count:r.Message.getFieldWithDefault(t,5,0),intr:(o=t.getIntr())&&proto.Conf.GPIO.toObject(e,o),cs:(o=t.getCs())&&proto.Conf.GPIO.toObject(e,o),speed:r.Message.getFieldWithDefault(t,8,0)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.GPIOExp.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.GPIOExp;return proto.Conf.GPIOExp.deserializeBinaryFromReader(o,t)},proto.Conf.GPIOExp.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setModel(o);break;case 2:o=t.readInt32();e.setAddr(o);break;case 3:o=t.readEnum();e.setPort(o);break;case 4:o=t.readInt32();e.setBase(o);break;case 5:o=t.readInt32();e.setCount(o);break;case 6:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setIntr(o);break;case 7:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setCs(o);break;case 8:o=t.readInt32();e.setSpeed(o);break;default:t.skipField()}}return e},proto.Conf.GPIOExp.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.GPIOExp.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.GPIOExp.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getModel())&&t.writeEnum(1,o),0!==(o=e.getAddr())&&t.writeInt32(2,o),0!==(o=e.getPort())&&t.writeEnum(3,o),0!==(o=e.getBase())&&t.writeInt32(4,o),0!==(o=e.getCount())&&t.writeInt32(5,o),null!=(o=e.getIntr())&&t.writeMessage(6,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getCs())&&t.writeMessage(7,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getSpeed())&&t.writeInt32(8,o)},proto.Conf.GPIOExp.prototype.getModel=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.GPIOExp.prototype.setModel=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.GPIOExp.prototype.getAddr=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.GPIOExp.prototype.setAddr=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.GPIOExp.prototype.getPort=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.Conf.GPIOExp.prototype.setPort=function(e){return r.Message.setProto3EnumField(this,3,e)},proto.Conf.GPIOExp.prototype.getBase=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.GPIOExp.prototype.setBase=function(e){return r.Message.setProto3IntField(this,4,e)},proto.Conf.GPIOExp.prototype.getCount=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.Conf.GPIOExp.prototype.setCount=function(e){return r.Message.setProto3IntField(this,5,e)},proto.Conf.GPIOExp.prototype.getIntr=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,6)},proto.Conf.GPIOExp.prototype.setIntr=function(e){return r.Message.setWrapperField(this,6,e)},proto.Conf.GPIOExp.prototype.clearIntr=function(){return this.setIntr(void 0)},proto.Conf.GPIOExp.prototype.hasIntr=function(){return null!=r.Message.getField(this,6)},proto.Conf.GPIOExp.prototype.getCs=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,7)},proto.Conf.GPIOExp.prototype.setCs=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.GPIOExp.prototype.clearCs=function(){return this.setCs(void 0)},proto.Conf.GPIOExp.prototype.hasCs=function(){return null!=r.Message.getField(this,7)},proto.Conf.GPIOExp.prototype.getSpeed=function(){return r.Message.getFieldWithDefault(this,8,0)},proto.Conf.GPIOExp.prototype.setSpeed=function(e){return r.Message.setProto3IntField(this,8,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.WS2812.prototype.toObject=function(e){return proto.Conf.WS2812.toObject(e,this)},proto.Conf.WS2812.toObject=function(e,t){var o,n={length:r.Message.getFieldWithDefault(t,1,0),gpio:(o=t.getGpio())&&proto.Conf.GPIO.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.WS2812.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.WS2812;return proto.Conf.WS2812.deserializeBinaryFromReader(o,t)},proto.Conf.WS2812.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readInt32();e.setLength(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setGpio(o);break;default:t.skipField()}}return e},proto.Conf.WS2812.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.WS2812.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.WS2812.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getLength())&&t.writeInt32(1,o),null!=(o=e.getGpio())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.WS2812.prototype.getLength=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.WS2812.prototype.setLength=function(e){return r.Message.setProto3IntField(this,1,e)},proto.Conf.WS2812.prototype.getGpio=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.WS2812.prototype.setGpio=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.WS2812.prototype.clearGpio=function(){return this.setGpio(void 0)},proto.Conf.WS2812.prototype.hasGpio=function(){return null!=r.Message.getField(this,2)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.LEDStrip.prototype.toObject=function(e){return proto.Conf.LEDStrip.toObject(e,this)},proto.Conf.LEDStrip.toObject=function(e,t){var o,r={ws2812:(o=t.getWs2812())&&proto.Conf.WS2812.toObject(e,o)};return e&&(r.$jspbMessageInstance=t),r}),proto.Conf.LEDStrip.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.LEDStrip;return proto.Conf.LEDStrip.deserializeBinaryFromReader(o,t)},proto.Conf.LEDStrip.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var o=new proto.Conf.WS2812;t.readMessage(o,proto.Conf.WS2812.deserializeBinaryFromReader),e.setWs2812(o)}else t.skipField()}return e},proto.Conf.LEDStrip.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.LEDStrip.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.LEDStrip.serializeBinaryToWriter=function(e,t){var o;null!=(o=e.getWs2812())&&t.writeMessage(1,o,proto.Conf.WS2812.serializeBinaryToWriter)},proto.Conf.LEDStrip.prototype.getWs2812=function(){return r.Message.getWrapperField(this,proto.Conf.WS2812,1)},proto.Conf.LEDStrip.prototype.setWs2812=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.LEDStrip.prototype.clearWs2812=function(){return this.setWs2812(void 0)},proto.Conf.LEDStrip.prototype.hasWs2812=function(){return null!=r.Message.getField(this,1)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Rotary.prototype.toObject=function(e){return proto.Conf.Rotary.toObject(e,this)},proto.Conf.Rotary.toObject=function(e,t){var o,n={a:(o=t.getA())&&proto.Conf.GPIO.toObject(e,o),b:(o=t.getB())&&proto.Conf.GPIO.toObject(e,o),sw:(o=t.getSw())&&proto.Conf.GPIO.toObject(e,o),knobonly:r.Message.getFieldWithDefault(t,4,0),volume:r.Message.getBooleanFieldWithDefault(t,5,!1),longpress:r.Message.getBooleanFieldWithDefault(t,6,!1)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Rotary.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Rotary;return proto.Conf.Rotary.deserializeBinaryFromReader(o,t)},proto.Conf.Rotary.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setA(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setB(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setSw(o);break;case 4:o=t.readInt32();e.setKnobonly(o);break;case 5:o=t.readBool();e.setVolume(o);break;case 6:o=t.readBool();e.setLongpress(o);break;default:t.skipField()}}return e},proto.Conf.Rotary.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Rotary.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Rotary.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getA())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getB())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getSw())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getKnobonly())&&t.writeInt32(4,o),(o=e.getVolume())&&t.writeBool(5,o),(o=e.getLongpress())&&t.writeBool(6,o)},proto.Conf.Rotary.prototype.getA=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.Rotary.prototype.setA=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Rotary.prototype.clearA=function(){return this.setA(void 0)},proto.Conf.Rotary.prototype.hasA=function(){return null!=r.Message.getField(this,1)},proto.Conf.Rotary.prototype.getB=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.Rotary.prototype.setB=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Rotary.prototype.clearB=function(){return this.setB(void 0)},proto.Conf.Rotary.prototype.hasB=function(){return null!=r.Message.getField(this,2)},proto.Conf.Rotary.prototype.getSw=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.Rotary.prototype.setSw=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.Rotary.prototype.clearSw=function(){return this.setSw(void 0)},proto.Conf.Rotary.prototype.hasSw=function(){return null!=r.Message.getField(this,3)},proto.Conf.Rotary.prototype.getKnobonly=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.Rotary.prototype.setKnobonly=function(e){return r.Message.setProto3IntField(this,4,e)},proto.Conf.Rotary.prototype.getVolume=function(){return r.Message.getBooleanFieldWithDefault(this,5,!1)},proto.Conf.Rotary.prototype.setVolume=function(e){return r.Message.setProto3BooleanField(this,5,e)},proto.Conf.Rotary.prototype.getLongpress=function(){return r.Message.getBooleanFieldWithDefault(this,6,!1)},proto.Conf.Rotary.prototype.setLongpress=function(e){return r.Message.setProto3BooleanField(this,6,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.ButtonActions.prototype.toObject=function(e){return proto.Conf.ButtonActions.toObject(e,this)},proto.Conf.ButtonActions.toObject=function(e,t){var o={pressed:r.Message.getFieldWithDefault(t,1,0),released:r.Message.getFieldWithDefault(t,2,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.ButtonActions.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.ButtonActions;return proto.Conf.ButtonActions.deserializeBinaryFromReader(o,t)},proto.Conf.ButtonActions.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setPressed(o);break;case 2:o=t.readEnum();e.setReleased(o);break;default:t.skipField()}}return e},proto.Conf.ButtonActions.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.ButtonActions.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.ButtonActions.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getPressed())&&t.writeEnum(1,o),0!==(o=e.getReleased())&&t.writeEnum(2,o)},proto.Conf.ButtonActions.prototype.getPressed=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.ButtonActions.prototype.setPressed=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.ButtonActions.prototype.getReleased=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.ButtonActions.prototype.setReleased=function(e){return r.Message.setProto3EnumField(this,2,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Button.prototype.toObject=function(e){return proto.Conf.Button.toObject(e,this)},proto.Conf.Button.toObject=function(e,t){var o,n={gpio:(o=t.getGpio())&&proto.Conf.GPIO.toObject(e,o),pull:r.Message.getBooleanFieldWithDefault(t,2,!1),debounce:r.Message.getFieldWithDefault(t,3,0),shifter:(o=t.getShifter())&&proto.Conf.GPIO.toObject(e,o),longduration:r.Message.getFieldWithDefault(t,5,0),normal:(o=t.getNormal())&&proto.Conf.ButtonActions.toObject(e,o),longpress:(o=t.getLongpress())&&proto.Conf.ButtonActions.toObject(e,o),shifted:(o=t.getShifted())&&proto.Conf.ButtonActions.toObject(e,o),longshifted:(o=t.getLongshifted())&&proto.Conf.ButtonActions.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Button.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Button;return proto.Conf.Button.deserializeBinaryFromReader(o,t)},proto.Conf.Button.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setGpio(o);break;case 2:o=t.readBool();e.setPull(o);break;case 3:o=t.readInt32();e.setDebounce(o);break;case 4:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setShifter(o);break;case 5:o=t.readInt32();e.setLongduration(o);break;case 6:o=new proto.Conf.ButtonActions;t.readMessage(o,proto.Conf.ButtonActions.deserializeBinaryFromReader),e.setNormal(o);break;case 7:o=new proto.Conf.ButtonActions;t.readMessage(o,proto.Conf.ButtonActions.deserializeBinaryFromReader),e.setLongpress(o);break;case 8:o=new proto.Conf.ButtonActions;t.readMessage(o,proto.Conf.ButtonActions.deserializeBinaryFromReader),e.setShifted(o);break;case 9:o=new proto.Conf.ButtonActions;t.readMessage(o,proto.Conf.ButtonActions.deserializeBinaryFromReader),e.setLongshifted(o);break;default:t.skipField()}}return e},proto.Conf.Button.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Button.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Button.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getGpio())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),(o=e.getPull())&&t.writeBool(2,o),0!==(o=e.getDebounce())&&t.writeInt32(3,o),null!=(o=e.getShifter())&&t.writeMessage(4,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getLongduration())&&t.writeInt32(5,o),null!=(o=e.getNormal())&&t.writeMessage(6,o,proto.Conf.ButtonActions.serializeBinaryToWriter),null!=(o=e.getLongpress())&&t.writeMessage(7,o,proto.Conf.ButtonActions.serializeBinaryToWriter),null!=(o=e.getShifted())&&t.writeMessage(8,o,proto.Conf.ButtonActions.serializeBinaryToWriter),null!=(o=e.getLongshifted())&&t.writeMessage(9,o,proto.Conf.ButtonActions.serializeBinaryToWriter)},proto.Conf.Button.prototype.getGpio=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.Button.prototype.setGpio=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Button.prototype.clearGpio=function(){return this.setGpio(void 0)},proto.Conf.Button.prototype.hasGpio=function(){return null!=r.Message.getField(this,1)},proto.Conf.Button.prototype.getPull=function(){return r.Message.getBooleanFieldWithDefault(this,2,!1)},proto.Conf.Button.prototype.setPull=function(e){return r.Message.setProto3BooleanField(this,2,e)},proto.Conf.Button.prototype.getDebounce=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.Conf.Button.prototype.setDebounce=function(e){return r.Message.setProto3IntField(this,3,e)},proto.Conf.Button.prototype.getShifter=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,4)},proto.Conf.Button.prototype.setShifter=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.Button.prototype.clearShifter=function(){return this.setShifter(void 0)},proto.Conf.Button.prototype.hasShifter=function(){return null!=r.Message.getField(this,4)},proto.Conf.Button.prototype.getLongduration=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.Conf.Button.prototype.setLongduration=function(e){return r.Message.setProto3IntField(this,5,e)},proto.Conf.Button.prototype.getNormal=function(){return r.Message.getWrapperField(this,proto.Conf.ButtonActions,6)},proto.Conf.Button.prototype.setNormal=function(e){return r.Message.setWrapperField(this,6,e)},proto.Conf.Button.prototype.clearNormal=function(){return this.setNormal(void 0)},proto.Conf.Button.prototype.hasNormal=function(){return null!=r.Message.getField(this,6)},proto.Conf.Button.prototype.getLongpress=function(){return r.Message.getWrapperField(this,proto.Conf.ButtonActions,7)},proto.Conf.Button.prototype.setLongpress=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.Button.prototype.clearLongpress=function(){return this.setLongpress(void 0)},proto.Conf.Button.prototype.hasLongpress=function(){return null!=r.Message.getField(this,7)},proto.Conf.Button.prototype.getShifted=function(){return r.Message.getWrapperField(this,proto.Conf.ButtonActions,8)},proto.Conf.Button.prototype.setShifted=function(e){return r.Message.setWrapperField(this,8,e)},proto.Conf.Button.prototype.clearShifted=function(){return this.setShifted(void 0)},proto.Conf.Button.prototype.hasShifted=function(){return null!=r.Message.getField(this,8)},proto.Conf.Button.prototype.getLongshifted=function(){return r.Message.getWrapperField(this,proto.Conf.ButtonActions,9)},proto.Conf.Button.prototype.setLongshifted=function(e){return r.Message.setWrapperField(this,9,e)},proto.Conf.Button.prototype.clearLongshifted=function(){return this.setLongshifted(void 0)},proto.Conf.Button.prototype.hasLongshifted=function(){return null!=r.Message.getField(this,9)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.EthCommon.prototype.toObject=function(e){return proto.Conf.EthCommon.toObject(e,this)},proto.Conf.EthCommon.toObject=function(e,t){var o,n={model:r.Message.getFieldWithDefault(t,1,0),rst:(o=t.getRst())&&proto.Conf.GPIO.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.EthCommon.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.EthCommon;return proto.Conf.EthCommon.deserializeBinaryFromReader(o,t)},proto.Conf.EthCommon.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setModel(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setRst(o);break;default:t.skipField()}}return e},proto.Conf.EthCommon.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.EthCommon.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.EthCommon.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getModel())&&t.writeEnum(1,o),null!=(o=e.getRst())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.EthCommon.prototype.getModel=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.EthCommon.prototype.setModel=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.EthCommon.prototype.getRst=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.EthCommon.prototype.setRst=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.EthCommon.prototype.clearRst=function(){return this.setRst(void 0)},proto.Conf.EthCommon.prototype.hasRst=function(){return null!=r.Message.getField(this,2)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.EthSPI.prototype.toObject=function(e){return proto.Conf.EthSPI.toObject(e,this)},proto.Conf.EthSPI.toObject=function(e,t){var o,n={cs:(o=t.getCs())&&proto.Conf.GPIO.toObject(e,o),speed:r.Message.getFieldWithDefault(t,2,0),intr:(o=t.getIntr())&&proto.Conf.GPIO.toObject(e,o),host:r.Message.getFieldWithDefault(t,4,0)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.EthSPI.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.EthSPI;return proto.Conf.EthSPI.deserializeBinaryFromReader(o,t)},proto.Conf.EthSPI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setCs(o);break;case 2:o=t.readInt32();e.setSpeed(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setIntr(o);break;case 4:o=t.readInt32();e.setHost(o);break;default:t.skipField()}}return e},proto.Conf.EthSPI.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.EthSPI.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.EthSPI.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getCs())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getSpeed())&&t.writeInt32(2,o),null!=(o=e.getIntr())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getHost())&&t.writeInt32(4,o)},proto.Conf.EthSPI.prototype.getCs=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.EthSPI.prototype.setCs=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.EthSPI.prototype.clearCs=function(){return this.setCs(void 0)},proto.Conf.EthSPI.prototype.hasCs=function(){return null!=r.Message.getField(this,1)},proto.Conf.EthSPI.prototype.getSpeed=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.EthSPI.prototype.setSpeed=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.EthSPI.prototype.getIntr=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.EthSPI.prototype.setIntr=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.EthSPI.prototype.clearIntr=function(){return this.setIntr(void 0)},proto.Conf.EthSPI.prototype.hasIntr=function(){return null!=r.Message.getField(this,3)},proto.Conf.EthSPI.prototype.getHost=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.EthSPI.prototype.setHost=function(e){return r.Message.setProto3IntField(this,4,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.EthRMII.prototype.toObject=function(e){return proto.Conf.EthRMII.toObject(e,this)},proto.Conf.EthRMII.toObject=function(e,t){var o,r={mdc:(o=t.getMdc())&&proto.Conf.GPIO.toObject(e,o),mdio:(o=t.getMdio())&&proto.Conf.GPIO.toObject(e,o)};return e&&(r.$jspbMessageInstance=t),r}),proto.Conf.EthRMII.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.EthRMII;return proto.Conf.EthRMII.deserializeBinaryFromReader(o,t)},proto.Conf.EthRMII.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setMdc(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setMdio(o);break;default:t.skipField()}}return e},proto.Conf.EthRMII.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.EthRMII.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.EthRMII.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getMdc())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getMdio())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.EthRMII.prototype.getMdc=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.EthRMII.prototype.setMdc=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.EthRMII.prototype.clearMdc=function(){return this.setMdc(void 0)},proto.Conf.EthRMII.prototype.hasMdc=function(){return null!=r.Message.getField(this,1)},proto.Conf.EthRMII.prototype.getMdio=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.EthRMII.prototype.setMdio=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.EthRMII.prototype.clearMdio=function(){return this.setMdio(void 0)},proto.Conf.EthRMII.prototype.hasMdio=function(){return null!=r.Message.getField(this,2)},proto.Conf.Eth.oneofGroups_=[[3,4]],proto.Conf.Eth.EthtypeCase={ETHTYPE_NOT_SET:0,SPI:3,RMII:4},proto.Conf.Eth.prototype.getEthtypeCase=function(){return r.Message.computeOneofCase(this,proto.Conf.Eth.oneofGroups_[0])},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Eth.prototype.toObject=function(e){return proto.Conf.Eth.toObject(e,this)},proto.Conf.Eth.toObject=function(e,t){var o,n={type:r.Message.getFieldWithDefault(t,1,0),common:(o=t.getCommon())&&proto.Conf.EthCommon.toObject(e,o),spi:(o=t.getSpi())&&proto.Conf.EthSPI.toObject(e,o),rmii:(o=t.getRmii())&&proto.Conf.EthRMII.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Eth.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Eth;return proto.Conf.Eth.deserializeBinaryFromReader(o,t)},proto.Conf.Eth.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setType(o);break;case 2:o=new proto.Conf.EthCommon;t.readMessage(o,proto.Conf.EthCommon.deserializeBinaryFromReader),e.setCommon(o);break;case 3:o=new proto.Conf.EthSPI;t.readMessage(o,proto.Conf.EthSPI.deserializeBinaryFromReader),e.setSpi(o);break;case 4:o=new proto.Conf.EthRMII;t.readMessage(o,proto.Conf.EthRMII.deserializeBinaryFromReader),e.setRmii(o);break;default:t.skipField()}}return e},proto.Conf.Eth.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Eth.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Eth.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getType())&&t.writeEnum(1,o),null!=(o=e.getCommon())&&t.writeMessage(2,o,proto.Conf.EthCommon.serializeBinaryToWriter),null!=(o=e.getSpi())&&t.writeMessage(3,o,proto.Conf.EthSPI.serializeBinaryToWriter),null!=(o=e.getRmii())&&t.writeMessage(4,o,proto.Conf.EthRMII.serializeBinaryToWriter)},proto.Conf.Eth.prototype.getType=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.Eth.prototype.setType=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.Eth.prototype.getCommon=function(){return r.Message.getWrapperField(this,proto.Conf.EthCommon,2)},proto.Conf.Eth.prototype.setCommon=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Eth.prototype.clearCommon=function(){return this.setCommon(void 0)},proto.Conf.Eth.prototype.hasCommon=function(){return null!=r.Message.getField(this,2)},proto.Conf.Eth.prototype.getSpi=function(){return r.Message.getWrapperField(this,proto.Conf.EthSPI,3)},proto.Conf.Eth.prototype.setSpi=function(e){return r.Message.setOneofWrapperField(this,3,proto.Conf.Eth.oneofGroups_[0],e)},proto.Conf.Eth.prototype.clearSpi=function(){return this.setSpi(void 0)},proto.Conf.Eth.prototype.hasSpi=function(){return null!=r.Message.getField(this,3)},proto.Conf.Eth.prototype.getRmii=function(){return r.Message.getWrapperField(this,proto.Conf.EthRMII,4)},proto.Conf.Eth.prototype.setRmii=function(e){return r.Message.setOneofWrapperField(this,4,proto.Conf.Eth.oneofGroups_[0],e)},proto.Conf.Eth.prototype.clearRmii=function(){return this.setRmii(void 0)},proto.Conf.Eth.prototype.hasRmii=function(){return null!=r.Message.getField(this,4)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Battery.prototype.toObject=function(e){return proto.Conf.Battery.toObject(e,this)},proto.Conf.Battery.toObject=function(e,t){var o={channel:r.Message.getFieldWithDefault(t,1,0),scale:r.Message.getFloatingPointFieldWithDefault(t,2,0),cells:r.Message.getFieldWithDefault(t,3,0),atten:r.Message.getFieldWithDefault(t,4,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.Battery.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Battery;return proto.Conf.Battery.deserializeBinaryFromReader(o,t)},proto.Conf.Battery.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setChannel(o);break;case 2:o=t.readFloat();e.setScale(o);break;case 3:o=t.readInt32();e.setCells(o);break;case 4:o=t.readEnum();e.setAtten(o);break;default:t.skipField()}}return e},proto.Conf.Battery.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Battery.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Battery.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getChannel())&&t.writeEnum(1,o),0!==(o=e.getScale())&&t.writeFloat(2,o),0!==(o=e.getCells())&&t.writeInt32(3,o),0!==(o=e.getAtten())&&t.writeEnum(4,o)},proto.Conf.Battery.prototype.getChannel=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.Battery.prototype.setChannel=function(e){return r.Message.setProto3EnumField(this,1,e)},proto.Conf.Battery.prototype.getScale=function(){return r.Message.getFloatingPointFieldWithDefault(this,2,0)},proto.Conf.Battery.prototype.setScale=function(e){return r.Message.setProto3FloatField(this,2,e)},proto.Conf.Battery.prototype.getCells=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.Conf.Battery.prototype.setCells=function(e){return r.Message.setProto3IntField(this,3,e)},proto.Conf.Battery.prototype.getAtten=function(){return r.Message.getFieldWithDefault(this,4,0)},proto.Conf.Battery.prototype.setAtten=function(e){return r.Message.setProto3EnumField(this,4,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Gpios.prototype.toObject=function(e){return proto.Conf.Gpios.toObject(e,this)},proto.Conf.Gpios.toObject=function(e,t){var o,r={greenled:(o=t.getGreenled())&&proto.Conf.GPIO.toObject(e,o),redled:(o=t.getRedled())&&proto.Conf.GPIO.toObject(e,o),audiojack:(o=t.getAudiojack())&&proto.Conf.GPIO.toObject(e,o),amp:(o=t.getAmp())&&proto.Conf.GPIO.toObject(e,o),power:(o=t.getPower())&&proto.Conf.GPIO.toObject(e,o),ir:(o=t.getIr())&&proto.Conf.GPIO.toObject(e,o),jack:(o=t.getJack())&&proto.Conf.GPIO.toObject(e,o),spkfault:(o=t.getSpkfault())&&proto.Conf.GPIO.toObject(e,o),vcc:(o=t.getVcc())&&proto.Conf.GPIO.toObject(e,o),gnd:(o=t.getGnd())&&proto.Conf.GPIO.toObject(e,o)};return e&&(r.$jspbMessageInstance=t),r}),proto.Conf.Gpios.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Gpios;return proto.Conf.Gpios.deserializeBinaryFromReader(o,t)},proto.Conf.Gpios.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setGreenled(o);break;case 2:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setRedled(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setAudiojack(o);break;case 4:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setAmp(o);break;case 5:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setPower(o);break;case 6:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setIr(o);break;case 7:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setJack(o);break;case 8:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setSpkfault(o);break;case 9:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setVcc(o);break;case 10:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setGnd(o);break;default:t.skipField()}}return e},proto.Conf.Gpios.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Gpios.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Gpios.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getGreenled())&&t.writeMessage(1,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getRedled())&&t.writeMessage(2,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getAudiojack())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getAmp())&&t.writeMessage(4,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getPower())&&t.writeMessage(5,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getIr())&&t.writeMessage(6,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getJack())&&t.writeMessage(7,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getSpkfault())&&t.writeMessage(8,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getVcc())&&t.writeMessage(9,o,proto.Conf.GPIO.serializeBinaryToWriter),null!=(o=e.getGnd())&&t.writeMessage(10,o,proto.Conf.GPIO.serializeBinaryToWriter)},proto.Conf.Gpios.prototype.getGreenled=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,1)},proto.Conf.Gpios.prototype.setGreenled=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Gpios.prototype.clearGreenled=function(){return this.setGreenled(void 0)},proto.Conf.Gpios.prototype.hasGreenled=function(){return null!=r.Message.getField(this,1)},proto.Conf.Gpios.prototype.getRedled=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,2)},proto.Conf.Gpios.prototype.setRedled=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Gpios.prototype.clearRedled=function(){return this.setRedled(void 0)},proto.Conf.Gpios.prototype.hasRedled=function(){return null!=r.Message.getField(this,2)},proto.Conf.Gpios.prototype.getAudiojack=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.Gpios.prototype.setAudiojack=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.Gpios.prototype.clearAudiojack=function(){return this.setAudiojack(void 0)},proto.Conf.Gpios.prototype.hasAudiojack=function(){return null!=r.Message.getField(this,3)},proto.Conf.Gpios.prototype.getAmp=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,4)},proto.Conf.Gpios.prototype.setAmp=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.Gpios.prototype.clearAmp=function(){return this.setAmp(void 0)},proto.Conf.Gpios.prototype.hasAmp=function(){return null!=r.Message.getField(this,4)},proto.Conf.Gpios.prototype.getPower=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,5)},proto.Conf.Gpios.prototype.setPower=function(e){return r.Message.setWrapperField(this,5,e)},proto.Conf.Gpios.prototype.clearPower=function(){return this.setPower(void 0)},proto.Conf.Gpios.prototype.hasPower=function(){return null!=r.Message.getField(this,5)},proto.Conf.Gpios.prototype.getIr=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,6)},proto.Conf.Gpios.prototype.setIr=function(e){return r.Message.setWrapperField(this,6,e)},proto.Conf.Gpios.prototype.clearIr=function(){return this.setIr(void 0)},proto.Conf.Gpios.prototype.hasIr=function(){return null!=r.Message.getField(this,6)},proto.Conf.Gpios.prototype.getJack=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,7)},proto.Conf.Gpios.prototype.setJack=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.Gpios.prototype.clearJack=function(){return this.setJack(void 0)},proto.Conf.Gpios.prototype.hasJack=function(){return null!=r.Message.getField(this,7)},proto.Conf.Gpios.prototype.getSpkfault=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,8)},proto.Conf.Gpios.prototype.setSpkfault=function(e){return r.Message.setWrapperField(this,8,e)},proto.Conf.Gpios.prototype.clearSpkfault=function(){return this.setSpkfault(void 0)},proto.Conf.Gpios.prototype.hasSpkfault=function(){return null!=r.Message.getField(this,8)},proto.Conf.Gpios.prototype.getVcc=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,9)},proto.Conf.Gpios.prototype.setVcc=function(e){return r.Message.setWrapperField(this,9,e)},proto.Conf.Gpios.prototype.clearVcc=function(){return this.setVcc(void 0)},proto.Conf.Gpios.prototype.hasVcc=function(){return null!=r.Message.getField(this,9)},proto.Conf.Gpios.prototype.getGnd=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,10)},proto.Conf.Gpios.prototype.setGnd=function(e){return r.Message.setWrapperField(this,10,e)},proto.Conf.Gpios.prototype.clearGnd=function(){return this.setGnd(void 0)},proto.Conf.Gpios.prototype.hasGnd=function(){return null!=r.Message.getField(this,10)},proto.Conf.Dev.repeatedFields_=[9],r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Dev.prototype.toObject=function(e){return proto.Conf.Dev.toObject(e,this)},proto.Conf.Dev.toObject=function(e,t){var o,n={spi:(o=t.getSpi())&&proto.Conf.SPIBus.toObject(e,o),i2c:(o=t.getI2c())&&proto.Conf.I2CBus.toObject(e,o),dac:(o=t.getDac())&&proto.Conf.DACDev.toObject(e,o),spdif:(o=t.getSpdif())&&proto.Conf.SPDIFDev.toObject(e,o),display:(o=t.getDisplay())&&proto.Conf.DisplayDev.toObject(e,o),gpioExp:(o=t.getGpioExp())&&proto.Conf.GPIOExp.toObject(e,o),ledStrip:(o=t.getLedStrip())&&proto.Conf.LEDStrip.toObject(e,o),rotary:(o=t.getRotary())&&proto.Conf.Rotary.toObject(e,o),buttonsList:r.Message.toObjectList(t.getButtonsList(),proto.Conf.Button.toObject,e),eth:(o=t.getEth())&&proto.Conf.Eth.toObject(e,o),battery:(o=t.getBattery())&&proto.Conf.Battery.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Dev.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Dev;return proto.Conf.Dev.deserializeBinaryFromReader(o,t)},proto.Conf.Dev.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.SPIBus;t.readMessage(o,proto.Conf.SPIBus.deserializeBinaryFromReader),e.setSpi(o);break;case 2:o=new proto.Conf.I2CBus;t.readMessage(o,proto.Conf.I2CBus.deserializeBinaryFromReader),e.setI2c(o);break;case 3:o=new proto.Conf.DACDev;t.readMessage(o,proto.Conf.DACDev.deserializeBinaryFromReader),e.setDac(o);break;case 4:o=new proto.Conf.SPDIFDev;t.readMessage(o,proto.Conf.SPDIFDev.deserializeBinaryFromReader),e.setSpdif(o);break;case 5:o=new proto.Conf.DisplayDev;t.readMessage(o,proto.Conf.DisplayDev.deserializeBinaryFromReader),e.setDisplay(o);break;case 6:o=new proto.Conf.GPIOExp;t.readMessage(o,proto.Conf.GPIOExp.deserializeBinaryFromReader),e.setGpioExp(o);break;case 7:o=new proto.Conf.LEDStrip;t.readMessage(o,proto.Conf.LEDStrip.deserializeBinaryFromReader),e.setLedStrip(o);break;case 8:o=new proto.Conf.Rotary;t.readMessage(o,proto.Conf.Rotary.deserializeBinaryFromReader),e.setRotary(o);break;case 9:o=new proto.Conf.Button;t.readMessage(o,proto.Conf.Button.deserializeBinaryFromReader),e.addButtons(o);break;case 10:o=new proto.Conf.Eth;t.readMessage(o,proto.Conf.Eth.deserializeBinaryFromReader),e.setEth(o);break;case 11:o=new proto.Conf.Battery;t.readMessage(o,proto.Conf.Battery.deserializeBinaryFromReader),e.setBattery(o);break;default:t.skipField()}}return e},proto.Conf.Dev.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Dev.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Dev.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getSpi())&&t.writeMessage(1,o,proto.Conf.SPIBus.serializeBinaryToWriter),null!=(o=e.getI2c())&&t.writeMessage(2,o,proto.Conf.I2CBus.serializeBinaryToWriter),null!=(o=e.getDac())&&t.writeMessage(3,o,proto.Conf.DACDev.serializeBinaryToWriter),null!=(o=e.getSpdif())&&t.writeMessage(4,o,proto.Conf.SPDIFDev.serializeBinaryToWriter),null!=(o=e.getDisplay())&&t.writeMessage(5,o,proto.Conf.DisplayDev.serializeBinaryToWriter),null!=(o=e.getGpioExp())&&t.writeMessage(6,o,proto.Conf.GPIOExp.serializeBinaryToWriter),null!=(o=e.getLedStrip())&&t.writeMessage(7,o,proto.Conf.LEDStrip.serializeBinaryToWriter),null!=(o=e.getRotary())&&t.writeMessage(8,o,proto.Conf.Rotary.serializeBinaryToWriter),(o=e.getButtonsList()).length>0&&t.writeRepeatedMessage(9,o,proto.Conf.Button.serializeBinaryToWriter),null!=(o=e.getEth())&&t.writeMessage(10,o,proto.Conf.Eth.serializeBinaryToWriter),null!=(o=e.getBattery())&&t.writeMessage(11,o,proto.Conf.Battery.serializeBinaryToWriter)},proto.Conf.Dev.prototype.getSpi=function(){return r.Message.getWrapperField(this,proto.Conf.SPIBus,1)},proto.Conf.Dev.prototype.setSpi=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Dev.prototype.clearSpi=function(){return this.setSpi(void 0)},proto.Conf.Dev.prototype.hasSpi=function(){return null!=r.Message.getField(this,1)},proto.Conf.Dev.prototype.getI2c=function(){return r.Message.getWrapperField(this,proto.Conf.I2CBus,2)},proto.Conf.Dev.prototype.setI2c=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Dev.prototype.clearI2c=function(){return this.setI2c(void 0)},proto.Conf.Dev.prototype.hasI2c=function(){return null!=r.Message.getField(this,2)},proto.Conf.Dev.prototype.getDac=function(){return r.Message.getWrapperField(this,proto.Conf.DACDev,3)},proto.Conf.Dev.prototype.setDac=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.Dev.prototype.clearDac=function(){return this.setDac(void 0)},proto.Conf.Dev.prototype.hasDac=function(){return null!=r.Message.getField(this,3)},proto.Conf.Dev.prototype.getSpdif=function(){return r.Message.getWrapperField(this,proto.Conf.SPDIFDev,4)},proto.Conf.Dev.prototype.setSpdif=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.Dev.prototype.clearSpdif=function(){return this.setSpdif(void 0)},proto.Conf.Dev.prototype.hasSpdif=function(){return null!=r.Message.getField(this,4)},proto.Conf.Dev.prototype.getDisplay=function(){return r.Message.getWrapperField(this,proto.Conf.DisplayDev,5)},proto.Conf.Dev.prototype.setDisplay=function(e){return r.Message.setWrapperField(this,5,e)},proto.Conf.Dev.prototype.clearDisplay=function(){return this.setDisplay(void 0)},proto.Conf.Dev.prototype.hasDisplay=function(){return null!=r.Message.getField(this,5)},proto.Conf.Dev.prototype.getGpioExp=function(){return r.Message.getWrapperField(this,proto.Conf.GPIOExp,6)},proto.Conf.Dev.prototype.setGpioExp=function(e){return r.Message.setWrapperField(this,6,e)},proto.Conf.Dev.prototype.clearGpioExp=function(){return this.setGpioExp(void 0)},proto.Conf.Dev.prototype.hasGpioExp=function(){return null!=r.Message.getField(this,6)},proto.Conf.Dev.prototype.getLedStrip=function(){return r.Message.getWrapperField(this,proto.Conf.LEDStrip,7)},proto.Conf.Dev.prototype.setLedStrip=function(e){return r.Message.setWrapperField(this,7,e)},proto.Conf.Dev.prototype.clearLedStrip=function(){return this.setLedStrip(void 0)},proto.Conf.Dev.prototype.hasLedStrip=function(){return null!=r.Message.getField(this,7)},proto.Conf.Dev.prototype.getRotary=function(){return r.Message.getWrapperField(this,proto.Conf.Rotary,8)},proto.Conf.Dev.prototype.setRotary=function(e){return r.Message.setWrapperField(this,8,e)},proto.Conf.Dev.prototype.clearRotary=function(){return this.setRotary(void 0)},proto.Conf.Dev.prototype.hasRotary=function(){return null!=r.Message.getField(this,8)},proto.Conf.Dev.prototype.getButtonsList=function(){return r.Message.getRepeatedWrapperField(this,proto.Conf.Button,9)},proto.Conf.Dev.prototype.setButtonsList=function(e){return r.Message.setRepeatedWrapperField(this,9,e)},proto.Conf.Dev.prototype.addButtons=function(e,t){return r.Message.addToRepeatedWrapperField(this,9,e,proto.Conf.Button,t)},proto.Conf.Dev.prototype.clearButtonsList=function(){return this.setButtonsList([])},proto.Conf.Dev.prototype.getEth=function(){return r.Message.getWrapperField(this,proto.Conf.Eth,10)},proto.Conf.Dev.prototype.setEth=function(e){return r.Message.setWrapperField(this,10,e)},proto.Conf.Dev.prototype.clearEth=function(){return this.setEth(void 0)},proto.Conf.Dev.prototype.hasEth=function(){return null!=r.Message.getField(this,10)},proto.Conf.Dev.prototype.getBattery=function(){return r.Message.getWrapperField(this,proto.Conf.Battery,11)},proto.Conf.Dev.prototype.setBattery=function(e){return r.Message.setWrapperField(this,11,e)},proto.Conf.Dev.prototype.clearBattery=function(){return this.setBattery(void 0)},proto.Conf.Dev.prototype.hasBattery=function(){return null!=r.Message.getField(this,11)},proto.Conf.SleepService.repeatedFields_=[4,5],r.Message.GENERATE_TO_OBJECT&&(proto.Conf.SleepService.prototype.toObject=function(e){return proto.Conf.SleepService.toObject(e,this)},proto.Conf.SleepService.toObject=function(e,t){var o,n={delay:r.Message.getFieldWithDefault(t,1,0),spurious:r.Message.getFieldWithDefault(t,2,0),sleep:(o=t.getSleep())&&proto.Conf.GPIO.toObject(e,o),wakeList:r.Message.toObjectList(t.getWakeList(),proto.Conf.GPIO.toObject,e),rtcList:r.Message.toObjectList(t.getRtcList(),proto.Conf.GPIO.toObject,e),batt:r.Message.getFloatingPointFieldWithDefault(t,6,0)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.SleepService.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.SleepService;return proto.Conf.SleepService.deserializeBinaryFromReader(o,t)},proto.Conf.SleepService.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readUint32();e.setDelay(o);break;case 2:o=t.readInt32();e.setSpurious(o);break;case 3:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.setSleep(o);break;case 4:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.addWake(o);break;case 5:o=new proto.Conf.GPIO;t.readMessage(o,proto.Conf.GPIO.deserializeBinaryFromReader),e.addRtc(o);break;case 6:o=t.readFloat();e.setBatt(o);break;default:t.skipField()}}return e},proto.Conf.SleepService.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.SleepService.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.SleepService.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getDelay())&&t.writeUint32(1,o),0!==(o=e.getSpurious())&&t.writeInt32(2,o),null!=(o=e.getSleep())&&t.writeMessage(3,o,proto.Conf.GPIO.serializeBinaryToWriter),(o=e.getWakeList()).length>0&&t.writeRepeatedMessage(4,o,proto.Conf.GPIO.serializeBinaryToWriter),(o=e.getRtcList()).length>0&&t.writeRepeatedMessage(5,o,proto.Conf.GPIO.serializeBinaryToWriter),0!==(o=e.getBatt())&&t.writeFloat(6,o)},proto.Conf.SleepService.prototype.getDelay=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.Conf.SleepService.prototype.setDelay=function(e){return r.Message.setProto3IntField(this,1,e)},proto.Conf.SleepService.prototype.getSpurious=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.SleepService.prototype.setSpurious=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.SleepService.prototype.getSleep=function(){return r.Message.getWrapperField(this,proto.Conf.GPIO,3)},proto.Conf.SleepService.prototype.setSleep=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.SleepService.prototype.clearSleep=function(){return this.setSleep(void 0)},proto.Conf.SleepService.prototype.hasSleep=function(){return null!=r.Message.getField(this,3)},proto.Conf.SleepService.prototype.getWakeList=function(){return r.Message.getRepeatedWrapperField(this,proto.Conf.GPIO,4)},proto.Conf.SleepService.prototype.setWakeList=function(e){return r.Message.setRepeatedWrapperField(this,4,e)},proto.Conf.SleepService.prototype.addWake=function(e,t){return r.Message.addToRepeatedWrapperField(this,4,e,proto.Conf.GPIO,t)},proto.Conf.SleepService.prototype.clearWakeList=function(){return this.setWakeList([])},proto.Conf.SleepService.prototype.getRtcList=function(){return r.Message.getRepeatedWrapperField(this,proto.Conf.GPIO,5)},proto.Conf.SleepService.prototype.setRtcList=function(e){return r.Message.setRepeatedWrapperField(this,5,e)},proto.Conf.SleepService.prototype.addRtc=function(e,t){return r.Message.addToRepeatedWrapperField(this,5,e,proto.Conf.GPIO,t)},proto.Conf.SleepService.prototype.clearRtcList=function(){return this.setRtcList([])},proto.Conf.SleepService.prototype.getBatt=function(){return r.Message.getFloatingPointFieldWithDefault(this,6,0)},proto.Conf.SleepService.prototype.setBatt=function(e){return r.Message.setProto3FloatField(this,6,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Artwork.prototype.toObject=function(e){return proto.Conf.Artwork.toObject(e,this)},proto.Conf.Artwork.toObject=function(e,t){var o={enabled:r.Message.getBooleanFieldWithDefault(t,1,!1),resize:r.Message.getFieldWithDefault(t,2,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.Conf.Artwork.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Artwork;return proto.Conf.Artwork.deserializeBinaryFromReader(o,t)},proto.Conf.Artwork.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readBool();e.setEnabled(o);break;case 2:o=t.readUint32();e.setResize(o);break;default:t.skipField()}}return e},proto.Conf.Artwork.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Artwork.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Artwork.serializeBinaryToWriter=function(e,t){var o=void 0;(o=e.getEnabled())&&t.writeBool(1,o),0!==(o=e.getResize())&&t.writeUint32(2,o)},proto.Conf.Artwork.prototype.getEnabled=function(){return r.Message.getBooleanFieldWithDefault(this,1,!1)},proto.Conf.Artwork.prototype.setEnabled=function(e){return r.Message.setProto3BooleanField(this,1,e)},proto.Conf.Artwork.prototype.getResize=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.Artwork.prototype.setResize=function(e){return r.Message.setProto3IntField(this,2,e)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Metadata.prototype.toObject=function(e){return proto.Conf.Metadata.toObject(e,this)},proto.Conf.Metadata.toObject=function(e,t){var o,n={format:r.Message.getFieldWithDefault(t,1,""),speed:r.Message.getFieldWithDefault(t,2,0),pause:r.Message.getFieldWithDefault(t,3,0),artwork:(o=t.getArtwork())&&proto.Conf.Artwork.toObject(e,o)};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Metadata.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Metadata;return proto.Conf.Metadata.deserializeBinaryFromReader(o,t)},proto.Conf.Metadata.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readString();e.setFormat(o);break;case 2:o=t.readUint32();e.setSpeed(o);break;case 3:o=t.readUint32();e.setPause(o);break;case 4:o=new proto.Conf.Artwork;t.readMessage(o,proto.Conf.Artwork.deserializeBinaryFromReader),e.setArtwork(o);break;default:t.skipField()}}return e},proto.Conf.Metadata.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Metadata.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Metadata.serializeBinaryToWriter=function(e,t){var o=void 0;(o=e.getFormat()).length>0&&t.writeString(1,o),0!==(o=e.getSpeed())&&t.writeUint32(2,o),0!==(o=e.getPause())&&t.writeUint32(3,o),null!=(o=e.getArtwork())&&t.writeMessage(4,o,proto.Conf.Artwork.serializeBinaryToWriter)},proto.Conf.Metadata.prototype.getFormat=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.Conf.Metadata.prototype.setFormat=function(e){return r.Message.setProto3StringField(this,1,e)},proto.Conf.Metadata.prototype.getSpeed=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.Conf.Metadata.prototype.setSpeed=function(e){return r.Message.setProto3IntField(this,2,e)},proto.Conf.Metadata.prototype.getPause=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.Conf.Metadata.prototype.setPause=function(e){return r.Message.setProto3IntField(this,3,e)},proto.Conf.Metadata.prototype.getArtwork=function(){return r.Message.getWrapperField(this,proto.Conf.Artwork,4)},proto.Conf.Metadata.prototype.setArtwork=function(e){return r.Message.setWrapperField(this,4,e)},proto.Conf.Metadata.prototype.clearArtwork=function(){return this.setArtwork(void 0)},proto.Conf.Metadata.prototype.hasArtwork=function(){return null!=r.Message.getField(this,4)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Services.prototype.toObject=function(e){return proto.Conf.Services.toObject(e,this)},proto.Conf.Services.toObject=function(e,t){var o,r={metadata:(o=t.getMetadata())&&proto.Conf.Metadata.toObject(e,o),sleep:(o=t.getSleep())&&proto.Conf.SleepService.toObject(e,o)};return e&&(r.$jspbMessageInstance=t),r}),proto.Conf.Services.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Services;return proto.Conf.Services.deserializeBinaryFromReader(o,t)},proto.Conf.Services.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.Metadata;t.readMessage(o,proto.Conf.Metadata.deserializeBinaryFromReader),e.setMetadata(o);break;case 2:o=new proto.Conf.SleepService;t.readMessage(o,proto.Conf.SleepService.deserializeBinaryFromReader),e.setSleep(o);break;default:t.skipField()}}return e},proto.Conf.Services.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Services.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Services.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getMetadata())&&t.writeMessage(1,o,proto.Conf.Metadata.serializeBinaryToWriter),null!=(o=e.getSleep())&&t.writeMessage(2,o,proto.Conf.SleepService.serializeBinaryToWriter)},proto.Conf.Services.prototype.getMetadata=function(){return r.Message.getWrapperField(this,proto.Conf.Metadata,1)},proto.Conf.Services.prototype.setMetadata=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Services.prototype.clearMetadata=function(){return this.setMetadata(void 0)},proto.Conf.Services.prototype.hasMetadata=function(){return null!=r.Message.getField(this,1)},proto.Conf.Services.prototype.getSleep=function(){return r.Message.getWrapperField(this,proto.Conf.SleepService,2)},proto.Conf.Services.prototype.setSleep=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Services.prototype.clearSleep=function(){return this.setSleep(void 0)},proto.Conf.Services.prototype.hasSleep=function(){return null!=r.Message.getField(this,2)},r.Message.GENERATE_TO_OBJECT&&(proto.Conf.Config.prototype.toObject=function(e){return proto.Conf.Config.toObject(e,this)},proto.Conf.Config.toObject=function(e,t){var o,n={gpios:(o=t.getGpios())&&proto.Conf.Gpios.toObject(e,o),dev:(o=t.getDev())&&proto.Conf.Dev.toObject(e,o),services:(o=t.getServices())&&proto.Conf.Services.toObject(e,o),deviceName:r.Message.getFieldWithDefault(t,4,"")};return e&&(n.$jspbMessageInstance=t),n}),proto.Conf.Config.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.Conf.Config;return proto.Conf.Config.deserializeBinaryFromReader(o,t)},proto.Conf.Config.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.Conf.Gpios;t.readMessage(o,proto.Conf.Gpios.deserializeBinaryFromReader),e.setGpios(o);break;case 2:o=new proto.Conf.Dev;t.readMessage(o,proto.Conf.Dev.deserializeBinaryFromReader),e.setDev(o);break;case 3:o=new proto.Conf.Services;t.readMessage(o,proto.Conf.Services.deserializeBinaryFromReader),e.setServices(o);break;case 4:o=t.readString();e.setDeviceName(o);break;default:t.skipField()}}return e},proto.Conf.Config.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.Conf.Config.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Conf.Config.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getGpios())&&t.writeMessage(1,o,proto.Conf.Gpios.serializeBinaryToWriter),null!=(o=e.getDev())&&t.writeMessage(2,o,proto.Conf.Dev.serializeBinaryToWriter),null!=(o=e.getServices())&&t.writeMessage(3,o,proto.Conf.Services.serializeBinaryToWriter),(o=e.getDeviceName()).length>0&&t.writeString(4,o)},proto.Conf.Config.prototype.getGpios=function(){return r.Message.getWrapperField(this,proto.Conf.Gpios,1)},proto.Conf.Config.prototype.setGpios=function(e){return r.Message.setWrapperField(this,1,e)},proto.Conf.Config.prototype.clearGpios=function(){return this.setGpios(void 0)},proto.Conf.Config.prototype.hasGpios=function(){return null!=r.Message.getField(this,1)},proto.Conf.Config.prototype.getDev=function(){return r.Message.getWrapperField(this,proto.Conf.Dev,2)},proto.Conf.Config.prototype.setDev=function(e){return r.Message.setWrapperField(this,2,e)},proto.Conf.Config.prototype.clearDev=function(){return this.setDev(void 0)},proto.Conf.Config.prototype.hasDev=function(){return null!=r.Message.getField(this,2)},proto.Conf.Config.prototype.getServices=function(){return r.Message.getWrapperField(this,proto.Conf.Services,3)},proto.Conf.Config.prototype.setServices=function(e){return r.Message.setWrapperField(this,3,e)},proto.Conf.Config.prototype.clearServices=function(){return this.setServices(void 0)},proto.Conf.Config.prototype.hasServices=function(){return null!=r.Message.getField(this,3)},proto.Conf.Config.prototype.getDeviceName=function(){return r.Message.getFieldWithDefault(this,4,"")},proto.Conf.Config.prototype.setDeviceName=function(e){return r.Message.setProto3StringField(this,4,e)},proto.Conf.ButtonAction={ACTRLS_NONE:0,ACTRLS_POWER:1,ACTRLS_VOLUP:2,ACTRLS_VOLDOWN:3,ACTRLS_TOGGLE:4,ACTRLS_PLAY:5,ACTRLS_PAUSE:6,ACTRLS_STOP:7,ACTRLS_REW:8,ACTRLS_FWD:9,ACTRLS_PREV:10,ACTRLS_NEXT:11,BCTRLS_UP:12,BCTRLS_DOWN:13,BCTRLS_LEFT:14,BCTRLS_RIGHT:15,BCTRLS_PS1:16,BCTRLS_PS2:17,BCTRLS_PS3:18,BCTRLS_PS4:19,BCTRLS_PS5:20,BCTRLS_PS6:21,BCTRLS_PS7:22,BCTRLS_PS8:23,BCTRLS_PS9:24,BCTRLS_PS10:25,KNOB_LEFT:26,KNOB_RIGHT:27,KNOB_PUSH:28,ACTRLS_SLEEP:29},proto.Conf.DACModelEnum={UNSPECIFIED_MODEL:0,TAS57XX:1,TAS5713:2,AC101:3,WM8978:4,ES8388:5,I2S:6},proto.Conf.DeviceTypeEnum={UNSPECIFIED_TYPE:0,DEVTYPE_SPI:1,DEVTYPE_I2C:2,DEVTYPE__RMII:3},proto.Conf.DisplayDriverEnum={UNSPECIFIED_DRIVER:0,SSD1306:1,SSD1322:2,SSD1326:3,SSD1327:4,SH1106:5,SSD1675:6,ST7735:7,ST7789:8,ILI9341:9,ILI9341_24:10,SSD1351:11},proto.Conf.PortEnum={UNSPECIFIED_SYSTPORT:0,SYSTEM:1,DAC:2},proto.Conf.EthModelEnum={UNSPECIFIED_ETHMODEL:0,LAN8720:1,DM9051:2,W5500:3},proto.Conf.GPIOExpModelEnum={UNSPECIFIED_EXP:0,PCA9535:1,PCA85XX:2,MCP23017:3,MCP23S17:4},proto.Conf.HostEnum={UNSPECIFIED_HOST:0,HOST0:1,HOST1:2},proto.Conf.I2CPortEnum={UNSPECIFIED_PORT:0,I2CPORT0:1,I2CPORT1:2},proto.Conf.MCKEnum={UNSPECIFIED_MCK:0,MCK0:1,MCK1:2,MCK2:3},proto.Conf.BatteryChannelEnum={UNSPECIFIED_CH:0,CH0:1,CH1:2,CH2:3,CH3:4,CH4:5,CH5:6,CH6:7,CH7:8},proto.Conf.BatteryAttenEnum={UNSPECIFIED_ATT:0,ATT_0:1,ATT_1:2,ATT_2:3,ATT_3:4},proto.Conf.EthType={UNSPECIFIED_ETH:0,SPI:1,RMII:2},n.object.extend(t,proto.Conf)},21:(e,t,o)=>{var r=o(19),n=r,i=function(){return this?this:"undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:Function("return this")()}.call(null),s=o(392);n.object.extend(proto,s),n.exportSymbol("proto.DescriptorSize",null,i),n.exportSymbol("proto.FieldType",null,i),n.exportSymbol("proto.IntSize",null,i),n.exportSymbol("proto.NanoPBOptions",null,i),n.exportSymbol("proto.TypenameMangling",null,i),n.exportSymbol("proto.nanopb",null,i),n.exportSymbol("proto.nanopbEnumopt",null,i),n.exportSymbol("proto.nanopbFileopt",null,i),n.exportSymbol("proto.nanopbMsgopt",null,i),proto.NanoPBOptions=function(e){r.Message.initialize(this,e,0,-1,proto.NanoPBOptions.repeatedFields_,null)},n.inherits(proto.NanoPBOptions,r.Message),n.DEBUG&&!COMPILED&&(proto.NanoPBOptions.displayName="proto.NanoPBOptions"),proto.NanoPBOptions.repeatedFields_=[24,26],r.Message.GENERATE_TO_OBJECT&&(proto.NanoPBOptions.prototype.toObject=function(e){return proto.NanoPBOptions.toObject(e,this)},proto.NanoPBOptions.toObject=function(e,t){var o,n={maxSize:null==(o=r.Message.getField(t,1))?void 0:o,maxLength:null==(o=r.Message.getField(t,14))?void 0:o,maxCount:null==(o=r.Message.getField(t,2))?void 0:o,intSize:r.Message.getFieldWithDefault(t,7,0),type:r.Message.getFieldWithDefault(t,3,0),longNames:r.Message.getBooleanFieldWithDefault(t,4,!0),packedStruct:r.Message.getBooleanFieldWithDefault(t,5,!1),packedEnum:r.Message.getBooleanFieldWithDefault(t,10,!1),skipMessage:r.Message.getBooleanFieldWithDefault(t,6,!1),noUnions:r.Message.getBooleanFieldWithDefault(t,8,!1),msgid:null==(o=r.Message.getField(t,9))?void 0:o,anonymousOneof:r.Message.getBooleanFieldWithDefault(t,11,!1),proto3:r.Message.getBooleanFieldWithDefault(t,12,!1),proto3SingularMsgs:r.Message.getBooleanFieldWithDefault(t,21,!1),enumToString:r.Message.getBooleanFieldWithDefault(t,13,!1),fixedLength:r.Message.getBooleanFieldWithDefault(t,15,!1),fixedCount:r.Message.getBooleanFieldWithDefault(t,16,!1),submsgCallback:r.Message.getBooleanFieldWithDefault(t,22,!1),mangleNames:r.Message.getFieldWithDefault(t,17,0),callbackDatatype:r.Message.getFieldWithDefault(t,18,"pb_callback_t"),callbackFunction:r.Message.getFieldWithDefault(t,19,"pb_default_field_callback"),descriptorsize:r.Message.getFieldWithDefault(t,20,0),defaultHas:r.Message.getBooleanFieldWithDefault(t,23,!1),includeList:null==(o=r.Message.getRepeatedField(t,24))?void 0:o,excludeList:null==(o=r.Message.getRepeatedField(t,26))?void 0:o,pb_package:null==(o=r.Message.getField(t,25))?void 0:o,typeOverride:null==(o=r.Message.getField(t,27))?void 0:o,sortByTag:r.Message.getBooleanFieldWithDefault(t,28,!0)};return e&&(n.$jspbMessageInstance=t),n}),proto.NanoPBOptions.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.NanoPBOptions;return proto.NanoPBOptions.deserializeBinaryFromReader(o,t)},proto.NanoPBOptions.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readInt32();e.setMaxSize(o);break;case 14:o=t.readInt32();e.setMaxLength(o);break;case 2:o=t.readInt32();e.setMaxCount(o);break;case 7:o=t.readEnum();e.setIntSize(o);break;case 3:o=t.readEnum();e.setType(o);break;case 4:o=t.readBool();e.setLongNames(o);break;case 5:o=t.readBool();e.setPackedStruct(o);break;case 10:o=t.readBool();e.setPackedEnum(o);break;case 6:o=t.readBool();e.setSkipMessage(o);break;case 8:o=t.readBool();e.setNoUnions(o);break;case 9:o=t.readUint32();e.setMsgid(o);break;case 11:o=t.readBool();e.setAnonymousOneof(o);break;case 12:o=t.readBool();e.setProto3(o);break;case 21:o=t.readBool();e.setProto3SingularMsgs(o);break;case 13:o=t.readBool();e.setEnumToString(o);break;case 15:o=t.readBool();e.setFixedLength(o);break;case 16:o=t.readBool();e.setFixedCount(o);break;case 22:o=t.readBool();e.setSubmsgCallback(o);break;case 17:o=t.readEnum();e.setMangleNames(o);break;case 18:o=t.readString();e.setCallbackDatatype(o);break;case 19:o=t.readString();e.setCallbackFunction(o);break;case 20:o=t.readEnum();e.setDescriptorsize(o);break;case 23:o=t.readBool();e.setDefaultHas(o);break;case 24:o=t.readString();e.addInclude(o);break;case 26:o=t.readString();e.addExclude(o);break;case 25:o=t.readString();e.setPackage(o);break;case 27:o=t.readEnum();e.setTypeOverride(o);break;case 28:o=t.readBool();e.setSortByTag(o);break;default:t.skipField()}}return e},proto.NanoPBOptions.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.NanoPBOptions.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.NanoPBOptions.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=r.Message.getField(e,1))&&t.writeInt32(1,o),null!=(o=r.Message.getField(e,14))&&t.writeInt32(14,o),null!=(o=r.Message.getField(e,2))&&t.writeInt32(2,o),null!=(o=r.Message.getField(e,7))&&t.writeEnum(7,o),null!=(o=r.Message.getField(e,3))&&t.writeEnum(3,o),null!=(o=r.Message.getField(e,4))&&t.writeBool(4,o),null!=(o=r.Message.getField(e,5))&&t.writeBool(5,o),null!=(o=r.Message.getField(e,10))&&t.writeBool(10,o),null!=(o=r.Message.getField(e,6))&&t.writeBool(6,o),null!=(o=r.Message.getField(e,8))&&t.writeBool(8,o),null!=(o=r.Message.getField(e,9))&&t.writeUint32(9,o),null!=(o=r.Message.getField(e,11))&&t.writeBool(11,o),null!=(o=r.Message.getField(e,12))&&t.writeBool(12,o),null!=(o=r.Message.getField(e,21))&&t.writeBool(21,o),null!=(o=r.Message.getField(e,13))&&t.writeBool(13,o),null!=(o=r.Message.getField(e,15))&&t.writeBool(15,o),null!=(o=r.Message.getField(e,16))&&t.writeBool(16,o),null!=(o=r.Message.getField(e,22))&&t.writeBool(22,o),null!=(o=r.Message.getField(e,17))&&t.writeEnum(17,o),null!=(o=r.Message.getField(e,18))&&t.writeString(18,o),null!=(o=r.Message.getField(e,19))&&t.writeString(19,o),null!=(o=r.Message.getField(e,20))&&t.writeEnum(20,o),null!=(o=r.Message.getField(e,23))&&t.writeBool(23,o),(o=e.getIncludeList()).length>0&&t.writeRepeatedString(24,o),(o=e.getExcludeList()).length>0&&t.writeRepeatedString(26,o),null!=(o=r.Message.getField(e,25))&&t.writeString(25,o),null!=(o=r.Message.getField(e,27))&&t.writeEnum(27,o),null!=(o=r.Message.getField(e,28))&&t.writeBool(28,o)},proto.NanoPBOptions.prototype.getMaxSize=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.NanoPBOptions.prototype.setMaxSize=function(e){return r.Message.setField(this,1,e)},proto.NanoPBOptions.prototype.clearMaxSize=function(){return r.Message.setField(this,1,void 0)},proto.NanoPBOptions.prototype.hasMaxSize=function(){return null!=r.Message.getField(this,1)},proto.NanoPBOptions.prototype.getMaxLength=function(){return r.Message.getFieldWithDefault(this,14,0)},proto.NanoPBOptions.prototype.setMaxLength=function(e){return r.Message.setField(this,14,e)},proto.NanoPBOptions.prototype.clearMaxLength=function(){return r.Message.setField(this,14,void 0)},proto.NanoPBOptions.prototype.hasMaxLength=function(){return null!=r.Message.getField(this,14)},proto.NanoPBOptions.prototype.getMaxCount=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.NanoPBOptions.prototype.setMaxCount=function(e){return r.Message.setField(this,2,e)},proto.NanoPBOptions.prototype.clearMaxCount=function(){return r.Message.setField(this,2,void 0)},proto.NanoPBOptions.prototype.hasMaxCount=function(){return null!=r.Message.getField(this,2)},proto.NanoPBOptions.prototype.getIntSize=function(){return r.Message.getFieldWithDefault(this,7,0)},proto.NanoPBOptions.prototype.setIntSize=function(e){return r.Message.setField(this,7,e)},proto.NanoPBOptions.prototype.clearIntSize=function(){return r.Message.setField(this,7,void 0)},proto.NanoPBOptions.prototype.hasIntSize=function(){return null!=r.Message.getField(this,7)},proto.NanoPBOptions.prototype.getType=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.NanoPBOptions.prototype.setType=function(e){return r.Message.setField(this,3,e)},proto.NanoPBOptions.prototype.clearType=function(){return r.Message.setField(this,3,void 0)},proto.NanoPBOptions.prototype.hasType=function(){return null!=r.Message.getField(this,3)},proto.NanoPBOptions.prototype.getLongNames=function(){return r.Message.getBooleanFieldWithDefault(this,4,!0)},proto.NanoPBOptions.prototype.setLongNames=function(e){return r.Message.setField(this,4,e)},proto.NanoPBOptions.prototype.clearLongNames=function(){return r.Message.setField(this,4,void 0)},proto.NanoPBOptions.prototype.hasLongNames=function(){return null!=r.Message.getField(this,4)},proto.NanoPBOptions.prototype.getPackedStruct=function(){return r.Message.getBooleanFieldWithDefault(this,5,!1)},proto.NanoPBOptions.prototype.setPackedStruct=function(e){return r.Message.setField(this,5,e)},proto.NanoPBOptions.prototype.clearPackedStruct=function(){return r.Message.setField(this,5,void 0)},proto.NanoPBOptions.prototype.hasPackedStruct=function(){return null!=r.Message.getField(this,5)},proto.NanoPBOptions.prototype.getPackedEnum=function(){return r.Message.getBooleanFieldWithDefault(this,10,!1)},proto.NanoPBOptions.prototype.setPackedEnum=function(e){return r.Message.setField(this,10,e)},proto.NanoPBOptions.prototype.clearPackedEnum=function(){return r.Message.setField(this,10,void 0)},proto.NanoPBOptions.prototype.hasPackedEnum=function(){return null!=r.Message.getField(this,10)},proto.NanoPBOptions.prototype.getSkipMessage=function(){return r.Message.getBooleanFieldWithDefault(this,6,!1)},proto.NanoPBOptions.prototype.setSkipMessage=function(e){return r.Message.setField(this,6,e)},proto.NanoPBOptions.prototype.clearSkipMessage=function(){return r.Message.setField(this,6,void 0)},proto.NanoPBOptions.prototype.hasSkipMessage=function(){return null!=r.Message.getField(this,6)},proto.NanoPBOptions.prototype.getNoUnions=function(){return r.Message.getBooleanFieldWithDefault(this,8,!1)},proto.NanoPBOptions.prototype.setNoUnions=function(e){return r.Message.setField(this,8,e)},proto.NanoPBOptions.prototype.clearNoUnions=function(){return r.Message.setField(this,8,void 0)},proto.NanoPBOptions.prototype.hasNoUnions=function(){return null!=r.Message.getField(this,8)},proto.NanoPBOptions.prototype.getMsgid=function(){return r.Message.getFieldWithDefault(this,9,0)},proto.NanoPBOptions.prototype.setMsgid=function(e){return r.Message.setField(this,9,e)},proto.NanoPBOptions.prototype.clearMsgid=function(){return r.Message.setField(this,9,void 0)},proto.NanoPBOptions.prototype.hasMsgid=function(){return null!=r.Message.getField(this,9)},proto.NanoPBOptions.prototype.getAnonymousOneof=function(){return r.Message.getBooleanFieldWithDefault(this,11,!1)},proto.NanoPBOptions.prototype.setAnonymousOneof=function(e){return r.Message.setField(this,11,e)},proto.NanoPBOptions.prototype.clearAnonymousOneof=function(){return r.Message.setField(this,11,void 0)},proto.NanoPBOptions.prototype.hasAnonymousOneof=function(){return null!=r.Message.getField(this,11)},proto.NanoPBOptions.prototype.getProto3=function(){return r.Message.getBooleanFieldWithDefault(this,12,!1)},proto.NanoPBOptions.prototype.setProto3=function(e){return r.Message.setField(this,12,e)},proto.NanoPBOptions.prototype.clearProto3=function(){return r.Message.setField(this,12,void 0)},proto.NanoPBOptions.prototype.hasProto3=function(){return null!=r.Message.getField(this,12)},proto.NanoPBOptions.prototype.getProto3SingularMsgs=function(){return r.Message.getBooleanFieldWithDefault(this,21,!1)},proto.NanoPBOptions.prototype.setProto3SingularMsgs=function(e){return r.Message.setField(this,21,e)},proto.NanoPBOptions.prototype.clearProto3SingularMsgs=function(){return r.Message.setField(this,21,void 0)},proto.NanoPBOptions.prototype.hasProto3SingularMsgs=function(){return null!=r.Message.getField(this,21)},proto.NanoPBOptions.prototype.getEnumToString=function(){return r.Message.getBooleanFieldWithDefault(this,13,!1)},proto.NanoPBOptions.prototype.setEnumToString=function(e){return r.Message.setField(this,13,e)},proto.NanoPBOptions.prototype.clearEnumToString=function(){return r.Message.setField(this,13,void 0)},proto.NanoPBOptions.prototype.hasEnumToString=function(){return null!=r.Message.getField(this,13)},proto.NanoPBOptions.prototype.getFixedLength=function(){return r.Message.getBooleanFieldWithDefault(this,15,!1)},proto.NanoPBOptions.prototype.setFixedLength=function(e){return r.Message.setField(this,15,e)},proto.NanoPBOptions.prototype.clearFixedLength=function(){return r.Message.setField(this,15,void 0)},proto.NanoPBOptions.prototype.hasFixedLength=function(){return null!=r.Message.getField(this,15)},proto.NanoPBOptions.prototype.getFixedCount=function(){return r.Message.getBooleanFieldWithDefault(this,16,!1)},proto.NanoPBOptions.prototype.setFixedCount=function(e){return r.Message.setField(this,16,e)},proto.NanoPBOptions.prototype.clearFixedCount=function(){return r.Message.setField(this,16,void 0)},proto.NanoPBOptions.prototype.hasFixedCount=function(){return null!=r.Message.getField(this,16)},proto.NanoPBOptions.prototype.getSubmsgCallback=function(){return r.Message.getBooleanFieldWithDefault(this,22,!1)},proto.NanoPBOptions.prototype.setSubmsgCallback=function(e){return r.Message.setField(this,22,e)},proto.NanoPBOptions.prototype.clearSubmsgCallback=function(){return r.Message.setField(this,22,void 0)},proto.NanoPBOptions.prototype.hasSubmsgCallback=function(){return null!=r.Message.getField(this,22)},proto.NanoPBOptions.prototype.getMangleNames=function(){return r.Message.getFieldWithDefault(this,17,0)},proto.NanoPBOptions.prototype.setMangleNames=function(e){return r.Message.setField(this,17,e)},proto.NanoPBOptions.prototype.clearMangleNames=function(){return r.Message.setField(this,17,void 0)},proto.NanoPBOptions.prototype.hasMangleNames=function(){return null!=r.Message.getField(this,17)},proto.NanoPBOptions.prototype.getCallbackDatatype=function(){return r.Message.getFieldWithDefault(this,18,"pb_callback_t")},proto.NanoPBOptions.prototype.setCallbackDatatype=function(e){return r.Message.setField(this,18,e)},proto.NanoPBOptions.prototype.clearCallbackDatatype=function(){return r.Message.setField(this,18,void 0)},proto.NanoPBOptions.prototype.hasCallbackDatatype=function(){return null!=r.Message.getField(this,18)},proto.NanoPBOptions.prototype.getCallbackFunction=function(){return r.Message.getFieldWithDefault(this,19,"pb_default_field_callback")},proto.NanoPBOptions.prototype.setCallbackFunction=function(e){return r.Message.setField(this,19,e)},proto.NanoPBOptions.prototype.clearCallbackFunction=function(){return r.Message.setField(this,19,void 0)},proto.NanoPBOptions.prototype.hasCallbackFunction=function(){return null!=r.Message.getField(this,19)},proto.NanoPBOptions.prototype.getDescriptorsize=function(){return r.Message.getFieldWithDefault(this,20,0)},proto.NanoPBOptions.prototype.setDescriptorsize=function(e){return r.Message.setField(this,20,e)},proto.NanoPBOptions.prototype.clearDescriptorsize=function(){return r.Message.setField(this,20,void 0)},proto.NanoPBOptions.prototype.hasDescriptorsize=function(){return null!=r.Message.getField(this,20)},proto.NanoPBOptions.prototype.getDefaultHas=function(){return r.Message.getBooleanFieldWithDefault(this,23,!1)},proto.NanoPBOptions.prototype.setDefaultHas=function(e){return r.Message.setField(this,23,e)},proto.NanoPBOptions.prototype.clearDefaultHas=function(){return r.Message.setField(this,23,void 0)},proto.NanoPBOptions.prototype.hasDefaultHas=function(){return null!=r.Message.getField(this,23)},proto.NanoPBOptions.prototype.getIncludeList=function(){return r.Message.getRepeatedField(this,24)},proto.NanoPBOptions.prototype.setIncludeList=function(e){return r.Message.setField(this,24,e||[])},proto.NanoPBOptions.prototype.addInclude=function(e,t){return r.Message.addToRepeatedField(this,24,e,t)},proto.NanoPBOptions.prototype.clearIncludeList=function(){return this.setIncludeList([])},proto.NanoPBOptions.prototype.getExcludeList=function(){return r.Message.getRepeatedField(this,26)},proto.NanoPBOptions.prototype.setExcludeList=function(e){return r.Message.setField(this,26,e||[])},proto.NanoPBOptions.prototype.addExclude=function(e,t){return r.Message.addToRepeatedField(this,26,e,t)},proto.NanoPBOptions.prototype.clearExcludeList=function(){return this.setExcludeList([])},proto.NanoPBOptions.prototype.getPackage=function(){return r.Message.getFieldWithDefault(this,25,"")},proto.NanoPBOptions.prototype.setPackage=function(e){return r.Message.setField(this,25,e)},proto.NanoPBOptions.prototype.clearPackage=function(){return r.Message.setField(this,25,void 0)},proto.NanoPBOptions.prototype.hasPackage=function(){return null!=r.Message.getField(this,25)},proto.NanoPBOptions.prototype.getTypeOverride=function(){return r.Message.getFieldWithDefault(this,27,1)},proto.NanoPBOptions.prototype.setTypeOverride=function(e){return r.Message.setField(this,27,e)},proto.NanoPBOptions.prototype.clearTypeOverride=function(){return r.Message.setField(this,27,void 0)},proto.NanoPBOptions.prototype.hasTypeOverride=function(){return null!=r.Message.getField(this,27)},proto.NanoPBOptions.prototype.getSortByTag=function(){return r.Message.getBooleanFieldWithDefault(this,28,!0)},proto.NanoPBOptions.prototype.setSortByTag=function(e){return r.Message.setField(this,28,e)},proto.NanoPBOptions.prototype.clearSortByTag=function(){return r.Message.setField(this,28,void 0)},proto.NanoPBOptions.prototype.hasSortByTag=function(){return null!=r.Message.getField(this,28)},proto.FieldType={FT_DEFAULT:0,FT_CALLBACK:1,FT_POINTER:4,FT_STATIC:2,FT_IGNORE:3,FT_INLINE:5},proto.IntSize={IS_DEFAULT:0,IS_8:8,IS_16:16,IS_32:32,IS_64:64},proto.TypenameMangling={M_NONE:0,M_STRIP_PACKAGE:1,M_FLATTEN:2,M_PACKAGE_INITIALS:3},proto.DescriptorSize={DS_AUTO:0,DS_1:1,DS_2:2,DS_4:4,DS_8:8},proto.nanopbFileopt=new r.ExtensionFieldInfo(1010,{nanopbFileopt:0},proto.NanoPBOptions,proto.NanoPBOptions.toObject,0),s.FileOptions.extensionsBinary[1010]=new r.ExtensionFieldBinaryInfo(proto.nanopbFileopt,r.BinaryReader.prototype.readMessage,r.BinaryWriter.prototype.writeMessage,proto.NanoPBOptions.serializeBinaryToWriter,proto.NanoPBOptions.deserializeBinaryFromReader,!1),s.FileOptions.extensions[1010]=proto.nanopbFileopt,proto.nanopbMsgopt=new r.ExtensionFieldInfo(1010,{nanopbMsgopt:0},proto.NanoPBOptions,proto.NanoPBOptions.toObject,0),s.MessageOptions.extensionsBinary[1010]=new r.ExtensionFieldBinaryInfo(proto.nanopbMsgopt,r.BinaryReader.prototype.readMessage,r.BinaryWriter.prototype.writeMessage,proto.NanoPBOptions.serializeBinaryToWriter,proto.NanoPBOptions.deserializeBinaryFromReader,!1),s.MessageOptions.extensions[1010]=proto.nanopbMsgopt,proto.nanopbEnumopt=new r.ExtensionFieldInfo(1010,{nanopbEnumopt:0},proto.NanoPBOptions,proto.NanoPBOptions.toObject,0),s.EnumOptions.extensionsBinary[1010]=new r.ExtensionFieldBinaryInfo(proto.nanopbEnumopt,r.BinaryReader.prototype.readMessage,r.BinaryWriter.prototype.writeMessage,proto.NanoPBOptions.serializeBinaryToWriter,proto.NanoPBOptions.deserializeBinaryFromReader,!1),s.EnumOptions.extensions[1010]=proto.nanopbEnumopt,proto.nanopb=new r.ExtensionFieldInfo(1010,{nanopb:0},proto.NanoPBOptions,proto.NanoPBOptions.toObject,0),s.FieldOptions.extensionsBinary[1010]=new r.ExtensionFieldBinaryInfo(proto.nanopb,r.BinaryReader.prototype.readMessage,r.BinaryWriter.prototype.writeMessage,proto.NanoPBOptions.serializeBinaryToWriter,proto.NanoPBOptions.deserializeBinaryFromReader,!1),s.FieldOptions.extensions[1010]=proto.nanopb,n.object.extend(t,proto)},393:(e,t,o)=>{"use strict";o.r(t)},607:(e,t,o)=>{"use strict";o(138),o(393),o(861),o(44)},44:function(e,t,o){"use strict";var r=o(755),n=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return i(t,e),t},a=this&&this.__awaiter||function(e,t,o,r){return new(o||(o=Promise))((function(n,i){function s(e){try{p(r.next(e))}catch(e){i(e)}}function a(e){try{p(r.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}p((r=r.apply(e,t||[])).next())}))},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(492);const u=p(o(646)),f=s(o(874)),c=s(o(138));function d(){r("#flashfilename").val=null,O.StartOTA()}function g(e){"reboot_ota"==e?(r("#reboot_ota_nav").removeClass("active").prop("disabled",!0),le(500,"","reboot_ota")):(r("#reboot_nav").removeClass("active"),le(500,"",e))}function C(e){let t,o,n,i;return"string"==typeof e?(o=e,t=r(`#${o}`)):(o=r(e).attr("id"),t=r(e)),"checkbox"===t.attr("type")?(i=t.prop("checked")?o.replace("cmd_opt_",""):"",n=!0):(i=o.replace("cmd_opt_",""),n=t.val(),"string"==typeof n?n=`${n.includes(" ")?'"':""}${n}${n.includes(" ")?'"':""}`:"number"!=typeof n&&(n=n.toString())),{opt:i,val:n}}function h(){let e=y(u.default.get("show-nvs"));const t=r("input#show-nvs")[0];t.checked=e,t.checked||k?r('*[href*="-nvs"]').show():r('*[href*="-nvs"]').hide()}function y(e){return null!=e&&"string"==typeof e&&e.match("[Yy1]").length>0}var M;console.log(f),window.hideSurrounding=function(e){r(e).parent().parent().hide()},window.hFlash=function(){d()},window.handleReboot=function(e){g(e)},Object.assign(String.prototype,{format(...e){return this.replace(/{(\d+)}/g,(function(t,o){const r=parseInt(o,10);return void 0!==e[r]?e[r]:t}))}}),Object.assign(String.prototype,{encodeHTML(){return l.encode(this).replace(/\n/g,"")}}),Object.assign(Date.prototype,{toLocalShort(){return this.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}}),function(e){e[e.NVS_TYPE_U8=1]="NVS_TYPE_U8",e[e.NVS_TYPE_I8=17]="NVS_TYPE_I8",e[e.NVS_TYPE_U16=2]="NVS_TYPE_U16",e[e.NVS_TYPE_I16=18]="NVS_TYPE_I16",e[e.NVS_TYPE_U32=4]="NVS_TYPE_U32",e[e.NVS_TYPE_I32=20]="NVS_TYPE_I32",e[e.NVS_TYPE_U64=8]="NVS_TYPE_U64",e[e.NVS_TYPE_I64=24]="NVS_TYPE_I64",e[e.NVS_TYPE_STR=33]="NVS_TYPE_STR",e[e.NVS_TYPE_BLOB=66]="NVS_TYPE_BLOB",e[e.NVS_TYPE_ANY=255]="NVS_TYPE_ANY"}(M||(M={}));const m={bt_playing:{label:"",icon:"media_bluetooth_on"},bt_disconnected:{label:"",icon:"media_bluetooth_off"},bt_neutral:{label:"",icon:"bluetooth"},bt_connecting:{label:"",icon:"bluetooth_searching"},bt_connected:{label:"",icon:"bluetooth_connected"},bt_disabled:{label:"",icon:"bluetooth_disabled"},play_arrow:{label:"",icon:"play_circle_filled"},pause:{label:"",icon:"pause_circle"},stop:{label:"",icon:"stop_circle"},"":{label:"",icon:""}},B=[{icon:"battery_0_bar",label:"▪",ranges:[{f:5.8,t:6.8},{f:8.8,t:10.2}]},{icon:"battery_2_bar",label:"▪▪",ranges:[{f:6.8,t:7.4},{f:10.2,t:11.1}]},{icon:"battery_3_bar",label:"▪▪▪",ranges:[{f:7.4,t:7.5},{f:11.1,t:11.25}]},{icon:"battery_4_bar",label:"▪▪▪▪",ranges:[{f:7.5,t:7.8},{f:11.25,t:11.7}]}],S=[{desc:"Idle",sub:["bt_neutral"]},{desc:"Discovering",sub:["bt_connecting"]},{desc:"Discovered",sub:["bt_connecting"]},{desc:"Unconnected",sub:["bt_disconnected"]},{desc:"Connecting",sub:["bt_connecting"]},{desc:"Connected",sub:["bt_connected","play_arrow","bt_playing","pause","stop"]},{desc:"Disconnecting",sub:["bt_disconnected"]}],v={OK:0,FAIL:1,DISC:2,LOST:3,RESTORE:4,ETH:5},b=["eRunning","eReady","eBlocked","eSuspended","eDeleted"];let O={NONE:0,REBOOT_TO_RECOVERY:2,SET_FWURL:5,FLASHING:6,DONE:7,UPLOADING:8,ERROR:9,UPLOADCOMPLETE:10,_state:-1,olderRecovery:!1,statusText:"",flashURL:"",flashFileName:"",statusPercent:0,Completed:!1,recovery:!1,prevRecovery:!1,updateModal:new c.Modal(document.getElementById("otadiv"),{}),reset:function(){return this.olderRecovery=!1,this.statusText="",this.statusPercent=-1,this.flashURL="",this.flashFileName=void 0,this.UpdateProgress(),r("#rTable tr.release").removeClass("table-success table-warning"),r(".flact").prop("disabled",!1),r("#flashfilename")[0].value=null,r("#fw-url-input")[0].value=null,this.isStateError()||(r("span#flash-status").html(""),r("#fwProgressLabel").parent().removeClass("bg-danger")),this._state=this.NONE,this},isStateUploadComplete:function(){return this._state==this.UPLOADCOMPLETE},isStateError:function(){return this._state==this.ERROR},isStateNone:function(){return this._state==this.NONE},isStateRebootRecovery:function(){return this._state==this.REBOOT_TO_RECOVERY},isStateSetUrl:function(){return this._state==this.SET_FWURL},isStateFlashing:function(){return this._state==this.FLASHING},isStateDone:function(){return this._state==this.DONE},isStateUploading:function(){return this._state==this.UPLOADING},init:function(){return this._state=this.NONE,this},SetStateError:function(){return this._state=this.ERROR,r("#fwProgressLabel").parent().addClass("bg-danger"),this},SetStateNone:function(){return this._state=this.NONE,this},SetStateRebootRecovery:function(){return this._state=this.REBOOT_TO_RECOVERY,this.SetStatusText("Starting recovery mode."),r.ajax({url:"/recovery.json",context:this,dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify({timestamp:Date.now()}),error:function(e,t,o){var r;this.setOTAError(`Unexpected error while trying to restart to recovery. (status=${null!==(r=e.status)&&void 0!==r?r:""}, error=${null!=o?o:""} ) `)},complete:function(e){this.SetStatusText("Waiting for system to boot.")}}),this},SetStateSetUrl:function(){return this._state=this.SET_FWURL,this.statusText="Sending firmware download location.",D({fwurl:{value:this.flashURL,type:33}}),this},SetStateFlashing:function(){return this._state=this.FLASHING,this},SetStateDone:function(){return this._state=this.DONE,this.reset(),this},SetStateUploading:function(){return this._state=this.UPLOADING,this.SetStatusText("Sending file to device.")},SetStateUploadComplete:function(){return this._state=this.UPLOADCOMPLETE,this},isFlashExecuting:function(){return!0==(this._state!=this.UPLOADING&&(""!==this.statusText||this.statusPercent>=0))},toString:function(){return Object.keys(this).find((e=>this[e]===this._state))},setOTATargets:function(){this.flashURL="",this.flashFileName="",this.flashURL=r("#fw-url-input").val();let e=r("#flashfilename")[0].files;return e.length>0&&(this.flashFileName=e[0]),0==this.flashFileName.length&&0==this.flashURL.length&&this.setOTAError("Invalid url or file. Cannot start OTA"),this},setOTAError:function(e){return this.SetStateError().SetStatusPercent(0).SetStatusText(e).reset(),this},ShowDialog:function(){return this.isStateNone()||(this.updateModal.show(),r(".flact").prop("disabled",!0)),this},SetStatusPercent:function(e){var t=this.statusPercent!=e;return this.statusPercent=e,t&&(this.isStateUploading()||this.isStateFlashing()||this.SetStateFlashing(),100==e&&(this.isStateFlashing()?this.SetStateDone():this.isStateUploading()&&(this.statusPercent=0,this.SetStateFlashing())),this.UpdateProgress().ShowDialog()),this},SetStatusText:function(e){var t=this.statusText!=e;return this.statusText=e,t&&(r("span#flash-status").html(this.statusText),this.ShowDialog()),this},UpdateProgress:function(){return r(".progress-bar").css("width",this.statusPercent+"%").attr("aria-valuenow",this.statusPercent).text(this.statusPercent+"%"),r(".progress-bar").html((this.isStateDone()?100:this.statusPercent)+"%"),this},StartOTA:function(){return this.logEvent(this.StartOTA.name),r("#fwProgressLabel").parent().removeClass("bg-danger"),this.setOTATargets(),this.isStateError()||(k?this.SetStateFlashing().TargetReadyStartOTA():this.SetStateRebootRecovery()),this},UploadLocalFile:function(){this.SetStateUploading();const e=new XMLHttpRequest;var t=this.HandleUploadProgressEvent.bind(this),o=this.setOTAError.bind(this);e.upload.addEventListener("progress",t,!1),e.onreadystatechange=function(){4===e.readyState&&(0!==e.status&&404!==e.status||o("Upload Failed. Recovery version might not support uploading. Please use web update instead."))},e.open("POST","/flash.json",!0),e.send(this.flashFileName)},TargetReadyStartOTA:function(){return k&&this.prevRecovery&&!this.isStateRebootRecovery()&&!this.isStateFlashing()?this:(this.logEvent(this.TargetReadyStartOTA.name),k?(this.prevRecovery=!0,void(""!==this.flashFileName?this.UploadLocalFile():""!=this.flashURL?this.SetStateSetUrl():this.setOTAError("Invalid URL or file name while trying to start the OTa process"))):(console.error("Event TargetReadyStartOTA fired in the wrong mode "),this))},HandleUploadProgressEvent:function(e){this.logEvent(this.HandleUploadProgressEvent.name),this.SetStateUploading().SetStatusPercent(Math.round(e.loaded/e.total*100)).SetStatusText("Uploading file to device")},EventTargetStatus:function(e){var t,o;this.isStateNone()||this.logEvent(this.EventTargetStatus.name),null!==(t=e.ota_pct)&&void 0!==t&&t&&(this.olderRecovery=!0,this.SetStatusPercent(e.ota_pct)),""!=(null!==(o=e.ota_dsc)&&void 0!==o?o:"")&&(this.olderRecovery=!0,this.SetStatusText(e.ota_dsc)),null!=e.recovery&&(this.recovery=1===e.recovery),this.isStateRebootRecovery()&&this.recovery&&this.TargetReadyStartOTA()},EventOTAMessageClass:function(e){this.logEvent(this.EventOTAMessageClass.name);var t=JSON.parse(e);this.SetStatusPercent(t.ota_pct).SetStatusText(t.ota_dsc)},logEvent:function(e){console.log(`${e}, flash state ${this.toString()}, recovery: ${this.recovery}, ota pct: ${this.statusPercent}, ota desc: ${this.statusText}`)}},F=!1,I=!1,P=2500;function D(e){let t={timestamp:Date.now(),config:e};r.ajax({url:"/config.json",dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify(t),error:T})}function E(e){const t={};let o,r,n="";const i=e.match(/("[^"]+"|'[^']+'|\S+)/g)||[];let s=0;for(;s0&&(t=t.substring(0,t.indexOf(" "))));return t}(t),r=function(e){let t;e.n&&(t=e.n.replace(/"/g,"").replace(/'/g,""));return t}(t);let a={btname:null,n:null};if(t.o&&"BT"===o.toUpperCase()){let e=E(t.o);e.name&&(a.btname=e.name),delete t.o}return t.n&&(a.n=t.n,delete t.n),{name:r,output:o,options:t,otherValues:n,otherOptions:a}}function w(){return V.hasOwnProperty("ip")&&"0.0.0.0"!=V.ip&&""!=V.ip}function G(e){return w()?e.icon:e.label}function W(e){r("#o_type").children("span").css({display:"none"});let t=!1;e!==H&&(t=!0,H=e),r("#"+H).prop("checked",!0),r("#o_"+H).css({display:"inline"}),t&&Object.entries(A[H]).forEach((([e,t])=>{r(`#cmd_opt_${e}`).val(t)}))}function T(e,t,o){console.log(e.status),console.log(o),""!==o&&Fe(o,"MESSAGING_ERROR")}function R(e,t,o,n=!1){let i="table-success";"MESSAGING_WARNING"===t?i="table-warning":"MESSAGING_ERROR"===t&&(i="table-danger"),r("#toast_"+e).removeClass("table-success").removeClass("table-warning").removeClass("table-danger").addClass(i).addClass("show");let s=o.substring(0,o.length-1).encodeHTML().replace(/\n/g,"");s=(r("#msg_"+e).html().length>0&&n?r("#msg_"+e).html()+"":"")+s,r("#msg_"+e).html(s)}let _="https://api.github.com/repos/sle118/squeezelite-esp32/releases",k=!1,N=!1,z="";const A={i2s:{b:"500:2000",C:"30",W:"",Z:"96000",o:"I2S"},spdif:{b:"500:2000",C:"30",W:"",Z:"48000",o:"SPDIF"},bt:{b:"500:2000",C:"30",W:"",Z:"44100",o:"BT"}};let x,j={codecs:["flac","pcm","mp3","ogg","aac","wma","alac","dsd","mad","mpg"]},L=null,$=0,U="MESSAGING_INFO",J=NaN;var H="";let V,Y,K="",q="Squeezelite-ESP32",X="",Z=q,Q=16,ee="",te=q,oe="",re="#cfg-audio-bt_source-sink_name",ne="",ie="";const se={CONN:0,MAN:1,STS:2};function ae(e,t){return new Promise(((o,r)=>{e.then((e=>setTimeout((()=>o(e)),t)),(e=>setTimeout((()=>r(e)),t)))}))}function pe(e){const t={};r("input.nvs").each((function(o,r){const n=r,i=n.attributes.getNamedItem("nvs_type");if(!e&&i){const e=parseInt(i.value,10);if(""!==n.id){const o=e<=M.NVS_TYPE_I64?parseInt(n.value,10):n.value;t[n.id]={value:o,type:e}}}else""!==n.id&&(t[n.id]=n.value)}));const o=r("#nvs-new-key").val(),n=r("#nvs-new-value").val();return o&&""!==o&&(t[o]=e?n:{value:n,type:M.NVS_TYPE_I8}),t}function le(e,t,o="reboot"){const n=`/${o}.json`;r("tbody#tasks").empty(),r("#tasks_sect").css("visibility","collapse"),ae(Promise.resolve({cmdname:t,url:n}),e).then((function(e){console.log("now triggering reboot"),r("button[onclick*='handleReboot']").addClass("rebooting"),r.ajax({complete:function(){console.log("reboot call completed"),ae(Promise.resolve(e),6e3).then((function(e){}))}})}))}function ue(e){R("cfg-audio-tmpl","MESSAGING_INFO","Saving.\n",!1);let t=`squeezelite -o ${H} `;r(".sqcmd").each((function(){let{opt:e,val:o}=C(r(this));if(e&&e.length>0&&"boolean"==typeof o||"string"==typeof o&&o.length>0){o="boolean"==typeof o?"":o,t+=`${":"===e?e:` -${e} `} ${o}`}}));const o=r("#cmd_opt_R input[name=resample]:checked");o.length>0&&""!==o.attr("suffix")&&(t+=o.attr("suffix"),r("#resample_i").is(":checked")&&"true"==o.attr("aint")&&(t+=r("#resample_i").attr("suffix"))),"bt"===H&&R("cfg-audio-tmpl","MESSAGING_INFO","Remember to configure the Bluetooth audio device name.\n",!0);const n={timestamp:Date.now(),config:{autoexec1:{value:t,type:M.NVS_TYPE_STR}}};r.ajax({url:"/config.json",dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify(n),error:T,complete:function(t){t.responseText&&"OK"===JSON.parse(t.responseText).result?(R("cfg-audio-tmpl","MESSAGING_INFO","Done.\n",!0),e&&le(1500,"cfg-audio-tmpl")):JSON.parse(t.responseText).result?R("cfg-audio-tmpl","MESSAGING_WARNING",JSON.parse(t.responseText).Result+"\n",!0):R("cfg-audio-tmpl","MESSAGING_ERROR",t.statusText+"\n"),console.log(t.responseText)}}),console.log("sent data:",JSON.stringify(n))}function fe(e){return r(".upf").filter((function(){return r(this).text().toUpperCase()===e.toUpperCase()})).length>0&&(r("#splf").val(e).trigger("input"),!0)}function ce(e,t){const o=`cmd_opt_${e}`;let n=`${o}-error`,i=r(`#${n}`),s=r(`#${o}`);return i&&0!=i.length||(s.after(``),i=r(`#${n}`)),0==t.length?(i.hide(),s.removeClass("is-invalid"),s.addClass("is-valid"),i.text("")):(i.show(),i.text(t),s.removeClass("is-valid"),s.addClass("is-invalid")),i}function de(e){return e>=-55?{label:"****",icon:"signal_wifi_statusbar_4_bar"}:e>=-60?{label:"***",icon:"network_wifi_3_bar"}:e>=-65?{label:"**",icon:"network_wifi_2_bar"}:e>=-70?{label:"*",icon:"network_wifi_1_bar"}:{label:".",icon:"signal_wifi_statusbar_null"}}function ge(){(null==V?void 0:V.urc)!==v.ETH&&(r.ajaxSetup({timeout:3e3}),r.getJSON("/scan.json",(function(){return a(this,void 0,void 0,(function*(){var e;yield(e=2e3,new Promise((t=>setTimeout(t,e)))),r.getJSON("/ap.json",(function(e){e.length>0&&(e.sort((function(e,t){const o=e.rssi,r=t.rssi;return or?-1:0})),L=e,he(L))}))}))})))}function Ce(e,t,o){const r=de(t),n={label:0==o?"🔓":"🔒",icon:0==o?"no_encryption":"lock"};return`${e}\n ${G(r)}\n \t\n ${G(n)}\n `}function he(e){var t;let o="";if(r("#wifiTable tr td:first-of-type").text(""),r("#wifiTable tr").removeClass("table-success table-warning"),e&&(e.forEach((function(e){o+=Ce(e.ssid,e.rssi,e.auth)})),r("#wifiTable").html(o)),0==r(".manual_add").length&&(r("#wifiTable").append(Ce("Manual add",0,0)),r("#wifiTable tr:last").addClass("table-light text-dark").addClass("manual_add")),!V.ssid||V.urc!==v.OK&&V.urc!==v.RESTORE)(null==V?void 0:V.urc)!==v.ETH&&r("span#foot-if").html("");else{const e=`#wifiTable td:contains("${V.ssid}")`;0==r(e).filter((function(){return r(this).text()===V.ssid})).length&&r("#wifiTable").prepend(`${Ce(V.ssid,null!==(t=V.rssi)&&void 0!==t?t:0,0)}`),r(e).filter((function(){return r(this).text()===V.ssid})).siblings().first().html("✓").parent().addClass(V.urc===v.OK?"table-success":"table-warning"),r("span#foot-if").html(`SSID: ${V.ssid}, IP: ${V.ip}`);const o=de(V.rssi),n=G(o);r("#wifiStsIcon").text(n),r("#wifiStsIcon").attr("aria-label",o.label),r("#wifiStsIcon").attr("icon",o.icon)}}function ye(e){console.debug(`${this.toLocaleString()}\t${e.nme}\t${e.cpu}\t${b[e.st]}\t${e.minstk}\t${e.bprio}\t${e.cprio}\t${e.num}`),r("tbody#tasks").append(`${e.num}${e.nme}${e.cpu}${b[e.st]}${e.minstk}${e.bprio}${e.cprio}`)}function Me(e){return r(`${re} option:contains('${e}')`)}function me(){r.ajaxSetup({timeout:P}),r.getJSON("/messages.json",(function(e){return a(this,void 0,void 0,(function*(){for(const l of e){const e=l.current_time-l.sent_time;var t=new Date;switch(t.setTime(t.getTime()-e),l.class){case"MESSAGING_CLASS_OTA":O.EventOTAMessageClass(l.message);break;case"MESSAGING_CLASS_STATS":var o=JSON.parse(l.message);if(console.debug(t.toLocalShort()+" - Number of running tasks: "+o.ntasks),console.debug(`${t.toLocalShort()}\tname\tcpu\tstate\tminstk\tbprio\tcprio\tnum`),o.tasks){o.tasks;"collapse"===r("#tasks_sect").css("visibility")&&r("#tasks_sect").css("visibility","visible"),r("tbody#tasks").html(""),o.taskList.sort((function(e,t){return t.cpu-e.cpu})).forEach(ye,t)}else"visible"===r("#tasks_sect").css("visibility")&&(r("tbody#tasks").empty(),r("#tasks_sect").css("visibility","collapse"));break;case"MESSAGING_CLASS_SYSTEM":Ie(l,t);break;case"MESSAGING_CLASS_CFGCMD":var n=l.message.split(/([^\n]*)\n(.*)/gs);R(n[1],l.type,n[2],!0);break;case"MESSAGING_CLASS_BT":if(r(re).is("input")){const e=r(re)[0];for(var i=e.attributes,s="",a=0;a${p} `)}JSON.parse(l.message).forEach((function(e){Me(e.name).length>0||(r(re).append(`${e.name}`),Ie({type:l.type,message:`BT Audio device found: ${e.name} RSSI: ${e.rssi} `,class:"",sent_time:0,current_time:0},t)),Me(e.name).attr("data-bs-description",`${e.name} (${e.rssi}dB)`).attr("rssi",e.rssi).attr("value",e.name).text(`${e.name} [${e.rssi}dB]`).trigger("change")}));const e=Array.from(r(re).find("option"));e.sort((function(e,t){const o=parseInt(r(e).attr("rssi"),10),n=parseInt(r(t).attr("rssi"),10);return console.log(`${o} < ${n} ? `),n-o})),r(re).empty().append(e)}}setTimeout(me,P)}))})).fail((function(e,t,o){404==e.status?(r(".orec").hide(),N=!0):T(e,0,o),0==e.status&&0==e.readyState?setTimeout(me,2*P):N||setTimeout(me,P)}))}function Be(e){if(r("#WifiConnectDialog").is(":visible")){if(V.ip&&r("#ipAddress").text(V.ip),V.ssid&&r("#connectedToSSID").text(V.ssid),V.gw&&r("#gateway").text(V.gw),V.netmask&&r("#netmask").text(V.netmask),(void 0===Y.Action||Y.Action&&Y.Action==se.STS)&&(r("*[class*='connecting']").hide(),r(".connecting-status").show()),x.ap_ssid&&r("#apName").text(x.ap_ssid.value),x.ap_pwd&&r("#apPass").text(x.ap_pwd.value),!e)return;switch(e.urc){case v.OK:e.ssid&&e.ssid===Y.ssid&&(r("*[class*='connecting']").hide(),r(".connecting-success").show(),Y.Action=se.STS);break;case v.FAIL:Y.Action!=se.STS&&Y.ssid==e.ssid&&(r("*[class*='connecting']").hide(),r(".connecting-fail").show());break;case v.LOST:break;case v.RESTORE:Y.Action!=se.STS&&Y.ssid!=e.ssid&&(r("*[class*='connecting']").hide(),r(".connecting-fail").show());case v.DISC:}}}function Se(e){r(".material-icons").each((function(t,o){const r=o;r.textContent=r.getAttribute(e?"aria-label":"data-icon")||""}))}function ve(e){Se(!w()),!function(e){return e.urc!==V.urc||e.ssid!==V.ssid||e.gw!==V.gw||e.netmask!==V.netmask||e.ip!==V.ip||e.rssi!==V.rssi}(e)&&e.urc||(V=function(e){var t;return{urc:null!==(t=e.urc)&&void 0!==t?t:0,auth:void 0,pwd:void 0,dhcpname:void 0,Action:void 0,ip:e.ip,ssid:e.ssid,rssi:e.rssi,gw:e.gw,netmask:e.netmask}}(e),r(".if_eth").hide(),r(".if_wifi").hide(),e.urc&&V.urc==v.ETH?(r(".if_eth").show(),V.urc===v.ETH&&r("span#foot-if").html(`Network: Ethernet, IP: ${V.ip}`)):(r(".if_wifi").show(),he())),Be(e)}function be(){r.ajaxSetup({timeout:2e3}),r.getJSON("/status.json",(function(e){var t;if(function(e){var t;1===(null!==(t=e.recovery)&&void 0!==t?t:0)?(k=!0,r(".recovery_element").show(),r(".ota_element").hide(),r("#boot-button").html("Reboot"),r("#boot-form").attr("action","/reboot_ota.json")):(!k&&N&&(N=!1,setTimeout(me,P)),k=!1,r(".recovery_element").hide(),r(".ota_element").show(),r("#boot-button").html("Recovery"),r("#boot-form").attr("action","/recovery.json"))}(e),h(),ve(e),function(e){var t;let o={label:"",icon:""},n="";if(void 0!==e.bt_status&&void 0!==e.bt_sub_status){const r=null===(t=S[e.bt_status])||void 0===t?void 0:t.sub[e.bt_sub_status];r?(o=m[r],n=S[e.bt_status].desc):(o=m.bt_connected,n="Output status")}r("#o_type").attr("title",n),r("#o_bt").html(w()?o.label:o.icon)}(e),O.EventTargetStatus(e),e.depth&&(Q=e.depth,16==Q?r("#cmd_opt_R").show():r("#cmd_opt_R").hide()),e.project_name&&""!==e.project_name&&(Z=e.project_name),e.platform_name&&""!==e.platform_name&&(te=e.platform_name),""===ee&&(ee=Z),""===ee&&(ee="Squeezelite-ESP32"),e.version&&""!==e.version?(q=e.version,r("#navtitle").html(`${ee}${k?"[recovery]":""}`),r("span#foot-fw").html(`fw: ${q}, mode: ${k?"Recovery":Z}`)):r("span#flash-status").html(""),e.Voltage){const t=function(e){for(const n of B)for(const i of n.ranges)if(t=e,o=i.f,r=i.t,(t-o)*(t-r)<=0)return{label:n.label,icon:n.icon};var t,o,r;return{label:"▪▪▪▪",icon:"battery_full"}}(e.Voltage);r("#battery").html(`${G(t)}`),r("#battery").attr("aria-label",t.label),r("#battery").attr("data-icon",t.icon),r("#battery").show()}else r("#battery").hide();if(""!=(null!==(t=e.message)&&void 0!==t?t:"")&&X!=e.message&&(X=e.message,Fe(e.message,"MESSAGING_INFO")),I=e.is_i2c_locked,I?r("flds-cfg-hw-preset").hide():r("flds-cfg-hw-preset").show(),r("button[onclick*='handleReboot']").removeClass("rebooting"),void 0===ne||e.lms_ip!=ie&&e.lms_ip&&e.lms_port){const t="http://"+e.lms_ip+":"+e.lms_port;ie=e.lms_ip,r.ajax({url:t+"/plugins/SqueezeESP32/firmware/-check.bin",type:"HEAD",dataType:"text",cache:!1,error:function(){ne=""},success:function(){ne=t}})}r("#o_jack").css({display:Number(e.Jack)?"inline":"none"}),setTimeout(be,2e3)})).fail((function(e,t,o){T(e,0,o),0==e.status&&0==e.readyState?setTimeout(be,2*P):setTimeout(be,P)}))}function Oe(e,t,o){return void 0!==e[t]?e[t][o]:""}function Fe(e,t){Ie({message:e,type:t,class:"",sent_time:0,current_time:0},new Date)}function Ie(e,t){let o="table-success";"MESSAGING_WARNING"===e.type?(o="table-warning","MESSAGING_INFO"===U&&(U="MESSAGING_WARNING")):"MESSAGING_ERROR"===e.type&&("MESSAGING_INFO"!==U&&"MESSAGING_WARNING"!==U||(U="MESSAGING_ERROR"),o="table-danger"),++$>0&&(r("#msgcnt").removeClass("badge-success"),r("#msgcnt").removeClass("badge-warning"),r("#msgcnt").removeClass("badge-danger"),r("#msgcnt").addClass({MESSAGING_INFO:"badge-success",MESSAGING_WARNING:"badge-warning",MESSAGING_ERROR:"badge-danger"}[U]),r("#msgcnt").text($)),r("#syslogTable").append(""+t.toLocalShort()+""+e.message.encodeHTML()+"")}r((function(){r(".material-icons").each((function(e,t){t.setAttribute("data-icon",t.textContent||"")})),Se(!0),h(),O.init(),r("#fw-url-input").on("input",(function(){const e=r(this).val().toString();e.length>8&&(e.startsWith("http://")||e.startsWith("https://"))?r("#start-flash").show():r("#start-flash").hide()})),r(".upSrch").on("input",(function(){const e=this,t=e.value;r("#rTable tr").removeClass(e.id+"_hide"),t.length>0&&r(`#rTable td:nth-child(${r(e).parent().index()+1})`).filter((function(){return!r(this).text().toUpperCase().includes(t.toUpperCase())})).parent().addClass(this.id+"_hide"),r('[class*="_hide"]').hide(),r("#rTable tr").not('[class*="_hide"]').show()})),setTimeout(ge,1500),r("#options input").on("input",(function(){const{opt:e,val:t}=C(this);if("c"===e||"e"===e){const o=t.toString().split(",").map((function(e){return e.trim()})).filter((function(e){return!j.codecs.includes(e)}));ce(e,o.length>0?`Invalid codec(s) ${o.join(", ")}`:"")}if("m"===e){ce(e,/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t.toString())?"":"Invalid MAC address")}if("r"===e){ce(e,/^(\d+\.?\d*|\.\d+)-(\d+\.?\d*|\.\d+)$|^(\d+\.?\d*)$|^(\d+\.?\d*,)+\d+\.?\d*$/.test(t.toString())?"":`Invalid rate(s) ${t}. Acceptable format: |-|,,`)}})),r("#WifiConnectDialog")[0].addEventListener("shown.bs.modal",(function(e){r("*[class*='connecting']").hide(),(null==e?void 0:e.relatedTarget)&&(Y.Action=se.CONN,r(e.relatedTarget).children("td:eq(1)").text()==V.ssid?Y.Action=se.STS:r(e.relatedTarget).is(":last-child")?(Y.Action=se.MAN,Y.ssid="",r("#manual_ssid").val(Y.ssid)):(Y.ssid=r(e.relatedTarget).children("td:eq(1)").text(),r("#manual_ssid").val(Y.ssid))),Y.Action!==se.STS?(r(".connecting-init").show(),r("#manual_ssid").trigger("focus")):Be()})),r("#WifiConnectDialog")[0].addEventListener("hidden.bs.modal",(function(){r("#WifiConnectDialog input").val("")})),r("#uCnfrm")[0].addEventListener("shown.bs.modal",(function(){r("#selectedFWURL").text(r("#fw-url-input").val().toString())})),r("input#show-commands")[0].checked=1===J,r('a[href^="#tab-commands"]').hide(),r("#load-nvs").on("click",(function(){r("#nvsfilename").trigger("click")})),r("#nvsfilename").on("change",(function(){const e=this;if("function"!=typeof window.FileReader)throw"The file API isn't supported on this browser.";if(!e.files)throw"This browser does not support the `files` property of the file input.";if(!e.files[0])return;const t=e.files[0];let o=new FileReader;o.onload=function(e){let t;try{t=JSON.parse(e.target.result.toString())}catch(e){alert("Parsing failed!\r\n "+e)}r("input.nvs").each((function(e,o){r(this).parent().removeClass("bg-warning").removeClass("bg-success"),t[o.id]&&(t[o.id]!==o.value?(console.log("Changed "+o.id+" "+o.value+"==>"+t[o.id]),r(this).parent().addClass("bg-warning"),r(this).val(t[o.id])):r(this).parent().addClass("bg-success"))})),r("input.nvs").children(".bg-warning")&&alert("Highlighted values were changed. Press Commit to change on the device")},o.readAsText(t),e.value=null})),r("#clear-syslog").on("click",(function(){$=0,U="MESSAGING_INFO",r("#msgcnt").text(""),r("#syslogTable").html("")})),r("#ok-credits").on("click",(function(){r("#credits").slideUp("fast",(function(){})),r("#app").slideDown("fast",(function(){}))})),r("#acredits").on("click",(function(e){e.preventDefault(),r("#app").slideUp("fast",(function(){})),r("#credits").slideDown("fast",(function(){}))})),r("input#show-commands").on("click",(function(){const e=this;e.checked=!!e.checked,e.checked?(r('a[href^="#tab-commands"]').show(),J=1):(J=0,r('a[href^="#tab-commands"]').hide())})),r("#disable-squeezelite").on("click",(function(){if(this.checked){const e=r("#cmd_opt_s").val();r("#cmd_opt_s").data("originalValue",e),r("#cmd_opt_s").val("-disable")}else{const e=r("#cmd_opt_s").data("originalValue");r("#cmd_opt_s").val(e||"")}})),r("input#show-nvs").on("click",(function(){const e=this;e.checked=!!e.checked,u.default.set("show-nvs",e.checked?"Y":"N"),h()})),r("#btn_reboot_recovery").on("click",(function(){g("recovery")})),r("#btn_reboot").on("click",(function(){g("reboot")})),r("#btn_flash").on("click",(function(){d()})),r("#save-autoexec1").on("click",(function(){ue(!1)})),r("#commit-autoexec1").on("click",(function(){ue(!0)})),r("#btn_disconnect").on("click",(function(){V={auth:void 0,pwd:void 0,dhcpname:void 0,Action:void 0,ip:void 0,ssid:void 0,rssi:void 0,gw:void 0,netmask:void 0,urc:0},he(),r.ajax({url:"/connect.json",dataType:"text",method:"DELETE",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify({timestamp:Date.now()})})})),r("#btnJoin").on("click",(function(){Y.ssid=r("#manual_ssid").val().toString(),Y.pwd=r("#manual_pwd").val().toString(),Y.dhcpname=r("#dhcp-name2").val().toString(),r("*[class*='connecting']").hide(),r("#ssid-wait").text(Y.ssid),r(".connecting").show(),r.ajax({url:"/connect.json",dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify({timestamp:Date.now(),ssid:Y.ssid,pwd:Y.pwd}),error:T})})),r("#reboot_nav").on("click",(function(){g("reboot")})),r("#reboot_ota_nav").on("click",(function(){g("reboot_ota")})),r("#save-as-nvs").on("click",(function(){const e=pe(!0),t=document.createElement("a");t.href=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:"text/plain"})),t.setAttribute("download","nvs_config_"+K+"_"+Date.now()+"json"),document.body.appendChild(t),t.click(),document.body.removeChild(t)})),r("#save-nvs").on("click",(function(){D(pe(!1))})),r("#fwUpload").on("click",(function(){0===document.getElementById("flashfilename").files.length?alert("No file selected!"):(r("#fw-url-input").value=null,O.StartOTA())})),r("[name=output-tmpl]").on("click",(function(){W(this.id)})),r("#chkUpdates").on("click",(function(){r("#rTable").html(""),r.getJSON(_,(function(e){const t=[];e.forEach((function(e){const o=e.name.split("#")[3];t.includes(o)||t.push(o)}));let o="";t.forEach((function(e){o+=''+e+""})),r("#fwbranch").append(o),e.forEach((function(e){let t="";e.assets.forEach((function(e){e.name.match(/\.bin$/)&&(t=e.browser_download_url)}));const o=e.name.split("#"),n=o[0],i=o[2],s=o[3];var a=n.substr(n.lastIndexOf("-")+1);a="32"==a||"16"==a?a:"";let p=e.body;p=p.replace(/'/gi,'"'),p=p.replace(/[\s\S]+(### Revision Log[\s\S]+)### ESP-IDF Version Used[\s\S]+/,"$1"),p=p.replace(/- \(.+?\) /g,"- ").encodeHTML(),r("#rTable").append(`\n ${n}${new Date(e.created_at).toLocalShort()}\n ${i}${s}${a}`)})),r("#searchfw").css("display","inline"),fe(te)||fe(Z),r("#rTable tr.release").on("click",(function(){var e=this.getAttribute("fwurl");ne&&(e=e.replace(/.*\/download\//,ne+"/plugins/SqueezeESP32/firmware/")),r("#fw-url-input").val(e),r("#start-flash").show(),r("#rTable tr.release").removeClass("table-success table-warning"),r(this).addClass("table-success table-warning")}))})).fail((function(){alert("failed to fetch release history!")}))})),r("#fwcheck").on("click",(function(){r("#releaseTable").html(""),r("#fwbranch").empty(),r.getJSON(_,(function(e){let t=0;const o=[];let n;e.forEach((function(e){const t=e.name.split("#")[3];o.includes(t)||o.push(t)})),o.forEach((function(e){n+=`${e}`})),r("#fwbranch").append(n),e.forEach((function(e){let o="";e.assets.forEach((function(e){e.name.match(/\.bin$/)&&(o=e.browser_download_url)}));const n=e.name.split("#"),i=n[0],s=n[1],a=n[2],p=n[3];let l=e.body;l=l.replace(/'/gi,'"'),l=l.replace(/[\s\S]+(### Revision Log[\s\S]+)### ESP-IDF Version Used[\s\S]+/,"$1"),l=l.replace(/- \(.+?\) /g,"- ");const u=t++>6?" hide":"";r("#releaseTable").append(`${i}${new Date(e.created_at).toLocalShort()}${a}${s}${p}`)})),t>7&&(r("#releaseTable").append(""),r("#showallbutton").on("click",(function(){r("tr.hide").removeClass("hide"),r("tr#showall").addClass("hide")}))),r("#searchfw").css("display","inline")})).fail((function(){alert("failed to fetch release history!")}))})),r("#updateAP").on("click",(function(){ge(),console.log("refresh AP")})),r.ajaxSetup({timeout:7e3}),r.getJSON("/config.json",(function(e){r("#nvsTable tr").remove();const t=e.config?e.config:e;x=t,z="",Object.keys(t).sort().forEach((function(e){let o=t[e].value;"autoexec1"===e?function(e){const t=E(e);if(t.output.toUpperCase().startsWith("I2S")?W("i2s"):t.output.toUpperCase().startsWith("SPDIF")?W("spdif"):t.output.toUpperCase().startsWith("BT")&&(t.otherOptions.btname&&(z=t.otherOptions.btname),W("bt")),Object.keys(t.options).forEach((function(e){const o=t.options[e];r(`#cmd_opt_${e}`).hasOwnProperty("checked")?"boolean"==typeof o&&(r(`#cmd_opt_${e}`)[0].checked=o):r(`#cmd_opt_${e}`).val(o)})),t.options.hasOwnProperty("u")){const[e,o]=t.options.u.split(":");r(`#resample_${e}`).prop("checked",!0),o&&r("#resample_i").prop("checked",!0)}t.options.hasOwnProperty("s")&&("-disable"===t.options.s?r("#disable-squeezelite")[0].checked=!0:r("#disable-squeezelite")[0].checked=!1)}(o):"host_name"===e?(o=o.replaceAll('"',""),r("input#dhcp-name1").val(o),r("input#dhcp-name2").val(o),0==r("#cmd_opt_n").length&&r("#cmd_opt_n").val(o),document.title=o,K=o):"rel_api"===e?_=o:"enable_airplay"===e?r("#s_airplay").css({display:y(o)?"inline":"none"}):"enable_cspot"===e?r("#s_cspot").css({display:y(o)?"inline":"none"}):"preset_name"==e?oe=o:"board_model"==e&&(ee=o),r("tbody#nvsTable").append(`${e}`),r("input#"+e).val(t[e].value)})),z.length>0&&r("#cfg-audio-bt_source-sink_name").val(z),r("tbody#nvsTable").append(""),e.gpio?(r("#pins").show(),r("tbody#gpiotable tr").remove(),e.gpio.forEach((function(e){r("tbody#gpiotable").append(`${e.group}${e.name}${e.gpio}${e.fixed?"Fixed":"Configuration"}`)}))):r("#pins").hide()})).fail((function(e,t,o){T(e,0,o)})),r.ajaxSetup({timeout:7e3}),r.getJSON("/commands.json",(function(e){console.log(e),r(".orec").show(),e.commands.forEach((function(t){if(0===r("#flds-"+t.name).length){const o=t.name.split("-"),n="cfg"===o[0],i="#tab-"+o[0]+"-"+o[1];let s="";s+=`${t.help.encodeHTML().replace(/\n/g,"")}`,t.argtable&&t.argtable.forEach((function(o){let r=o.datatype||"";const n=t.name+"-"+o.longopts,i=Oe(e.values,t.name,o.longopts);let a=`hasvalue=${o.hasvalue} `;a+='longopts="'+o.longopts+'" ',a+='shortopts="'+o.shortopts+'" ',a+="checkbox="+o.checkbox+" ",a+='cmdname="'+t.name+'" ',a+=`id="${n}" name="${n}" hasvalue="${o.hasvalue}" `;let p=o.mincount>0?"bg-success":"";"hidden"===o.glossary&&(a+=' style="visibility: hidden;"'),o.checkbox?s+=`${o.glossary.encodeHTML()}`:(s+=`${o.glossary.encodeHTML()}`,r.includes("|")?(p=r.startsWith("+")?" multiple ":"",r=r.replace("<","").replace("=","").replace(">",""),s+=``,r="--|"+r,r.split("|").forEach((function(e){s+=""+e+""})),s+=""):s+=``),s+=`${o.checkbox?"":""}Previous value: ${o.checkbox?i?"Checked":"Unchecked":i||""}${o.checkbox?"":""}`})),s+=`\n \n \n Result\n \n \n `,s+=n?`Save\nApply`:`Execute`,s+="",n?r(i).append(s):r("#commands-list").append(s)}})),r(".sclk").off("click").on("click",(function(){window.runCommand(this,!1)})),r(".cclk").off("click").on("click",(function(){window.runCommand(this,!0)})),e.commands.forEach((function(t){r("[cmdname="+t.name+"]:input").val(""),r("[cmdname="+t.name+"]:checkbox").prop("checked",!1),t.argtable&&t.argtable.forEach((function(o){const n="#"+t.name+"-"+o.longopts;if(o.checkbox)r(n)[0].checked=Oe(e,t.name,o.longopts);else{let i=Oe(e,t.name,o.longopts);void 0!==i&&r(n).val(i.toString()).trigger("change"),0===r(n)[0].value.length&&(o.datatype||"").includes("|")&&(r(n)[0].value="--")}}))})),0!=r("#cfg-hw-preset-model_config").length&&(F||(F=!0,r("#cfg-hw-preset-model_config").html("--"),r.getJSON("https://gist.githubusercontent.com/sle118/dae585e157b733a639c12dc70f0910c5/raw/",{_:(new Date).getTime()},(function(e){r.each(e,(function(e,t){r("#cfg-hw-preset-model_config").append(`${t.name}`),""!==oe&&oe==t.name&&r("#cfg-hw-preset-model_config").val(oe)})),""!==oe&&r("#prev_preset").show().val(oe)})).fail((function(e,t,o){const r=t+", "+o;console.log("Request Failed: "+r)}))))})).fail((function(e,t,o){404==e.status?r(".orec").hide():T(e,0,o),r("#commands-list").empty()})),me(),be()})),window.setURL=function(e){let t=e.dataset.url;r('[data-bs-url^="http"]').addClass("btn-success").removeClass("btn-danger"),r('[data-bs-url="'+t+'"]').addClass("btn-danger").removeClass("btn-success"),ne&&(t=t.replace(/.*\/download\//,ne+"/plugins/SqueezeESP32/firmware/")),r("#fwurl").val(t)},window.runCommand=function(e,t){let o=e.getAttribute("cmdname");R(o,"MESSAGING_INFO","Executing.",!1);const n=document.getElementById("flds-"+o),i=null==n?void 0:n.querySelectorAll("select,input");if("cfg-hw-preset"===o)return function(e,t){const o=JSON.parse(e[0].value),n=e[0].getAttribute("cmdname");console.log(`selected model: ${o.name}`);let i={timestamp:Date.now(),config:{model_config:{value:o.name,type:33}}};for(const[e,t]of Object.entries(o.config)){const o="string"==typeof t||t instanceof String?t:JSON.stringify(t);i.config[e]={value:o.toString(),type:M.NVS_TYPE_STR},R(n,"MESSAGING_INFO",`Setting ${e}=${o} `,!0)}R(n,"MESSAGING_INFO","Committing ",!0),r.ajax({url:"/config.json",dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify(i),error:function(e,t,o){T(e,0,o),R(n,"MESSAGING_ERROR",`Unexpected error ${""!==o?o:"with return status = "+e.status} `,!0)},success:function(e){R(n,"MESSAGING_INFO","Saving complete ",!0),console.log(e),t&&le(2500,n)}})}(i,t);if(o+=" ",n)for(const e of i){let t="",r="";const n="SELECT"===e.tagName,i="true"===e.getAttribute("hasvalue"),s=n&&"--"!==e.value||!n&&""!==e.value;if(!i||i&&s){const n=e.getAttribute("longopts"),s=e.getAttribute("shortopts");null!==n&&"undefined"!==n?r+="--"+n:null!==s&&"undefined"!==s&&(r="-"+s),i?(t=/\s/.test(e.value)?'"':"",o+=`${r} ${t}${e.value}${t} `):e.checked&&(o+=`${r} `)}}console.log(o);const s={timestamp:Date.now(),command:o};r.ajax({url:"/commands.json",dataType:"text",method:"POST",cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify(s),error:function(e,t,o){var r=JSON.parse(this.data).command;404==e.status?R(r.substr(0,r.indexOf(" ")),"MESSAGING_ERROR",""+(k?"Limited recovery mode active. Unsupported action ":"Unexpected error while processing command"),!0):(T(e,0,o),R(r.substr(0,r.indexOf(" ")-1),"MESSAGING_ERROR",`Unexpected error ${""!==o?o:"with return status = "+e.status}`,!0))},success:function(o){r(".orec").show(),console.log(o),"Success"===JSON.parse(o).Result&&t&&le(2500,e.getAttribute("cmdname"))}})}},861:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAb1BMVEXIycuswsKMjI4rqqZyc3RQlpQ6jIEmJifW2dq5ursppJ8Om4zC0NAFdGYmmpb///8Hg3O4x8cHkoEggX0jko5Ks6/P0dM5r6ocoZb3+PgiiYVevrp/y8bg4uOS09FtxMDs7+7M6um529qoysik2tiNn72gAAAAF3RSTlP94Fr/Wf39BP26/////////////////kibhL0AAAGjSURBVDjLbZMJkoMgEEWtmETEJWpkiSC45P5nnF4wk7HmW2jLfzYIdFYUxbXUYp5nIbTOUFoLAR2ivIKZFQXYuu6TahSHmdAlAqWub0/QNI1jSxrHacKeWw9EdtH1xHbbyiRgCJn67JqVAr9nO2fJnBDMoUuYEvsfmxnJBM66Zj8/iYmaAPKlOvRNJAC/fz8OefINEAngAbYPEMiHTJCCAZrACciVMpCCgDEBKwsAowymMO3IAP3Btqa5vYJx0ZlcOSUZaE/AWznvnTHOyfZ/wMUQvAIg/wb27QNEH94BgGj+APsZiF8AXAhQQEMwkIYYLW7xvsENoyUoF0I0ysf0F2O743kDQNXzXM8+j8Eb6byzDEz7gtpsO1PgrXG5Nd6btNTP+YXarKTny1uQ9JiAN6vbqT9au+BzMQjAWtlq6BiYttdjiVVVqfXxWFWFkk6Cz0DTdYOFPmpHAAK/YQCJoTppQJ8A3TAxVAAhR439Bg5tKe7NgSDEje3mDsf+ovuGCUbYZb/BwoHS6ykHMYfo/U6lx8Xb/+qo3U/x/lf+VP9c/j9c3zy20WEMxgAAAABJRU5ErkJggg=="}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,e=[],r.O=(t,o,n,i)=>{if(!o){var s=1/0;for(u=0;u=i)&&Object.keys(r.O).every((e=>r.O[e](o[p])))?o.splice(p--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[o,n,i]},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={826:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,i,[s,a,p]=o,l=0;if(s.some((t=>0!==e[t]))){for(n in a)r.o(a,n)&&(r.m[n]=a[n]);if(p)var u=p(r)}for(t&&t(o);lr(607)));n=r.O(n)})(); //# sourceMappingURL=index.dd7cd3.bundle.js.map